cancel
Showing results for 
Search instead for 
Did you mean: 

Flash.id Synax Error Bug

Carrcl
Associate II

Hello, 

I am posting for help with an issue I am encountering when trying to build and run a project using STM32cubeIDE. 

The error message I get is: C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe:../STM32F769II_FLASH.ld:48: syntax error

 

However, when I go to the line of code in question, there does not seem to be any syntax errors. The line in question is bolded: 

MEMORY
{
FLASH (rx) : ORIGIN = 0x08008200, LENGTH = 2048K - 32K - 512 /* modified for 32K bootloader and version metadata*/
VERSION (rx) : ORIGIN = 0x08008000, LENGTH = 512 /* version info metadata at beginning of app region */
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
SRAM1 (xrw) : ORIGIN = 0x20020000, LENGTH = 368K
SRAM2 (xrw) : ORIGIN = 0x2007C000, LENGTH = 16K
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K
}

 

Does anyone know why this would be throwing a syntax error? 

8 REPLIES 8
TDK
Guru

Try simplifying the length parameter. Ensure encoding is UTF-8.

If you feel a post has answered your question, please click "Accept as Solution".
Carrcl
Associate II

Okay I went back and doubled checked, the error is actually the line that pertains to 'Version". I modified the post to highlight that line. As far as reducing the Length parameter, I still get the same error. 

Perhaps "VERSION" is a used keyword or symbol?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Never mind, it doesn't like this line

FLASH (rx) : ORIGIN = 0x08008200, LENGTH = 2048K - 32K - 512 /* modified for 32K bootloader and version metadata*/

This would work

FLASH (rx) : ORIGIN = 0x08008200, LENGTH = 2048K - 0x8200 /* modified for 32K bootloader and version metadata*/

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

After modifying what you suggested, I still run into the same problem. The error message is for: 

48 VERSION (rx) : ORIGIN = 0x08008000, LENGTH = 512. 

This is confusing because this does not seem like a syntax error to me.

TDK
Guru

Can you attach the actual file? Feel like something is being lost in translation here. Certainly a stray period is not allowed, nor is a "48" at the start of the line.

 

Nevermind, VERSION is a reserved keyword. @Tesla DeLorean was right.

If you feel a post has answered your question, please click "Accept as Solution".
Carrcl
Associate II

Sure! Ill attach the file to this comment and the main post. 

This worked on a donor H7 project using GNU/GCC and MAKE

/* Specify the memory areas */
MEMORY
{
FLASH (rx)      : ORIGIN = 0x8008200, LENGTH = 2048K-0x8200
XVERSION (rx)      : ORIGIN = 0x8008000, LENGTH = 512
DTCMRAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D1 (xrw)      : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw)      : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw)      : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw)      : ORIGIN = 0x00000000, LENGTH = 64K
}

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..