The H730 is a value-line CPU, similar to the H723/H725, but with only
128kb RAM.
The FC firmware code is designed to RUN from external flash in MEMORY
MAPPED mode, via OctoSPI. Use of ITCM/DTCM advised for core loops, like
PID control.
A bootloader is required to enable memory-mapped mode and jump to the
firmware, similar to how EXST bootloader system works.
Config storage is not part of this commit and is a problem when using a
single flash chip in memory mapped mode because the CPU can't run
read/write routines from the flash chip while writing to the flash chip.
Until flash read/write routines are updated the solution requires either
a second flash chip on an SPI interface, or the use of an SD card for
config storage.
Additional commits will support read/write of config to the code/data
storage flash chip to enable cheap and space efficient single-flash-chip
FC solutions.
Squashed commits:
STM32H730 - Workaround issue with 2GB `.elf` files being created.
STM32H730 - Reduce firmware size to 1MB.
STM32H730 - Add USB HS configuration.
STM32H730 - Add ADC internal tag mappings.
STM32H730 - Update all ADC mappings based on the referenced ST
documentation. Add the VBAT channels.
STM32H730 - Fix DMA continuous requests.
STM32H730 - Fix ADC_INTERNAL confusion.
STM32H730/G4 - Disambiguate use of ADC_CHANNEL_INTERNAL_FIRST_ID.
STM32H730 - Fix documentation reference.
STM32H730 - Add DMA request mapping for ADC3.
STM32H730 - Explicitly set the ADC clock.
STM32H730 - Configure PLL2 speeds correctly.
* Tested with Ultrafast 64GB SanDisk SDXC card.
STM32H730 - Use 50Mhz clock for SDXC cards.
* Tested with SanDisk Ultra 64GB. 100Mhz clock gave CRC errors.
STM32H730 - Ensure USB has a lower NVIC priority than the SDMMC card
reads.
If it's higher, 0, then the SDMMC's DMA IRQ handler doesn't get called
when handing USB MSC storage reads.
STM32H730 - Support CPU name in CLI.
STM32H730 - Rebuild when linker scripts changes.
Call targetConfiguration() once before config is loaded and again afterwards in case the config needs to be changed to load from SD card etc
Drop SPI clock during binding
Remove debug
Add per device SPI DMA enable
Fix sdioPinConfigure() declaration warning
Reduce clock speed during SPI RX initialisation
First pass at GHST driver including low-latency control, and basic telemetry.
Fix Ghost channel scaling
Use ghstChannelData instead of rxRuntimeState->channelData
Integrate PR feedback
Primarily de-tab and a few cosmetic changes.
Keep Travis CI happy
Removed unused function
Rework ghost driver to reduce time in ISR, move processing
As requested in PR review.
Fixed issue in telemetry driver, mAh consumed is transmitted as units of 10mAh, not 1mAh.
Resolve Packet Collision Issue with GHST
Send telemetry packets only within a well defined time slot after an incoming Rx packet.
Remove unnecessary comment
rxRefreshRate doesn't need to be dynamic.
Ghost - Remove special case from scheduler
No need to reschedule telemetry for the Ghost protocol.
Eliminated the duplicated MSC functions in the architecture specific files and moved to a shared common.
Improved the activity indicating LED and made it consistent between onboard flash and sd card mass storage mode.
F405 working (OMNIBUSF4SD target)
F411 not tested
F722 working, needs testing (OMNINXT7 target)
F74x not working
NOX target (temporary)
bb_dshot with telemetry on f4
bbshot f7 targets and fix crash due to missing debug pins
remove empty line
add empty lines
remove OMNIBUSF4 specific debug pins
add missing comma
add missing comma
Use separate bbTimerHardware array to fix unified targets
eliminate now unneeded timerGetByUsage
don't duplicate timer1 def
Add auto mode, rename dshot_bbshot to dshot_bitbang
remove newline
renamve various files
various changes to address feedback
address feedback
address feedback
add pacer timers to timer show
don't disable telemetry if dshot_bitbang is on or auto
Address feedback, add faster decode implementation based on bit banding, modify dma parameters to reduce required memory bandwidth on half
remove debug output
remove NOINLINE
Protect gpio direction change with critical sections
FIXWS_SAVE_INDEX
add static back in
no forward typedef
address review feedback
disallow proshot1000 with dshot bitbang
Extracted and plumbed up 'dbgPin'.
- Initial
- Adjust load address of EXST firmware.
- Add helper script to pad an EXST binary to the expected size.
Padded firmware currently required due to a bug in the flash/dfu code
which causes anything less than a flash page size to be truncated when
uploading new firmware via the bootloader DFU.
- Minor linker script cleanups.
- STM32H7.mk change hardcoded TARGET_FLASH (384) to FIRMWARE_SIZE
- Delete unused configuration section entries from linker
scripts.
- Increase EXST firmware size to 448K.
It turns out 384K wasn't enough for a feature-complete firmware.
- Update pad-exst.sh to use 448K by default.
- Move the EXST file generation to the makefile.
[EXST] Embed firmware hash in ELF
- Add debug marker at end of CODE_RAM section.
It was found when transferring firmware to the H7 RAM via a BMP probe
using the 'gdb load' command, that the last few bytes were not
transferred, this debug marker is present to ensure all needed parts of
the firmware are present.
Example memory view of corrupted bytes at end of transfer:
0x2407DFAE DEB90000 DEB9DEB9 DEB9DEB9 DEB9DEB9 ..¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ
0x2407DFBE 000000B9 00000000 00000000 00000000 ¹...............
should be:
0x2407DFAE DEB9DEB9 DEB9DEB9 DEB9DEB9 DEB9DEB9 ¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ¹Þ
0x2407DFBE 00000000 00000000 00000000 00000000 ................
- Remove debug marker in EXST firmware.
STM32H750_EXST - Provide space for empty hash.
* Bootloader will run firmware if hash is empty, without re-verifying
RAM content against hash.
* CODE_RAM always shows as 100% usage.
STM32H750_EXST - Use a specific ELF section for a hash.
Two benefits:
1) CODE_RAM no-longer shows 100% full, since it is no-longer
padded/filled.
2) Prepares the code so that objcopy can be used to inject the hash
into the ELF.
STM32H750_EXST - Patch MD5 into ELF.
Process is now as follows.
* Binary generated (via make target dependency) so there is something to
hash.
* Binary copied (and padded).
* MD5 Hash computed.
* xxd patch file generated from hash.
* xxd hash patch applied to copy of binary at correct address.
* elf .exst_hash section dumped.
* hash injected into into dumped section.
* elf .exst_hash section updated with updated dumped section.
Replace EXST with USE_EXST.
Add documentation for the EXST firmware format.
Add table formatting to EXST documentation.
Update bootloader block.
Update H750 EXST linker script to use block format 0x00.
Use .exst.elf and .exst.bin on the exst files.
Add 'no checksum' to list of checksum hash methods.
Update EXST build system so it generates the following sets of files
obj/main/betaflight_TARGET.elf
obj/main/betaflight_TARGET.map
obj/main/betaflight_TARGET_EXST.elf
obj/betaflight_VERSION_TARGET.bin
obj/betaflight_VERSION_TARGET.bin.md5
obj/betaflight_VERSION_TARGET_EXST.bin
Update EXST build system to be more user-friendly.
* user-flashable files are generated in the normal place.
* Intermediate files are generated in `obj/main/...`
* Removes the `exst` goal.
* Adds .hex generation for EXST builds based on the patched .elf.
To build EXST targets, simply use `make TARGET=x` as normal and flash
the resulting `.hex/.bin` files rather than the .exst.bin file.
Developers can use either the `.elf` or patched `_EXST.elf` file as is
appropriate for their needs.
EXST documentation updated to match changes to build system.