Skip to content

Commit 4f0ce2f

Browse files
committed
Maple LD is not flexible
1 parent dd9502f commit 4f0ce2f

File tree

5 files changed

+45
-25
lines changed

5 files changed

+45
-25
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MEMORY
2+
{
3+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
4+
rom (rx) : ORIGIN = 0x08005000, LENGTH = 256K -20K - 4K
5+
}
6+
7+
/* Provide memory region aliases for common.inc */
8+
REGION_ALIAS("REGION_TEXT", rom);
9+
REGION_ALIAS("REGION_DATA", ram);
10+
REGION_ALIAS("REGION_BSS", ram);
11+
REGION_ALIAS("REGION_RODATA", rom);
12+
13+
/* Let common.inc handle the real work. */
14+
INCLUDE common.inc
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MEMORY
2+
{
3+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
4+
rom (rx) : ORIGIN = 0x08005000, LENGTH = 256K - 20K - 4K
5+
}
6+
7+
/* Provide memory region aliases for common.inc */
8+
REGION_ALIAS("REGION_TEXT", rom);
9+
REGION_ALIAS("REGION_DATA", ram);
10+
REGION_ALIAS("REGION_BSS", ram);
11+
REGION_ALIAS("REGION_RODATA", rom);
12+
13+
/* Let common.inc handle the real work. */
14+
INCLUDE common.inc
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
MEMORY
2+
{
3+
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40
4+
rom (rx) : ORIGIN = 0x08005000, LENGTH = 512K - 20K - 4K
5+
}
6+
7+
/* Provide memory region aliases for common.inc */
8+
REGION_ALIAS("REGION_TEXT", rom);
9+
REGION_ALIAS("REGION_DATA", ram);
10+
REGION_ALIAS("REGION_BSS", ram);
11+
REGION_ALIAS("REGION_RODATA", rom);
12+
13+
/* Let common.inc handle the real work. */
14+
INCLUDE common.inc

buildroot/share/PlatformIO/ldscripts/custom.ld

Lines changed: 0 additions & 24 deletions
This file was deleted.

ini/stm32f1-maple.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ build_flags = ${common_stm32f1.build_flags}
369369
platform = ${common_stm32f1.platform}
370370
extends = common_stm32f1
371371
platform_packages = tool-stm32duino
372-
board_build.ldscript = custom.ld
373372
board_build.address = 0x08005000
374373
board_build.offset = 0x5000
375374
board_upload.maximum_size = 237568
@@ -385,14 +384,17 @@ lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED
385384
platform = ${ZONESTAR_ZM3E_maple.platform}
386385
extends = ZONESTAR_ZM3E_maple
387386
board = genericSTM32F103RC
387+
board_build.ldscript = ZONESTAR_ZM3E4V2.ld
388388

389389
[env:STM32F103VC_ZM3E4_USB_maple]
390390
platform = ${ZONESTAR_ZM3E_maple.platform}
391391
extends = ZONESTAR_ZM3E_maple
392392
board = genericSTM32F103VC
393+
board_build.ldscript = ZONESTAR_ZM3E4.ld
393394

394395
[env:STM32F103VE_ZM3E4V2_USB_maple]
395396
platform = ${ZONESTAR_ZM3E_maple.platform}
396397
extends = ZONESTAR_ZM3E_maple
397398
board = genericSTM32F103VE
399+
board_build.ldscript = ZONESTAR_ZM3E4V2.ld
398400
board_upload.maximum_size = 499712

0 commit comments

Comments
 (0)