Skip to content

Commit

Permalink
Maple LD is not flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 4, 2021
1 parent dd9502f commit 25af85c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 25 deletions.
14 changes: 14 additions & 0 deletions buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MEMORY
{
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
rom (rx) : ORIGIN = 0x08005000, LENGTH = 256K - 20K - 4K
}

/* Provide memory region aliases for common.inc */
REGION_ALIAS("REGION_TEXT", rom);
REGION_ALIAS("REGION_DATA", ram);
REGION_ALIAS("REGION_BSS", ram);
REGION_ALIAS("REGION_RODATA", rom);

/* Let common.inc handle the real work. */
INCLUDE common.inc
14 changes: 14 additions & 0 deletions buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MEMORY
{
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
rom (rx) : ORIGIN = 0x08005000, LENGTH = 512K - 20K - 4K
}

/* Provide memory region aliases for common.inc */
REGION_ALIAS("REGION_TEXT", rom);
REGION_ALIAS("REGION_DATA", ram);
REGION_ALIAS("REGION_BSS", ram);
REGION_ALIAS("REGION_RODATA", rom);

/* Let common.inc handle the real work. */
INCLUDE common.inc
24 changes: 0 additions & 24 deletions buildroot/share/PlatformIO/ldscripts/custom.ld

This file was deleted.

4 changes: 3 additions & 1 deletion ini/stm32f1-maple.ini
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ build_flags = ${common_stm32f1.build_flags}
platform = ${common_stm32f1.platform}
extends = common_stm32f1
platform_packages = tool-stm32duino
board_build.ldscript = custom.ld
board_build.address = 0x08005000
board_build.offset = 0x5000
board_upload.maximum_size = 237568
Expand All @@ -385,14 +384,17 @@ lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED
platform = ${ZONESTAR_ZM3E_maple.platform}
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103RC
board_build.ldscript = ZONESTAR_ZM3E_256K.ld

[env:STM32F103VC_ZM3E4_USB_maple]
platform = ${ZONESTAR_ZM3E_maple.platform}
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103VC
board_build.ldscript = ZONESTAR_ZM3E_256K.ld

[env:STM32F103VE_ZM3E4V2_USB_maple]
platform = ${ZONESTAR_ZM3E_maple.platform}
extends = ZONESTAR_ZM3E_maple
board = genericSTM32F103VE
board_build.ldscript = ZONESTAR_ZM3E_512K.ld
board_upload.maximum_size = 499712

0 comments on commit 25af85c

Please sign in to comment.