Skip to content

Commit a08409f

Browse files
committed
[RAK] Use linker script preprocess
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 9e87ab0 commit a08409f

File tree

3 files changed

+17
-208
lines changed

3 files changed

+17
-208
lines changed

boards.txt

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ menu.xusb=USB speed (if available)
99
menu.opt=Optimize
1010
menu.rtlib=C Runtime Library
1111
menu.upload_method=Upload method
12-
menu.flash=Flash Memory Size
13-
menu.ram=RAM Size
1412

1513
################################################################################
1614
# Nucleo 144 boards
@@ -729,26 +727,25 @@ RAK.name=RAKWireless
729727
RAK.build.vid=0x0483
730728
RAK.build.core=arduino
731729
RAK.build.board=RAK
730+
RAK.build.mcu=cortex-m3
731+
RAK.build.series=STM32L1xx
732+
RAK.build.cmsis_lib_gcc=arm_cortexM3l_math
732733
RAK.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial}
733734

734735
# RAK811_TRACKER board
735-
RAK.menu.pnum.RAK811_TRACKER=RAK811 LoRa Tracker
736+
RAK.menu.pnum.RAK811_TRACKER=RAK811 LoRa Tracker (16kb RAM)
737+
RAK.menu.pnum.RAK811_TRACKER.upload.maximum_data_size=16384
736738
RAK.menu.pnum.RAK811_TRACKER.upload.maximum_size=131072
737-
RAK.menu.pnum.RAK811_TRACKER.build.mcu=cortex-m3
738739
RAK.menu.pnum.RAK811_TRACKER.build.board=RAK811_TRACKER
739-
RAK.menu.pnum.RAK811_TRACKER.build.series=STM32L1xx
740740
RAK.menu.pnum.RAK811_TRACKER.build.product_line=STM32L151xB
741741
RAK.menu.pnum.RAK811_TRACKER.build.variant=RAK811_TRACKER
742-
RAK.menu.pnum.RAK811_TRACKER.build.cmsis_lib_gcc=arm_cortexM3l_math
743-
744-
RAK.menu.ram.xB=16Kb (default)
745-
RAK.menu.ram.xB.upload.maximum_data_size=16384
746-
RAK.menu.ram.xB.build.ldscript=ldscript.ld
747-
RAK.menu.ram.xB.build.product_line=STM32L151xB
748-
RAK.menu.ram.xBA=32Kb
749-
RAK.menu.ram.xBA.upload.maximum_data_size=32768
750-
RAK.menu.ram.xBA.build.ldscript=ldscript_xba.ld
751-
RAK.menu.ram.xBA.build.product_line=STM32L151xBA
742+
743+
RAK.menu.pnum.RAK811_TRACKERA=RAK811 LoRa Tracker (32kb RAM)
744+
RAK.menu.pnum.RAK811_TRACKERA.upload.maximum_data_size=32768
745+
RAK.menu.pnum.RAK811_TRACKERA.upload.maximum_size=131072
746+
RAK.menu.pnum.RAK811_TRACKERA.build.board=RAK811_TRACKERA
747+
RAK.menu.pnum.RAK811_TRACKERA.build.product_line=STM32L151xBA
748+
RAK.menu.pnum.RAK811_TRACKERA.build.variant=RAK811_TRACKER
752749

753750
# Upload menu
754751
RAK.menu.upload_method.serialMethod=Serial

variants/RAK811_TRACKER/ldscript.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
** File : LinkerScript.ld
66
**
7-
** Abstract : Linker script for STM32L151CBTx Device with
8-
** 128KByte FLASH, 16KByte RAM
7+
** Abstract : Linker script for STM32L151CBTx(A) Device with
8+
** 128KByte FLASH, 16/32KByte RAM
99
**
1010
** Set heap size, stack size and stack location according
1111
** to application requirements.
@@ -52,16 +52,16 @@
5252
ENTRY(Reset_Handler)
5353

5454
/* Highest address of the user mode stack */
55-
_estack = 0x20004000; /* end of RAM */
55+
_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */
5656
/* Generate a link error if heap and stack don't fit into RAM */
5757
_Min_Heap_Size = 0x200; /* required amount of heap */
5858
_Min_Stack_Size = 0x400; /* required amount of stack */
5959

6060
/* Specify the memory areas */
6161
MEMORY
6262
{
63-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
64-
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
63+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
64+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = LD_MAX_SIZE
6565
}
6666

6767
/* Define output sections */

variants/RAK811_TRACKER/ldscript_xba.ld

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

0 commit comments

Comments
 (0)