Skip to content

Commit

Permalink
h7 linker script for bootloader
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Aug 27, 2023
1 parent 0375ea3 commit 9913d85
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions firmware/hw_layer/ports/stm32/stm32h7/STM32H743xI.ld
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
limitations under the License.
*/

/* change address & length if bootloader */
bootloader_size = 32k;
flash_start = 0x08000000 + (DEFINED(HAS_BOOTLOADER) ? bootloader_size : 0);
flash_size = DEFINED(IS_BOOTLOADER) ? bootloader_size : 1M;
image_size = DEFINED(HAS_BOOTLOADER) ? (flash_size - bootloader_size) : flash_size;

/* OpenBLT <-> main FW shared area */
_OpenBLT_Shared_Params_Size = DEFINED(HAS_BOOTLOADER) || DEFINED(IS_BOOTLOADER) ? 16 : 0;

/*
* STM32H743xI generic setup.
*
Expand All @@ -27,15 +36,17 @@
*/
MEMORY
{
flash0 (rx) : org = 0x08000000, len = 2M /* Flash bank1+bank2 */
flash1 (rx) : org = 0x08000000, len = 1M /* Flash bank 1 */
flash2 (rx) : org = 0x08100000, len = 1M /* Flash bank 2 */
bl : org = 0x08000000, len = bootloader_size
flash0 (rx) : org = flash_start, len = flash_size /* Flash bank1+bank2 */
flash1 (rx) : org = flash_start, len = flash_size /* Flash bank 1 (code) */
flash2 (rx) : org = 0x08100000, len = 1M /* Flash bank 2 (engine config) */
flash3 (rx) : org = 0x00000000, len = 0
flash4 (rx) : org = 0x00000000, len = 0
flash5 (rx) : org = 0x00000000, len = 0
flash6 (rx) : org = 0x00000000, len = 0
flash7 (rx) : org = 0x00000000, len = 0
ram0 (wx) : org = 0x24000000, len = 512k /* AXI SRAM */
shared : org = 0x24000000, len = _OpenBLT_Shared_Params_Size
ram0 (wx) : org = 0x24000000 + _OpenBLT_Shared_Params_Size, len = 512k - _OpenBLT_Shared_Params_Size /* AXI SRAM */
ram1 (wx) : org = 0x30000000, len = 256k /* AHB SRAM1+SRAM2 */
ram2 (wx) : org = 0x30000000, len = 288k /* AHB SRAM1+SRAM2+SRAM3 */
ram3 (wx) : org = 0x30040000, len = 32k /* AHB SRAM3 */
Expand Down

0 comments on commit 9913d85

Please sign in to comment.