1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 11:29:58 +03:00
betaflight/docs
Dominic Clifton 0632eeb934 Support compilation of EXST (EXTERNAL STORAGE) targets
- 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.
2019-06-07 09:14:49 +12:00
..
API Fix documentation for MSP_MODE_RANGES_EXTRA 2019-02-17 00:41:39 -06:00
assets Updating README.md and the pull request template for the feature freeze / STM32F3 retirement. 2019-02-28 09:23:31 +13:00
boards Adding board description file, and correcting gyro. 2019-04-26 22:30:09 +10:00
CLI corrected .md syntax Documentation for <gyro_offset_yaw> 2018-01-26 10:05:38 +01:00
development [Docs] Further update Building in Windows 2019-04-18 14:20:48 +02:00
osd_images Use glyphs from default.mcm 2018-07-31 20:08:02 +01:00
Release Notes Added release notes for 4.0. 2019-04-29 22:28:42 +12:00
Screenshots CF/BF - Add EasyRaceLapTimer transponder provider 2018-01-08 12:19:35 +13:00
Upgrading add some PR links in Upgrading from 3.2 to 3.3 2018-10-11 15:21:29 +02:00
Wiring Moved board docs into their own folder. Also fixed file permissions. 2018-01-18 17:55:38 +13:00
Battery.md from the pr 2019-04-16 18:31:09 -04:00
Blackbox.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Boards.md Moved board docs into their own folder. Also fixed file permissions. 2018-01-18 17:55:38 +13:00
Buzzer.md Fix markdown links to filenames with spaces 2018-01-08 12:19:35 +13:00
Cli.md VTX improvements from iNav. 2018-08-20 23:26:57 +12:00
Configuration.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Controls.md Merge pull request #3074 from cleanflight/fix-controls-broken-links 2019-01-11 03:33:48 +13:00
Customized Version.md Updated path in documentation for customised versions. 2018-10-07 13:04:40 +13:00
Display.md Moved board docs into their own folder. Also fixed file permissions. 2018-01-18 17:55:38 +13:00
EXST bootloader.md Support compilation of EXST (EXTERNAL STORAGE) targets 2019-06-07 09:14:49 +12:00
Failsafe.md Failsafe switch choosable behavior #5994 2018-05-29 23:28:09 +03:00
FrSky SPI RX.md Update FrSky SPI RX.md 2019-03-26 08:52:16 +02:00
Getting Started.md Fix markdown links to filenames with spaces 2018-01-08 12:19:35 +13:00
Gps.md Add support for the ST LIS3MDL 3-Axis Magnetometer per #6437 2018-09-16 19:56:13 -07:00
Gtune.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Inflight Adjustments.md Fix doc typos 2018-05-16 22:13:51 +01:00
Installation.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Introduction.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
LedStrip.md Add LED profile feature - 4278 2019-01-19 20:23:03 +10:00
Migrating from baseflight.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Mixer.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Modes.md Fixed documentation for modes. 2018-07-10 20:57:05 +12:00
Oneshot.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
OSD Profiles.md Add OSD Profile feature - issue 4155 2018-12-01 17:51:38 +10:00
osd.md Tidy up symbols.h and add docs for osd font 2018-07-31 19:35:01 +01:00
override.css Moved board docs into their own folder. Also fixed file permissions. 2018-01-18 17:55:38 +13:00
PID tuning.md Formatting 2018-01-08 12:20:23 +13:00
Profiles.md Update Profiles.md 2019-02-21 17:23:28 -08:00
Rssi.md If RSSI Channel is set to Disabled when using S.Bus then generate RSS… (#5090) 2018-03-21 13:36:23 +13:00
Rx.md Add Jeti Ex Bus receiver description 2018-10-31 10:05:43 +01:00
Safety.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Serial.md Support programming of Arduino devices in serial passthrough mode (#5129) 2018-03-21 23:17:31 +13:00
Sonar.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Spektrum bind.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
Telemetry.md document telemetry sensor from #7236 2019-01-08 10:16:39 -05:00
Transponder.md CF/BF - Add EasyRaceLapTimer transponder provider 2018-01-08 12:19:35 +13:00
USB Flashing.md CF - restore docs folder from master_v1.x 2018-01-08 12:19:35 +13:00
VTX.md CF/BF - Port VTX button from CF v1.x. 2018-01-08 12:19:35 +13:00