How to add directory name in linker script?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to add directory name in linker script?

561件の閲覧回数
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 件の賞賛
返信
1 返信

556件の閲覧回数
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 件の賞賛
返信