MCUXpresso IDE -> Automatic Linker script -> assign folder to section

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCUXpresso IDE -> Automatic Linker script -> assign folder to section

Jump to solution
935 Views
jespermadsen
Contributor III

I'm compiling my /src_app folder to Flash2 section in the flash.

What I did is

Added following flash sections:
* MFlash32 | Flash | 0x0 | size=0x1ffc
* Flash_00 | Flash2 | 0x1ffc | size=0x4
* Flash_01 | Flash3 | 0x2000 | size=0x5ffc
* Flash_02 | Flash4 | 0x7ffc | size=0x4
* RamLoc8 | RAM | 0x10000000 | size=0x2000

Added  "Extra Managed Linker Script input sections:
* Input section description | Region | Section Type
* */src_app/*.o (.text .text*) | Flash2 | .text

But the linker file comes up with two errors.

Description Resource Path Location Type
no viable alternative at input '/' LPC11A14_bootloader_Debug.ld /LPC11A14_bootloader/Debug line: 38 /LPC11A14_bootloader/Debug/LPC11A14_bootloader_Debug.ld GNU Linker Script Problem
no viable alternative at input '*' LPC11A14_bootloader_Debug.ld /LPC11A14_bootloader/Debug line: 38 /LPC11A14_bootloader/Debug/LPC11A14_bootloader_Debug.ld GNU Linker Script Problem

GCC can handle it, but MCUXpresso makes the errors.

So what should I do?

 

Best regards

Jesper

0 Kudos
Reply
1 Solution
923 Views
lpcxpresso_supp
NXP Employee
NXP Employee

See section 18.7 from User Guide. There's an MCUXPresso IDE linker script parser used for nicer formatting. In your case, the parser fails to correctly parse the ld file but, given that the linker doesn't find anything wrong, this means it's a problem with our parser.

Please attach the full linker script file and we'll look into this.

You also have the option to disable linker script editor awareness - see User Guide.

Regards,
MCUXpresso IDE Support

View solution in original post

0 Kudos
Reply
2 Replies
913 Views
jespermadsen
Contributor III

Thanks for a quick responce here is my linker script file.

The error occurs at line 22, in this version.

Description Resource Path Location Type
no viable alternative at input '/' Bootloader_test_Debug.ld /Bootloader_test/Debug line: 22 /Bootloader_test/Debug/Bootloader_test_Debug.ld GNU Linker Script Problem
no viable alternative at input '*' Bootloader_test_Debug.ld /Bootloader_test/Debug line: 22 /Bootloader_test/Debug/Bootloader_test_Debug.ld GNU Linker Script Problem

Maybe the error don't occur until you open the file, but then it will remove the extra flash sections.

Best regards

Jesper M Madsen

 

0 Kudos
Reply
924 Views
lpcxpresso_supp
NXP Employee
NXP Employee

See section 18.7 from User Guide. There's an MCUXPresso IDE linker script parser used for nicer formatting. In your case, the parser fails to correctly parse the ld file but, given that the linker doesn't find anything wrong, this means it's a problem with our parser.

Please attach the full linker script file and we'll look into this.

You also have the option to disable linker script editor awareness - see User Guide.

Regards,
MCUXpresso IDE Support

0 Kudos
Reply