2024-02-05 11:43 AM - edited 2024-02-05 12:43 PM
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?
2024-02-05 11:51 AM
Try simplifying the length parameter. Ensure encoding is UTF-8.
2024-02-05 11:57 AM
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.
2024-02-05 12:04 PM
Perhaps "VERSION" is a used keyword or symbol?
2024-02-05 12:11 PM
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*/
2024-02-05 12:19 PM
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.
2024-02-05 12:33 PM - edited 2024-02-05 12:35 PM
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.
2024-02-05 12:40 PM - edited 2024-02-05 12:43 PM
2024-02-05 12:46 PM
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
}