S32DS - GCC Linker - Is possible set an entire file like a section

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

S32DS - GCC Linker - Is possible set an entire file like a section

1,805件の閲覧回数
demian91
Contributor III

Hi everyone im trying to locate many funcitions in a sector of 64K in MPC5746R:

MEMORY
{
   ...

   m_text_boot : org = 0x00FC0000, len = 64K

   ...

}

SECTIONS
{

   ...

   .text_boot :
   {
          *(.text_boot.startup_BOOT)
          *(.SW_Generales_BOOT)
          *(.text_boot)
          *(.text_boot.*)
   } > m_text_boot

   ...

}

I have for example a file "FW_SIUL2_BOOT.c" where all the functions are going to be in section of m_text_boot. I understand that there is no #pragma but is possible that i can allocate all code of this file instead like INCLUDE(FW_SIUL2_BOOT.o). Instaed to write for each function:

__attribute__((section (".text_boot"))) void Function1()

__attribute__((section (".text_boot"))) void Function2()

...

0 件の賞賛
返信
2 返答(返信)

1,673件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Demian,

I think that this

define linker section for entire file 

or this

https://community.nxp.com/thread/331043 

could help.

Regards,

Lukas

1,673件の閲覧回数
demian91
Contributor III

Thanks Lukas it was useful.

0 件の賞賛
返信