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

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

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

942 Views
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 Kudos
2 Replies

810 Views
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

810 Views
demian91
Contributor III

Thanks Lukas it was useful.

0 Kudos