How to add directory name in linker script?

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

How to add directory name in linker script?

560 Views
caozj
Contributor I

Hi,

I am using MCUXpresso IDE to develop one project, currently we need relocat the flash to two area, i add one section in Debug.lg file as below:

 .BCodeArea : ALIGN(4)
 {
        *Driver_Code_Level*.o(.text .text*)
        *Driver_Code_Level*.o(.rodata .rodata.* .constdata .constdata.*)
        /* cannot linker successfully
        *Driver_Code_Level/*.o(.text .text*)
        *Driver_Code_Level/*.o(.rodata .rodata.* .constdata .constdata.*) 
         */     
 } > FLASH_AREA_B

 

Driver_Code_Level is one directory, It is failed when i add one ‘/’ in this section, Do u know how to add some charachar there to indicate that it is a directory?

0 Kudos
Reply
1 Reply

555 Views
bobpaddock
Senior Contributor III

 

'/' is the division operator in a linker script.

You could try '//' or if on Windows '\\'.

However I expect the answer is, it can't be done at the linker level.
The assembly of the object files (.o) and their paths take place at the Makefile level.

Here is the linker documentation:

https://sourceware.org/binutils/docs/ld/Scripts.html


0 Kudos
Reply