Commit Graph

455 Commits

Author SHA1 Message Date
Peter Barker dd139a3a63 AP_HAL_ChibiOS: gate mavlink things on HAL_GCS_ENABLED, not HAL_BOOTLOADER_BUILD 2023-02-01 18:46:28 +11:00
Peter Barker ccfad8ceea AP_HAL_ChibiOS: disable watchdog in hwdef.h not in-line in code 2023-02-01 18:44:06 +11:00
Peter Barker 47c7acf1b3 AP_HAL_ChibiOS: define HAL_ENABLE_SAVE_PERSISTENT_PARAMS for bootloader in hwdef.h 2023-01-31 10:36:39 +11:00
Peter Barker 3e0ca818a3 AP_HAL_ChibiOS: move all defaults to end of hwdef.h
this allows the defaults to be based on other things set in the hwdef - for example, NUM_SERVO_CHANNELS to be dependent on HAL_PWM_COUNT
2023-01-25 22:30:55 +11:00
Peter Barker d4930b4e55 AP_HAL_ChibiOS: move AP_Periph config of NUM_SERVO_CHANNELS into chibios_hwdef.py 2023-01-25 22:30:55 +11:00
Peter Barker 3a604ecfdf AP_HAL_ChibiOS: add and use AP_VIDEOTX_ENABLED 2023-01-24 11:03:27 +11:00
Andy Piper 0234c344ab AP_HAL_ChibiOS: add vanity and build requirements to betaflight converter 2023-01-18 19:17:22 +11:00
Andy Piper f9276f76e7 AP_HAL_ChibiOS: cope with sensor alignment not being set in betaflight config 2023-01-18 19:17:22 +11:00
Andy Piper 9caf94b5e4 AP_HAL_ChibiOS: simple conversion tool for betaflight pin definitions 2023-01-11 18:57:33 +11:00
Peter Barker 28592269ff AP_HAL_ChibiOS: use chibios_hwdef.py to disable fence on AP_Periph 2023-01-06 12:39:06 +11:00
Peter Barker de54bcbc21 AP_HAL_ChibiOS: define AP_INERTIALSENSOR_ENABLED in a new AP_InertialSensor_config.h 2023-01-04 18:02:34 +11:00
Andrew Tridgell 673aa5ceb7 HAL_ChibiOS: default to max 1 rangefinder in periph 2023-01-02 15:42:55 +11:00
Andrew Tridgell d768c721ee HAL_ChibiOS: make it fatal to have I2C devices without an I2C_ORDER
otherwise it is very confusing when you end up with AP_HAL_Dummy for
I2C manager
2022-12-21 19:52:31 +11:00
Andrew Tridgell eb704510d6 HAL_ChibiOS: default to one battery monitor backend in peripherals 2022-12-20 10:44:52 +11:00
Andrew Tridgell 46782057f4 HAL_ChibiOS: fixed a bug in processing STORAGE_FLASH_PAGE
when we look in hwdef.dat for STORAGE_FLASH_PAGE we need to recurse
into includes, or we may miss it
2022-12-05 15:19:52 +11:00
Henry Wurzburg f297e57176 AP_HAL_ChibiOS: add synthetic current sensor,fix SITL current 2022-11-24 06:53:35 +11:00
Peter Barker c7f08e422c AP_HAL_ChibiOS: remove GCS.h from header files 2022-11-16 18:29:07 +11:00
Peter Barker aef745c693 AP_Compass: fix compilation when removing diagonals state 2022-11-09 21:14:04 +11:00
Peter Barker 2f1bda4375 AP_HAL_ChibiOS: explicitly default MSP off for AP_Periph
several Periphs already define this on
2022-11-09 10:21:44 +11:00
Peter Barker fc8ad509f7 AP_HAL_ChibiOS: define HAL_MAX_CAN_PROTOCOL_DRIVERS for bootloader in hwdef.h 2022-11-08 12:06:54 +11:00
Peter Barker bb1c3d6545 AP_HAL_ChibiOS: use minimize_features.inc for HAL_WITH_DSP 2022-11-05 14:52:10 +11:00
bugobliterator 2a4921c139 AP_HAL_ChibiOS: add support for detecting IMU backends by order 2022-11-01 10:41:59 +11:00
Peter Barker 4cc1459e63 AP_HAL_ChibiOS: disable CanManager in hwdef.h for AP_Periph 2022-09-20 09:39:48 +10:00
Peter Barker 28a0336423 AP_HAL_ChibiOS: move defaulting of HAL_DSHOT_ALARM into hwdef 2022-09-15 09:18:04 +10:00
Andrew Tridgell 8e102ecfcc hwdef: added CUAV_V6X default parameters 2022-09-14 18:04:46 +10:00
Andrew Tridgell f899a47429 HAL_ChibiOS: removed debug msg 2022-09-05 12:35:37 +10:00
bugobliterator 0c78f8bac2 AP_HAL_ChibiOS: add support for booting into DFU 2022-08-30 10:51:06 +10:00
Peter Barker e4bc7a0ef5 AP_HAL_ChibiOS: rename HAL_MISSION_ENABLED to AP_MISSION_ENABLED 2022-08-18 22:49:10 +10:00
Peter Barker 4ca0f35943 AP_HAL_ChibiOS: do not gate AP_CRASHDUMP_ENABLED on bootloader
Also rename from HAL_CRASHDUMP_ENABLE

Removes code based on define rather than creating empty functions.  Makes it clearer what's going on in the callers.
2022-08-17 17:34:00 +10:00
Peter Barker ecde9f8c3f AP_HAL_ChibiOS: make HAL_FLASH_PROTECTION a boolean, stop checking for definition 2022-08-16 08:10:16 +10:00
Andrew Tridgell a8ab7c3865 HAL_ChibiOS: auto-define AP_CHECK_FIRMWARE_ENABLED for AP_Periph 2022-08-15 09:18:34 +10:00
Andy Piper 1ff3ee7a12 AP_HAL_ChibiOS: allow undef of SPI devices 2022-08-03 17:06:38 +10:00
Andy Piper 7fc5a7135a AP_HAL_ChibiOS: make sure bootloader reserves space for storage
Fixes bug introduced by #19769
2022-08-03 16:55:51 +10:00
Peter Barker 13b03f79db AP_HAL_ChibiOS: move from HAL_NO_SHARED_DMA to AP_HAL_SHARED_DMA_ENABLED
This allows hwdef files to manipulate this value
2022-07-19 18:02:26 +10:00
Andrew Tridgell 0e745d0ad3 hwdef: added BOARD_MATCH() support for IMUs
allow hwdef.dat to specify list of IMUs which match a specific board
type
2022-07-19 15:02:31 +10:00
Andrew Tridgell b1e3b9414b hwdef: fixed Pixhawk6X ALT_RAM_MAP check 2022-06-23 12:37:24 +10:00
Peter Barker ce1bb906b7 AP_HAL_ChibiOS: allow rangefinder backends to be individually compiled in 2022-06-21 09:15:20 +10:00
Andrew Tridgell 9efcad3adf HAL_ChibiOS: added support for ALT_RAM_MAP on H7
for compatibility with the px4 H7 bootloader
2022-06-15 17:28:40 +10:00
Pradeep 183352cdfe AP_Periph: choose node stats - build files
Added - AP_Stat library and AP_STATS_ENABLED build options
2022-06-07 09:57:32 +10:00
Peter Barker 7da0b3aaf2 AP_HAL_ChibiOS: allow airspeed backends to be compiled out 2022-05-10 09:02:51 +10:00
Peter Barker e788941f70 hwdef: turn off various GPS backends on on AP_Periph 2022-04-13 18:23:51 +10:00
Peter Barker 73b86ccc04 AP_HAL_ChibiOS: allow RobotisServo protocol to be compiled out 2022-04-12 10:35:01 +10:00
Peter Barker 2e20e26403 AP_HAL_ChibiOS: allow Volz protocol to be compiled out 2022-04-12 10:35:01 +10:00
bugobliterator 2dceb9a3ed AP_HAL_ChibiOS: ensure that common ram is selected for bootloader/app comms in STM32H7 2022-03-23 19:09:21 +11:00
Andy Piper ceef68e07b AP_HAL_ChibiOS: allow H7 480Mhz clock speed to be configured in hwdef via MCU_CLOCKRATE_MHZ 2022-03-16 20:37:30 +11:00
Peter Barker 470cb2caa2 AP_HAL_ChibiOS: turn autocal off for periphs 2022-03-15 08:52:37 +11:00
Peter Barker e486671bb2 AP_HAL_ChibiOS: correct #ifndef nesting in periph defaults 2022-03-13 13:23:51 +11:00
bugobliterator faf0c0d7c3 AP_HAL_ChibiOS: set canfd bitrates using CANFD_SUPPORTED opt 2022-03-11 18:13:54 +11:00
Siddharth Purohit 72090d10da AP_HAL_ChibiOS: add hwdef config to enable CANFD support 2022-03-11 18:13:54 +11:00
Andy Piper f840315aa4 AP_HAL_ChibiOS: clock H750 at 480Mhz when using 8Mhz, 16Mhz and 24Mhz crystals 2022-02-23 18:19:56 +11:00
Andrew Tridgell 96518c9eda HAL_ChibiOS: added CPU defines to hwdef
needed for checks like defined(STM32F1)
2022-02-22 12:13:19 +11:00
Andrew Tridgell 6039b8012a HAL_ChibiOS: define HAL_USE_SDMMC 2022-02-22 12:13:19 +11:00
Andrew Tridgell 638e20a0b9 HAL_ChibiOS: bring in hal.h where it is needed 2022-02-22 12:13:19 +11:00
Andrew Tridgell 25cc8203d8 HAL_ChibiOS: added CHIBIOS_BOARD_NAME define 2022-02-22 12:13:19 +11:00
Andrew Tridgell a641eb3a30 HAL_ChibiOS: support ALT_BOARD_ID
allow for compat with px4 board ID for the same board
2022-02-17 14:37:41 +11:00
Andy Piper 83ac78e969 AP_HAL_ChibiOS: add support for @SYS/timers.txt
move out prescaler calculation and use closest prescaler everywhere
include timer id in PWM groups
2022-02-16 15:28:04 +11:00
Andy Piper 48c21299f8 AP_HAL_ChibiOS: hwdef for SPRacingH7
hwdef for DevEBoxH7v2
pin definitions for STM32H750
add QSPI to DevEBox bootloader
add external flash to DevEBox
rename EXTERNAL_PROG_FLASH_MB to EXT_FLASH_SIZE_MB
Add support for EXT_FLASH_RESERVE_START_KB and EXT_FLASH_RESERVE_END_KB
Disable HAL_ENABLE_SAVE_PERSISTENT_PARAMS when there is no bootloader flash available
relax storage health status with SD card backend
don't check SD card health unless USE_POSIX
binary sections rearranged on external ram
manage RAMFUNC through ldscript and optimize function placement in external flash
inline timer functions
optimize placement of ChibiOS and functions in ITCM and AXI RAM
fix chibios features on bootloader build with external flash
change H750 memory layout
increase line storage for SD card based parameters
comment external flash linker script
move vtables into DTCM
update ram map for H757
enable crashdump support with external flash
correct bootloader pins and generator on SPRacingH7/DevEBoxH7v2
setup external flash reserve regions
allow different RAM_MAP for external flash on H750 and H757
2022-02-09 12:47:55 +00:00
Walter Dunckel f2347e7845 AP_HAL_ChibiOS: add missing EOL in output
without it a double define line was giving compiler an error
2022-02-09 09:14:25 +11:00
Andrew Tridgell a8b98bfcc4 HAL_ChibiOS: required EXPECTED_CLOCK in all MCU files
this ensures we validate the clock setup at compile time
2022-01-29 18:57:33 +11:00
Peter Barker 185ccaee92 AP_HAL_ChibiOS: disable UART stats based on GCS being enabled
We may need to revisit this if we are able to transfer these files over
some other mechanism into the future
2022-01-18 11:09:03 +11:00
Andrew Tridgell 59b2a30c11 HAL_ChibiOS: added check for valid HAL_STORAGE_SIZE 2022-01-11 11:33:30 +11:00
Andrew Tridgell 1236474cfb HAL_ChibiOS: give an error if STORAGE_FLASH_PAGE overflash flash
when storage is between the bootloader and main program flash then the
flash size available to the bootloader needs to stop at the sector for
the storage flash.

Similarly, if storage is at the end of flash, then total flash size
needs to be limit

this ensures we don't try to build a firmware that encroaches on
program space
2022-01-11 11:33:30 +11:00
phil tokumaru bfded82da5 AP_HAL_ChibiOS: STM32F777xx.py: correct pincount for J and K 2022-01-06 09:15:14 +11:00
Andy Piper c357c1e521 AP_HAL_ChibiOS: hwdef for BeastF7 v2
Fix undef of alt pins
2022-01-05 18:50:41 +11:00
bugobliterator 62945e1d85 AP_HAL_ChibiOS: use common directory reference wrt hwdef scripts 2021-12-20 12:47:25 +11:00
Peter Barker bdeec0868e AP_HAL_ChibiOS: turn wind-compensation off in hwdef defaults 2021-12-19 10:45:16 +11:00
bugobliterator f0073e472b HAL_ChibiOS: set SWD pins pulled up and low by default 2021-12-17 22:51:18 -08:00
Andrew Tridgell ee7464140a HAL_ChibiOS: avoid re-writing hwdef.h if unchanged
this makes dependency handling faster
2021-12-14 09:37:17 +11:00
Andrew Tridgell 0e5beb423e HAL_ChibiOS: sort shared dma mask
this prevents an unnecessary change in hwdef.h on reconfigure
2021-12-14 09:37:17 +11:00
bugobliterator ee35350129 HAL_ChibiOS: setup for recording crashdump at the remaining flash space 2021-12-01 18:17:50 +11:00
Peter Barker 139c460fa5 hwdef: remove unused define NO_DATAFLASH 2021-11-24 18:18:06 +11:00
Peter Barker ee68072c62 AP_HAL_ChibiOS: chibios_hwdef: use ifndef pattern for AP_FETTEC_ONEWIRE_ENABLED 2021-11-24 12:01:22 +11:00
Andrew Tridgell fc6a82de1b AP_HAL_ChibiOS: support up to 9 UARTs 2021-11-22 22:48:59 +11:00
Andrew Tridgell 97aee6f45e HAL_ChibiOS: fixed regex error for GPIOs 2021-11-07 07:00:35 +11:00
Andrew Tridgell 5f15432e07 HAL_ChibiOS: allow for NODMA patterns
this makes it easy to disable DMA on I2C
2021-11-05 14:30:43 +11:00
Andrew Tridgell 98849a3998 HAL_ChibiOS: fixed build for EMPTY uarts
this fixes NucleoH743 build
2021-11-01 15:48:25 +11:00
bugobliterator 57e1fb1a81 HAL_ChibiOS: disable building CrashCatcher for non 2M boards 2021-10-30 19:24:57 +11:00
bugobliterator 70f606c480 AP_HAL_ChibiOS: restrict crash dump mechanisms only on boards with 2M flash 2021-10-30 19:24:57 +11:00
bugobliterator 66b8b9cf74 HAL_ChibiOS: add support for dumping crash logs to flash page 2021-10-30 19:24:57 +11:00
bugobliterator 69f53a6188 HAL_ChibiOS: add defines for CrashCatcher methods to use 2021-10-30 19:24:57 +11:00
Andrew Tridgell 0378e1a879 HAL_ChibiOS: removed need for a lot of boilerplate hwdef lines
bootloader and AP_Periph lines can default to right values
2021-10-26 15:56:53 +11:00
Iampete1 d7cc2cb296 AP_HAL_ChibiOS: hwdef.py: allow same GPIO pin in multiple alt configs 2021-10-26 10:05:20 +11:00
Andrew Tridgell c8664e0b98 HAL_ChibiOS: added STM32L476 support 2021-10-17 20:30:20 +11:00
Andrew Tridgell 5a68e21435 HAL_ChibiOS: support STM32L431 2021-10-17 20:30:20 +11:00
Andrew Tridgell 71e7bb0fe3 HAL_ChibiOS: mark af_parse_cubemx.py as executable, py3 2021-10-17 20:30:20 +11:00
Andrew Tridgell 25324ae0e2 HAL_ChibiOS: support SDMMC2 for sdcard 2021-10-12 15:47:51 +11:00
bugobliterator f298ea406e HAL_ChibiOS: enable RNG only for H7 based boards off for the rest by default 2021-10-07 19:43:11 +11:00
Andrew Tridgell 33529c98a9 HAL_ChibiOS: check the ROMFS line for IOMCU is added 2021-10-06 06:45:43 +11:00
Andrew Tridgell 4dbff85de7 HAL_ChibiOS: check for common hwdef.dat errors
catches missing GPIO type, mismatched timers and UARTs or bad pin types
2021-10-05 15:46:02 +11:00
Iampete1 8ae5bc5ad0 AP_HAL_ChibiOS: hwdef: allow GPIO alt config 2021-09-29 19:55:21 +10:00
Andrew Tridgell 27e93155f4 HAL_ChibiOS: fixed build on boards with OTG2 and no CAN interfaces 2021-09-29 18:11:04 +10:00
Andrew Tridgell 0212e23cd3 HAL_ChibiOS: added support for STM32L496 MCUs
good MCU for AP_Periph
2021-09-24 18:08:00 +10:00
Peter Barker 1bd62362a4 AP_HAL_ChibiOS: move from HAL_NO_GCS to HAL_GCS_ENABLED 2021-09-22 21:37:00 +10:00
Andrew Tridgell 7f59366cc0 HAL_ChibiOS: process AIRSPEED lines in hwdef.dat 2021-09-21 13:51:40 +10:00
Andrew Tridgell 532396e5e6 REVERT: HAL_ChibiOS: Rename STM32F412 hw definition file
This reverts commit 5de6c690d8.

That commit broke the build for the affected board as the chibios
headers rely on the name of the file matching a ifdef
2021-09-07 10:37:43 +10:00
Andrew Tridgell b77580f934 HAL_ChibiOS: avoid an issue with DCache init on H743
this fixes an issue found by Andy Piper where the H743 bootloader gets
a hard fault in the DCache enable code when SRAM1 is primary memory.

This is the simplest fix I could think of, and avoids the problem by
making DTCM the first segment in the bootloader.

Note that we can't use DTCM as first segment for main firmware since
we went to double precision EKF as the static variables don't fit
2021-09-06 18:23:03 +10:00
Siddharth Purohit 81dc237a19 AP_HAL_ChibiOS: move to using Instruction RAM with External Flash setup 2021-09-01 17:10:53 +10:00
Siddharth Purohit 39bd229279 AP_HAL_ChibiOS: remove dependency on Semaphores in QSPIDevice in BL 2021-09-01 17:10:53 +10:00
Siddharth Purohit 4ba2835de1 AP_HAL_ChibiOS: add config for supporting load from external flash 2021-09-01 17:10:53 +10:00
Siddharth Purohit faedb12493 AP_HAL_ChibiOS: fix hwdef generation for bootloader supporting ext flash 2021-09-01 17:10:53 +10:00