Commit Graph

372 Commits

Author SHA1 Message Date
Andrew Tridgell b0badf8caf HAL_ChibiOS: fixes for F745 builds 2018-08-02 11:56:33 +10:00
Andrew Tridgell 409e857f6b HAL_ChibiOS: use pullup on CTS line
this makes life less difficult for SiK radios which go into bootloader
mode on low CTS
2018-07-13 07:34:30 +10:00
Andrew Tridgell 11e09a846c HAL_ChibiOS: setup RTS pins as pullup
this prevents RTS pins from keeping SiK radios in bootloader mode on
peripheral powerup
2018-07-13 07:34:30 +10:00
Andrew Tridgell a7d9f4eef7 HAL_ChibiOS: don't add defaults.parm when building bootloader 2018-07-09 20:59:51 +10:00
Andrew Tridgell fd02865a8b HAL_ChibiOS: use wildcard ROMFS name for fonts 2018-07-09 19:41:56 +10:00
Andrew Tridgell 15ee9593b5 HAL_ChibiOS: fixed duplicate pin definitions
thanks to @liang-tang for noticing
2018-07-05 12:07:55 +10:00
Andrew Tridgell d3bc281a10 HAL_ChibiOS: use generic ROMFS embedding system 2018-07-02 10:43:48 +10:00
Andrew Tridgell 8ba137bd9a waf: moved ROMFS embed script into waf folder 2018-07-02 10:43:48 +10:00
Andrew Tridgell 6cf205bdbe HAL_ChibiOS: make sure we populate up to uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell 54dc67e2a9 HAL_ChibiOS: default bootloader product string to XX-BL 2018-06-28 11:35:13 +10:00
Andrew Tridgell 3a5b3b4b1b HAL_ChibiOS: fixed adding bootloader to ROMFS 2018-06-28 11:35:13 +10:00
Peter Barker e332bece0f AP_HAL_ChibiOS: embed any bootloader found for a board 2018-06-28 11:35:13 +10:00
Andrew Tridgell f71d2a7417 HAL_ChibiOS: support bootloaders with no uarts 2018-06-25 21:22:31 +10:00
Andrew Tridgell e40457d98f HAL_ChibiOS: avoid malloc in usbcfg
this avoids the need for malloc in the bootloader
2018-06-25 21:22:31 +10:00
Andrew Tridgell 369ac5edd0 HAL_ChibiOS: save more space in the bootloader 2018-06-25 21:22:31 +10:00
Andrew Tridgell e868a4fe8b HAL_ChibiOS: set FLASH_RESERVE_START_KB in the environment
used to correctly setup an intel hex file
2018-06-23 17:06:38 +10:00
Andrew Tridgell 1c807e0078 HAL_ChibiOS: added option to limit size of bootloader
this will ensure our F4 bootloaders stay under 16k
2018-06-23 17:06:38 +10:00
Andrew Tridgell 14f66461a7 HAL_ChibiOS: shrink build size for bootloader
thanks to @sh83 for the idea
2018-06-22 08:00:31 +10:00
Andrew Tridgell 3fc6824bfb HAL_ChibiOS: setup more bootloader config files 2018-06-22 08:00:31 +10:00
Andrew Tridgell e3a23921a2 HAL_ChibiOS: fixed FLASH_LOAD_ADDRESS
needs 0x08000000 base
2018-06-22 08:00:31 +10:00
Andrew Tridgell 1c054f0e4a HAL_ChibiOS: fixed clock line on fmuv5 I2C4
there was a typo in the datasheet
2018-06-21 13:08:20 +10:00
Lucas De Marchi 46213eb97e chibios_hwdef: fix wrong uart index
calling uart_list.index() will find the first element with that name,
which is not really what we want when we have multiple EMPTY uarts.
2018-06-15 08:21:40 +10:00
Andrew Tridgell ad3eca4e6b HAL_ChibiOS: fixed I2C4 DMA streams
There is an error in the datasheet. See
https://community.st.com/thread/50484-documentation-error-on-dma-channels-for-i2c4-on-stm32f7
2018-06-13 20:05:26 +10:00
Andrew Tridgell e068106669 HAL_ChibiOS: support I2C devices on STM32F7 without DMA
this allows us to support I2C4 on fmuv5
2018-06-13 20:05:26 +10:00
Alexander Malishev 289b93c3d0 HAL_ChibiOS: added parse_timer to chibios_hwdef.dat 2018-06-11 18:32:17 +10:00
Andrew Tridgell 2df0a71a4b HAL_ChibiOS: fixed flash load address in hwdef.h 2018-06-08 09:56:41 +10:00
Andrew Tridgell c05086430d HAL_ChibiOS: fixed hwdef.h generation for PWM on tim12 2018-06-06 15:01:38 +10:00
Andrew Tridgell 63087b6425 HAL_ChibiOS: enable fmu out 7 and 8 for fmuv5
these are exposed on the Pixhawk4
2018-06-06 15:01:38 +10:00
Alexander Malishev eac5d13f1c HAL_ChibiOS: use 2 channels in SoftSigReaderInt.cpp 2018-06-06 08:23:51 +10:00
Alexander Malishev 73d33356ad HAL_ChibiOS: detect overcapture in SoftSigReaderInt.cpp 2018-06-06 08:23:51 +10:00
Andrew Tridgell 1ed6a9d34b HAL_ChibiOS: added MCU tables for STM32F777 2018-06-06 07:15:41 +10:00
Andrew Tridgell c273b23940 HAL_ChibiOS: moved MCU config to python database
this moves the key MCU config variables related to memory to the
python MCU database, allowing the hwdef.dat to be considerably simpler
2018-06-06 07:15:41 +10:00
Andrew Tridgell eec4a12cc2 HAL_ChibiOS: switched to using DTCM memory for DMA
this uses SRAM1 and SRAM2 for main memory, which enables the use of the
data cache for faster operation, and using DTCM for all DMA operations.
2018-06-06 07:15:41 +10:00
Andrew Tridgell 762e4f9915 HAL_ChibiOS: fixed dma priorities for fmuv5 2018-06-06 07:15:41 +10:00
Andrew Tridgell 4ad757b4d1 HAL_ChibiOS: fixed pincount for F7 2018-06-06 07:15:41 +10:00
Andrew Tridgell 8d2f57898b HAL_ChibiOS: adjust pin counts for STM32F7 2018-06-06 07:15:41 +10:00
Alexander Malishev 6b15b2f44f HAL_ChibiOS: Enable sdcard on spi bus 2018-05-27 19:10:24 +10:00
Michael du Breuil 3a62bca7d0 AP_HAL_ChibiOS: Make redefined pins an error, fix FMUv3 2018-05-25 09:57:18 +10:00
Alexander Malishev 03d88b01be HAL_ChibiOS: added support for interrupt based rcin parsing 2018-04-24 08:03:46 +10:00
Andrew Tridgell 77c922e6b8 HAL_ChibiOS: make embed.py work with python3 2018-04-17 08:44:44 +10:00
Andrew Tridgell 3749480dd8 HAL_ChibiOS: create ap_romfs_embedded.h
use ROMFS keywork for romfs files
2018-04-17 08:44:44 +10:00
Alexey Kozin f87cc4e172 f4by chibios new style dma table build fix 2018-04-16 07:50:34 +10:00
Alexander Malishev 79b5719419 ChibiOS: add support for complementry output timer channels 2018-04-14 09:25:15 +10:00
Alexander Malishev 1b7eecdf2f ChibiOS: fixed tables for F405 mcu 2018-04-14 09:25:15 +10:00
mirkix 8074361bb8 AP_HAL_ChibiOS: add hardware def for STM32F767xx 2018-04-12 14:19:40 +10:00
Andrew Tridgell c6d7691667 HAL_ChibiOS: fixed F745 database for new DMA system 2018-04-12 11:50:44 +10:00
Andrew Tridgell 7286ffab77 HAL_ChibiOS: define FLASH_LOAD_ADDRESS in hwdef.h
used for bootloader support
2018-04-12 11:50:44 +10:00
Andrew Tridgell a9edbb6b2d HAL_ChibiOS: allow for a defaults.parm file in hwdef directory
this keeps defaults with the board, where that is appropriate
2018-04-12 11:50:44 +10:00
Andrew Tridgell 6e5cbc7c3d HAL_ChibiOS: initial support for F745 boards 2018-04-12 11:50:44 +10:00
Andrew Tridgell 551dca63e1 HAL_ChibiOS: added build information for each MCU
this abstracts the build information for each MCU, so that hwdef.dat
can control the build process of ChibiOS
2018-04-12 11:50:44 +10:00
Andrew Tridgell cdbbceb6b6 HAL_ChibiOS: cope with SDMMC peripheral for microSD 2018-04-12 11:50:44 +10:00
Andrew Tridgell 382772d999 HAL_ChibiOS: initial support for ESC serial output 2018-04-07 09:10:29 +10:00
Andrew Tridgell 95a261e061 HAL_ChibiOS: don't generate DMA channels for ALARM pin 2018-04-07 09:10:29 +10:00
Andrew Tridgell bc32276966 HAL_ChibiOS: support DShot output
use DMAR burst DMA to minimise number of DMA channels needed

thanks to betaflight for the great reference implementation!
2018-04-07 09:10:29 +10:00
Andrew Tridgell 294aac6955 HAL_ChibiOS: fixed CTS pulldown
we need to pulldown to prevent delays in uart sends
2018-04-07 09:10:29 +10:00
Andrew Tridgell 9a5df6d1f7 HAL_ChibiOS: auto-generate DMA channels for RCIN
and add DMA channels for TIMx_UP ready for DMAR based DShot support
2018-04-07 09:10:29 +10:00
Andrew Tridgell 6aff7ecbf5 HAL_ChibiOS: added channel numbers for STM32F4xx MCUs 2018-04-07 09:10:29 +10:00
Andrew Tridgell da2e79130b HAL_ChibiOS: generate channel numbers in DMA tables 2018-04-07 09:10:29 +10:00
kozinalexey 5df2b1a3ac chibios hal config for F4BY 2018-03-24 06:39:09 +11:00
Peter Barker 2efd9341cd AP_HAL_ChibiOS: copy the common linker script to outdir, use it from there
The directory we write the linker script to might not have the correct relative path to reference this common.ld script.  So make it reference common.ld in the current directory and copy common.ld to the output directory
2018-03-23 11:06:24 +11:00
Andrew Tridgell fd6185be0f HAL_ChibiOS: fixed python3 pickle error 2018-03-05 09:50:27 +11:00
Andrew Tridgell 33dd14b8d9 HAL_ChibiOS: use PULLUP on UART TX/RX lines
this can prevent spurious bytes on disconnected pins
2018-03-02 21:39:38 +11:00
Andrew Tridgell 08634903c8 HAL_ChibiOS: use relative path for common.ld
this avoids a path length issue under cygwin
2018-03-02 17:11:31 +11:00
Andrew Tridgell 306d35655e HAL_ChibiOS: allow for bare board builds
this allows for a build with no UARTs, no SPI, no I2C, no PWM. Great
for initial board bringup with just USB
2018-03-02 12:52:50 +11:00
Andrew Tridgell 74ed19f460 HAL_ChibiOS: moved more board setup into hwdef.dat 2018-03-02 12:52:50 +11:00
Andrew Tridgell ebbd15ea17 HAL_ChibiOS: auto-enable CAN when pins are defined 2018-03-02 12:52:50 +11:00
Andrew Tridgell d84c487a60 HAL_ChibiOS: generate env.py from hwdef.dat
allowing for environment override in hwdef.dat
2018-03-02 12:52:50 +11:00
Andrew Tridgell 17b3607aa8 HAL_ChibiOS: fixed RCIN on revo-mini
this also adds an attempt at using 'N' (inverted) channels for
RCIN. This doesn't work yet, but would be better for the revo-mini, as
it would allow the normal RCIN pin to be used
2018-02-14 18:27:00 +11:00
Andrew Tridgell 427e00dd41 HAL_ChibiOS: switched to system timer for AP_HAL::micros()
this uses the ChibiOS system timer instead of a separate GPT timer for
the core ChibiOS timer. The advantage is it saves us a timer, plus it
changes ChibiOS to use a 1MHz clock on its timer, which gives us
higher resolution for delays.

This has a remarkable effect on timing jitter, reducing it greatly
2018-02-14 18:27:00 +11:00
Andrew Tridgell 66608e8cad HAL_ChibiOS: improved mini-pix support 2018-02-14 18:27:00 +11:00
Mark Whitehorn 59b2d44323 AP_HAL_ChibiOS: make ToneAlarm compilation conditional on presence of
alarm pin
2018-02-11 14:55:23 +11:00
Mark Whitehorn d569e35a0f AP_HAL_ChibiOS: add toneAlarm support for ChibiOS on MindPX-v2 2018-02-11 14:55:23 +11:00
Mark Whitehorn 13c54c0543 AP_HAL_ChibiOS: add missing declaration in chibios_hwdef.py 2018-02-11 14:55:23 +11:00
Mark Whitehorn fb142422f6 AP_HAL_ChibiOS: pull ALARM_CHANNEL into pwmGroup
and improve formatting of HAL_PWM_ALARM in hwdef.h
2018-02-11 14:55:23 +11:00
Mark Whitehorn 8b216cf182 AP_HAL_ChibiOS: add ToneAlarm thread
fmuv4 hwdef.dat: remove PWM label from buzzer output pin
                 add buzzer pin labeled ALARM
                 remove timer PWM from HAL_PWM_GROUPs
2018-02-11 14:55:23 +11:00
Andrew Tridgell 8226530610 HAL_ChibiOS: added DMA_PRIORITY and DMA_NOSHARE options
this allows finer grained control of DMA streams
2018-02-08 22:13:00 +11:00
Andrew Tridgell 507fcb0f27 Tools: moved make_abin.sh into Tools/scripts
will be used in px4 build
2018-02-08 18:56:51 +11:00
Andrew Tridgell 4ce0c2c827 HAL_ChibiOS: simplify skyviper-v2450 config
remove unused peripherals
2018-02-08 17:36:33 +11:00
Siddharth Purohit 40142e5aef ChibiOS: implement way to clear i2c bus by toggling clock line 2018-02-08 17:36:33 +11:00
Andrew Tridgell d208dc69d3 Tools: moved make_abin.sh into ChibiOS scripts 2018-02-08 17:36:33 +11:00
Andrew Tridgell ad5a04fc89 HAL_ChibiOS: added NODMA option
this allows a peripheral to be configured without DMA (for low-use
UARTs)
2018-02-07 20:33:45 +11:00
Andrew Tridgell 626632989e HAL_ChibiOS: fixed build for boards with no USB 2018-02-07 20:33:45 +11:00
Andrew Tridgell 4b8bde746e HAL_ChibiOS: improved default USB strings
use board name and serial number to make IDs unique
2018-02-07 20:33:45 +11:00
Andrew Tridgell 1aa6a0068a HAL_ChibiOS: fixed order of I2C DMA
this was harmless, but confusing for debugging
2018-02-07 20:33:45 +11:00
Andrew Tridgell bc49c0d2c5 HAL_ChibiOS: make hwdef.h the same on python2 and python3
and output to /tmp by default to prevent accidental use of old hwdef.h
in the build
2018-02-07 20:33:45 +11:00
Andrew Tridgell e91144cc8e HAL_ChibiOS: allow for empty UART drivers
allows for boards with no default GPS port
2018-02-07 20:33:45 +11:00
Andrew Tridgell e0212ebe85 HAL_ChibiOS: cope with ETR timer channels
trean the ETR capability as a separate AF
2018-02-07 20:33:45 +11:00
Andrew Tridgell c1df2a8a4b HAL_ChibiOS: cope with timers 10 and later 2018-02-07 20:33:45 +11:00
Siddharth Purohit 77f8acd7a1 HAL_ChibiOS: add CAN to supported peripherals list 2018-02-07 20:33:45 +11:00
Andrew Tridgell b0d0ee1f01 HAL_ChibiOS: reformat using yapf and support python3
allow hwdef.h compilation using python3
2018-02-07 20:33:45 +11:00
Andrew Tridgell 67e0ba22fe HAL_ChibiOS: fixed some errors in F405 tables 2018-02-07 20:33:45 +11:00
Andrew Tridgell a5bafb399f HAL_ChibiOS: adjust SPI pin speeds 2018-02-07 20:33:45 +11:00
bugobliterator c60c0b8ab1 HAL_ChibiOS: fix undef line processing 2018-01-20 17:40:07 +11:00
bugobliterator 1db1ff799e HAL_ChibiOS: modify hwdef scripts to setup for generic RCIN 2018-01-20 17:40:07 +11:00
bugobliterator 445ba6ed39 HAL_ChibiOS: update ppm to use Extended ICU driver 2018-01-20 17:40:07 +11:00
Andrew Tridgell 82c6d2751f HAL_ChibiOS: fixed F412 ram and flash setup 2018-01-20 17:40:07 +11:00
Andrew Tridgell 7ca3b56886 HAL_ChibiOS: fixed STM32F405 typos 2018-01-16 09:46:30 +11:00
Andrew Tridgell c8beddf1e4 HAL_ChibiOS: allow for includes in hwdef.dat files
this allows creation of derived boards
2018-01-15 11:46:02 +11:00
Andrew Tridgell 2929b3dbb1 HAL_ChibiOS: allow builds on systems with no SDIO 2018-01-15 11:46:02 +11:00
Andrew Tridgell 60a773d045 HAL_ChibiOS: removed duplicate defines 2018-01-15 11:46:02 +11:00
Andrew Tridgell 867e7ebf71 HAL_ChibiOS: auto-generate GPIO table from hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell fbe8166c71 HAL_ChibiOS: auto-generate AnalogIn pin table 2018-01-15 11:46:02 +11:00
Andrew Tridgell f14a847b97 HAL_ChibiOS: rename classes to remove 'Chibi'
it is redundent as all classes are in ChibiOS namespace, and makes the
code harder to read
2018-01-15 11:46:02 +11:00
Andrew Tridgell 25b68dc150 HAL_ChibiOS: switch base freq when needed
timers can't do below 123 Hz with a clock of 8MHz, so we need to
change clock frequency based on the target period
2018-01-15 11:46:02 +11:00
Andrew Tridgell 738d70ef02 HAL_ChibOS: fixed handling of disabled channels 2018-01-15 11:46:02 +11:00
Andrew Tridgell 6e4ef32628 HAL_ChibiOS: moved to generated loader script 2018-01-15 11:46:02 +11:00
Andrew Tridgell bae9469af7 HAL_ChibiOS: use a common makefile and board.c
allow for custom files per board if supplied, but don't require them
for every board
2018-01-15 11:46:02 +11:00
Andrew Tridgell c639708e22 HAL_ChibOS: auto-generate full PWM config
use PWM markers in hwdef.dat to mark each PWM channel
2018-01-15 11:46:02 +11:00
Andrew Tridgell daa9eec836 HAL_ChibiOS: auto-configure timer channels
allow for one marked PPMIN for input
2018-01-15 11:46:02 +11:00
Andrew Tridgell 960bc40ff3 HAL_ChibiOS: moved to a common mcuconf.h 2018-01-15 11:46:02 +11:00
Andrew Tridgell 48d2704cf4 HAL_ChibiOS: CS pins don't need to be a single SPI BUS
its possible to use a CS pin on different buses, so they should not
have a particular bus tag
2018-01-15 11:46:02 +11:00
Andrew Tridgell a554215576 HAL_ChibiOS: start to cope with not having I2C, SPI and UARTs 2018-01-15 11:46:02 +11:00
Andrew Tridgell 468cadca45 HAL_ChibiOS: auto-generate UART driver declarations 2018-01-15 11:46:02 +11:00
Andrew Tridgell 58796ff435 HAL_Chibios: moved SPI device tables to hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell d1f93cd66c HAL_Chibios: auto-generate I2C, SPI and UART device lists
this is less error prone and make a port faster as more information is
in hwdef.dat
2018-01-15 11:46:02 +11:00
Andrew Tridgell 41be81af34 HAL_Chibios: added hardware flow control for UARTs
implement RTS in software and CTS in hardware
2018-01-15 11:46:02 +11:00
Andrew Tridgell 9916a93919 HAL_ChibiOS: fixed I2C device list 2018-01-15 11:46:02 +11:00
Andrew Tridgell c3435e45c5 HAL_ChibiOS: initial port to FMUv4 2018-01-15 11:46:02 +11:00
Andrew Tridgell 4b5e617673 HAL_ChibiOS: added missing DMA table for STM32F405 2018-01-15 11:46:02 +11:00
Andrew Tridgell aa2175ec0c HAL_ChibiOS: show ADC1 channels in hwdef.h 2018-01-15 11:46:02 +11:00
Andrew Tridgell 5a7e2f75d1 HAL_ChibiOS: added ADC1_Map to STM32 tables 2018-01-15 11:46:02 +11:00
Andrew Tridgell 8b6bab7b17 HAL_Chibios: added ChibiOS HAL
this is based on initial work by Sid, reset here for easier merging
2018-01-15 11:46:02 +11:00