Hello team,
How to add conditional statement in linker file for s32k144
Following is my memory sections
MEMORY
{
/* Flash */
m_interrupts (RX) : ORIGIN = 0x00002000, LENGTH = 0x00000400
m_flash_config (RX) : ORIGIN = 0x00002400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x00002410, LENGTH = 0x0007FBF0
/* SRAM_L */
m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00008000
/* SRAM_U */
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00007000
}
so here i wanted to add conditional statement in memory section part, so that we i compile for APP1 it should compile with above memory section and if i want to compile for APP2 it should compile with below memory section
MEMORY
{
/* Flash */
m_interrupts (RX) : ORIGIN = 0x00008000, LENGTH = 0x00000400
m_flash_config (RX) : ORIGIN = 0x00008400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x00009410, LENGTH = 0x0007FBF0
/* SRAM_L */
m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00008000
/* SRAM_U */
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00007000
}
Please guide us on same.