How to add directory name in linker script?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to add directory name in linker script?

563 次查看
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 回复

558 次查看
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 项奖励
回复