Commit Graph

228 Commits

Author SHA1 Message Date
Andrew Tridgell b4201436dd HAL_ChibiOS: fixed flash space on 16k bl boards
this avoids the stm32_flash_recent_erase() function which added around
800 bytes to the bootloader. It is not needed
2020-12-17 12:51:25 +11:00
Andrew Tridgell 0c440d5675 HAL_ChibiOS: cope with flash erase in expected delay
when there has been a flash erase when we are definately in an
expected delay
2020-12-08 13:22:36 +11:00
Andrew Tridgell ba69cd72c9 HAL_ChibiOS: improved stack checking and stack display
display both ISR stack and thread stacks. Show total stack sizes as
well as amount of stack remaining
2020-12-01 11:14:50 +11:00
Andrew Tridgell 84eac7642b HAL_ChibiOS: improved stack checking 2020-12-01 11:14:50 +11:00
Andrew Tridgell 2a29b0fcf5 HAL_ChibiOS: fixed AP_Periph build with --enable-asserts 2020-12-01 11:14:50 +11:00
Andrew Tridgell 408f8b3940 HAL_ChibiOS: added check for overwrite of nullptr on H7
the STM32H7 has 64k of ITCM memory at address zero. We allow
allocation of everything except the first 1024 bytes. This checks for
those reserved bytes being overwritte, which would indicate a write to
nullptr
2020-11-18 17:14:43 +11:00
Andrew Tridgell 95a823a702 HAL_ChibiOS: added link list of all memory allocations
check all allocations for corruption on free() and malloc_check()
2020-11-18 17:14:43 +11:00
Andrew Tridgell ce3e1a69ec HAL_ChibiOS: added memory guard system 2020-11-18 17:14:43 +11:00
Andrew Tridgell 84bd59a7bb HAL_ChibiOS: support H7 with no crystal 2020-07-10 13:33:51 +10:00
Andrew Tridgell cfbfb27004 HAL_ChibiOS: support no-crystal F3 setups 2020-07-10 13:33:51 +10:00
Andrew Tridgell 6a1f43d5df HAL_ChibiOS: fixed build with our old compiler
gcc 4.9 doesn't like static_assert() in C code
2020-06-07 14:11:48 +10:00
Andrew Tridgell 69676cd614 HAL_ChibiOS: support 24MHz f3 MCUs 2020-05-10 15:09:28 +10:00
Andrew Tridgell 3ec2ef787d HAL_ChibiOS: fixed build warning 2020-04-29 12:20:19 +10:00
Andrew Tridgell ce68e0fbb5 HAL_ChibiOS: fixed bootloader build 2020-04-29 07:36:55 +10:00
Andrew Tridgell 18e88e0ea3 HAL_ChibiOS: implement stack overflow hook
this needs C bindings to allow call from low level RTOS thread
switching code
2020-04-29 07:36:55 +10:00
Andrew Tridgell f0c9f4003e HAL_ChibiOS: implement thread_info() 2020-04-29 07:36:55 +10:00
Andrew Tridgell d9efac2993 HAL_ChibiOS: only allow PLL override in clock selection part of header 2020-04-28 10:32:23 +10:00
Andrew Tridgell 29f538dec9 HAL_ChibiOS: use common header for STM32 clock config
avoid the need for clock config lines in most hwdef.dat files
2020-04-28 10:32:23 +10:00
Ivannikov Kirill 3ab1b29397 AP_HAL_ChibiOS: error if system clock not 1mhz on 16 CH_CFG_ST_RESOLUTION. prevent variable overflow
if CH_CFG_ST_FREQUENCY not match 1000000U on 16 bit CH_CFG_ST_RESOLUTION
we try to multiply now *= 1000000U/CH_CFG_ST_FREQUENCY; it may overflow 16 bit value.
2020-04-26 19:58:54 +10:00
Andrew Tridgell db642717be HAL_ChibiOS: fixed clock for FDCAN to be below 80MHz
we were running at 100MHz, which is out of spec
2020-04-24 16:55:03 +10:00
Andrew Tridgell 8e977183fe HAL_ChibiOS: added mRoNexus 2020-04-23 07:28:13 +10:00
Andrew Tridgell 74f33d57c5 HAL_ChibiOS: avoid unnecessary H7 flash writes 2020-04-14 10:02:51 +10:00
Andrew Tridgell 822460ce7d HAL_ChibiOS: fixed strdup() on ChibiOS 2020-03-28 15:28:03 +11:00
bugobliterator 8215537f99 HAL_ChibiOS: deprecate realloc for ChibiOS build, so as to return error when used 2020-03-24 10:32:14 +11:00
Peter Barker 1a123e5f8d AP_HAL_ChibiOS: avoid referencing flash sector/page 22 on 1MB boards 2020-03-03 10:13:53 +11:00
Andrew Tridgell 9e0edba31d HAL_ChibiOS: raised timer clocks to 200MHz
this gives more flexibility in setting up timers for DShot
2020-02-12 18:12:39 +11:00
Andrew Tridgell 982cff0695 AP_HAL_ChibiOS: make all semaphores recursive
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Andrew Tridgell 2b7bffa906 HAL_ChibiOS: adjust dma reserve allocation
use larger target and allow for smaller allocation
2020-01-18 07:13:11 +11:00
Andrew Tridgell 56985f8c33 HAL_ChibiOS: added checking on bouncebuffer allocation
fail operations if DMA bouncebuffer alloc fails
2020-01-18 07:13:11 +11:00
Andrew Tridgell fced7d78fc HAL_ChibiOS: fixed clock src for I2C4 on H7 2020-01-08 05:56:23 +11:00
Andrew Tridgell 8ffd1050eb HAL_ChibiOS: fixed build on STM32F3 2020-01-02 09:52:57 +11:00
Andrew Tridgell faf34970e1 HAL_ChibiOS: automatically control pullup/pulldown on inverted UARTs
this makes setup of sport telemetry much easier
2020-01-02 09:52:57 +11:00
Andrew Tridgell f732a482fe HAL_ChibiOS: support wider range of clock frequencies 2019-12-20 16:50:48 +11:00
Andrew Tridgell 4f429e6c5a HAL_ChibiOS: fixed handling of 16bit timer wrap
this fixes #12948
2019-12-09 12:43:39 +11:00
Andrew Tridgell ef993f380f HAL_ChibiOS: use system_halt_hook() 2019-11-27 14:12:04 +11:00
Andrew Tridgell c1575654e2 HAL_ChibiOS: added optional debug code for hardfaults and panics
this implements a soft-serial print function that can be used to get
debug out on a GPIO pin in a panic
2019-11-27 14:12:04 +11:00
Andrew Tridgell a90a2e20dc HAL_ChibiOS: enable CAN callbacks
this allows for much more reliable CAN comms in AP_Periph
2019-11-09 17:11:32 +11:00
Andrew Tridgell bc1de7a208 HAL_ChibiOS: support STM32F3xx MCUs 2019-11-01 10:53:53 +11:00
Andrew Tridgell b5af1edf0d HAL_ChibiOS: moved app_descriptor to start of flash
this prevents the bootloader from finding it's own image as a false
posititve in searching for the app_descriptor
2019-10-28 15:53:16 +11:00
Andrew Tridgell d1bc0f236d HAL_ChibiOS: added pragma once for watchdog header 2019-10-26 15:32:10 +11:00
Andrew Tridgell fc8d9e8af5 HAL_ChibiOS: added RTC_BOOT_FWOK value for RTC reboot register
this is used in CAN firmware to know if the main app firmware has run
for long enough to be considered good
2019-10-26 15:32:10 +11:00
Andrew Tridgell e6cb35090c HAL_ChibiOS: fixed page size for STM31F105 flash 2019-10-21 19:12:01 +11:00
Andrew Tridgell 44f895ab16 HAL_ChibiOS: fixed for ZubaxGNSS build 2019-10-21 19:12:01 +11:00
Andrew Tridgell 91e8752c17 HAL_ChibiOS: wrap more libc functions
this saves a few k of flash as it avoids linking libc versions of some
functions
2019-09-09 13:31:30 +10:00
Andrew Tridgell 3166f84954 HAL_ChibiOS: added vsnprintf wrapper
this allows us to use a common snprintf implementation
2019-09-09 13:31:30 +10:00
Andrew Tridgell 0ffe2e75be HAL_ChibiOS: fixed warnings 2019-08-27 15:40:43 +10:00
Andrew Tridgell 9d760a2956 HAL_ChibiOS: disable re-entrancy in FATFS
not needed now we have a semaphore in AP_Filesystem
2019-08-27 15:40:43 +10:00
Andrew Tridgell bf79b65e07 HAL_ChibiOS: simplify stubs code 2019-08-27 15:40:43 +10:00
Andrew Tridgell d1565a96c5 HAL_ChibiOS: wrap cacheBuffer functions
needed to avoid problem with end() method in UARTDriver shadowing with
F7 implementation of cache macros
2019-08-27 15:40:43 +10:00
Andrew Tridgell b867ef35c0 HAL_ChibiOS: use AP_Filesystem API 2019-08-27 15:40:43 +10:00