mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
EXST - Use the .bin file as the source for the hex file.
* This bypasses the problem introduced when the .data section was moved from RAM to DTCM_RAM. * This also ensures that the hash in the .hex file will be valid when the hex is flashed to a NAND chip as the hash is generated from the .bin file content. If the hex contains gaps between sections and the gaps are erased on the NAND flash then erased sectors are full of 0xFF, not 0x00, which will mean the computed hash won't match. EXST - Add note regarding currently supported bootloader requirements regarding the CODE_RAM address. EXST - Fix make 'dirty' file issue. When `make` is run twice, the TARGET_BIN is recreated incorrectly. Root cause was that objcopy actually modifies the INPUT file when no output file is specified, even when the operation is to extract a section from the input file... EXST - Improve messaging when generating EXST bin files. This should help with understanding of the exact operations required for EXST bin file generation. Added warning about hard coded start address.
This commit is contained in:
parent
41a0b59380
commit
a76e0bccfc
5 changed files with 20 additions and 12 deletions
|
@ -35,7 +35,8 @@ ENTRY(Reset_Handler)
|
|||
|
||||
For H7 EXST (External Storage) targets a binary is built that is placed on an external device.
|
||||
The bootloader will then copy this entire binary to RAM, at the CODE_RAM address. The bootloader
|
||||
then executes code at the CODE_RAM address.
|
||||
then executes code at the CODE_RAM address. The address of CODE_RAM is fixed to 0x24010000
|
||||
and must not be changed.
|
||||
|
||||
Currently, this is inefficient as there are two copies of some sections in RAM. e.g. .tcm_code.
|
||||
|
||||
|
@ -59,7 +60,7 @@ MEMORY
|
|||
ITCM_RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
|
||||
DTCM_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
|
||||
RAM (rwx) : ORIGIN = 0x24000000, LENGTH = 64K
|
||||
CODE_RAM (rx) : ORIGIN = 0x24010000, LENGTH = 448K - _exst_hash_size
|
||||
CODE_RAM (rx) : ORIGIN = 0x24010000, LENGTH = 448K - _exst_hash_size /* hard coded start address, as required by SPRACINGH7 boot loader, don't change! */
|
||||
EXST_HASH (rx) : ORIGIN = 0x24010000 + LENGTH(CODE_RAM), LENGTH = _exst_hash_size
|
||||
|
||||
D2_RAM (rwx) : ORIGIN = 0x30000000, LENGTH = 256K /* SRAM1 + SRAM2 */
|
||||
|
|
|
@ -5,8 +5,7 @@ HSE_VALUE = 8000000
|
|||
FEATURES += VCP ONBOARDFLASH SDCARD_SDIO
|
||||
|
||||
EXST = yes
|
||||
# flash address 0x97CE0000 - code_ram address (0x24010000) = 0x73CD0000
|
||||
EXST_ADJUST_VMA = 0x73CD0000
|
||||
EXST_ADJUST_VMA = 0x97CE0000
|
||||
|
||||
|
||||
TARGET_SRC += \
|
||||
|
|
|
@ -3,8 +3,7 @@ H750xB_TARGETS += $(TARGET)
|
|||
HSE_VALUE = 8000000
|
||||
|
||||
EXST = yes
|
||||
# flash address 0x97CE0000 - code_ram address (0x24010000) = 0x73CD0000
|
||||
EXST_ADJUST_VMA = 0x73CD0000
|
||||
EXST_ADJUST_VMA = 0x97CE0000
|
||||
|
||||
FEATURES += VCP ONBOARDFLASH
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@ H750xB_TARGETS += $(TARGET)
|
|||
HSE_VALUE = 8000000
|
||||
|
||||
EXST = yes
|
||||
# flash address 0x97CE0000 - code_ram address (0x24010000) = 0x73CD0000
|
||||
EXST_ADJUST_VMA = 0x73CD0000
|
||||
EXST_ADJUST_VMA = 0x97CE0000
|
||||
|
||||
FEATURES += VCP ONBOARDFLASH SDCARD_SDIO
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue