Hi,
I am using a custom PCB using MSP430F5529 with a custom firmware using most of the 128kB flash memory. I am currently trying to migrate this project to PIO. I am running out of Memory because the second memory section at 0x10000 cannot be written only the the first memory section at 0x4400 seems to be available. I used build_flags = -Wl,-Map=output.map to create a memory map file (below). I think I somehow need to set the attributes xr for the far_rom. Maybe with some linker flags?
Name Origin Length Attributes
sfr 0x00000000 0x00000010
peripheral_8bit 0x00000010 0x000000f0
peripheral_16bit 0x00000100 0x00000100
bsl 0x00001000 0x00000800
infomem 0x00001800 0x00000200
infod 0x00001800 0x00000080
infoc 0x00001880 0x00000080
infob 0x00001900 0x00000080
infoa 0x00001980 0x00000080
usbram 0x00001c00 0x00000800 xw
ram 0x00002400 0x00002000 xw
rom 0x00004400 0x0000bb80 xr
vectors 0x0000ff80 0x00000080
far_rom 0x00010000 0x00014400
ram2 0x00000000 0x00000000 xw
ram_mirror 0x00000000 0x00000000 xw
signature 0x00000000 0x00000000
tinyram 0x00000000 0x00000000 xw
*default* 0x00000000 0xffffffff
I tried to set board.upload.maximum_size in platformio.ini (below) but couldnāt succeed it seems to be ignored.
[env:lpmsp430f5529]
platform = timsp430
board = lpmsp430f5529
board_build.f_cpu = 24000000L ; change MCU frequency to 24 MHz
board.upload.maximum_size= 131072 ; gets ignored!
debug_tool = mspdebug
build_type = release
build_flags =
-Wl,-Map=output.map
Processing lpmsp430f5529 (platform: timsp430; board: lpmsp430f5529)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/timsp430/lpmsp430f5529.html
PLATFORM: TI MSP430 (2.3.0) > TI LaunchPad MSP-EXP430F5529LP
HARDWARE: MSP430F5529 24MHz, 8KB RAM, 47KB Flash
DEBUG: Current (mspdebug) On-board (mspdebug)
PACKAGES:
- toolchain-timsp430 1.40603.210219 (4.6.3)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio\build\lpmsp430f5529\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 30.1% (used 2466 bytes from 8192 bytes)
Flash: [== ] 19.6% (used 9426 bytes from 48128 bytes)
=================================================================== [SUCCESS] Took 0.75 seconds ===================================================================
Any help on this is would be very welcome!