Dears,
I want to put the bootloader code into S32K144 FlexNVM which start address is 0x10000000 in KEIL IDE,then I changed the S32K144_64_FLASH.sct file as below:
#define m_text_start 0x00000410 change to: #define m_text_start 0x1000000
Error came out when building the KEIL project: ERROR L6202E:entry.o(.ARM.collect$$$$00000000) cannot be assigned to non-root region 'ER_m_text'.
Anyone who meet this kind of problem and how to fix it? Thanks
The whole 32K144_64_FLASH.sct content:
#if (defined(__flash_vector_table__))
#define __ram_vector_table_size__ 0x00000000
#else
#define __ram_vector_table_size__ 0x00000400
#endif
#define m_interrupts_start 0x00000000
#define m_interrupts_size 0x00000400
#define m_flash_config_start 0x00000400
#define m_flash_config_size 0x00000010
#define m_text_start 0x10000000 Orignal is 0x00000410
#define m_text_size 0x00004000
#define m_interrupts_ram_start 0x1FFF8000
#define m_interrupts_ram_size __ram_vector_table_size__
#define m_data_start 0x1FFF8000 + __ram_vector_table_size__
#define m_data_size 0x00008000 - __ram_vector_table_size__
#define m_data_2_start 0x20000000
#define m_data_2_size 0x00007000
/* Sizes */
#if (defined(__stack_size__))
#define Stack_Size __stack_size__
#else
#define Stack_Size 0x0400
#endif
#if (defined(__heap_size__))
#define Heap_Size __heap_size__
#else
#define Heap_Size 0x0400
#endif
LR_m_text m_interrupts_start m_text_start+m_text_size-m_interrupts_start { ; load region size_region
VECTOR_ROM m_interrupts_start m_interrupts_size { ; load address = execution address
startup_S32K1*.o (RESET +First)
}
#if (defined(__flash_vector_table__))
VECTOR_RAM m_interrupts_start EMPTY 0 {
}
#else
VECTOR_RAM m_interrupts_ram_start EMPTY m_interrupts_ram_size {
}
#endif
ER_m_flash_config m_flash_config_start FIXED m_flash_config_size { ; load address = execution address
* (FlashConfig)
}
ER_m_text_const m_text_start { ; load address = execution address
.ANY (+RO-DATA)
}
ER_m_text +0 m_text_size { ; load address = execution address
* (InRoot$$Sections)
.ANY (+RO)
}
RW_m_data m_data_start { ; RW data
.ANY (+RW-DATA)
}
RW_m_code +0 m_data_size { ; RW data
.ANY (.code_ram)
}
/* Custom Section Block that can be used to place data at absolute address. */
/* Use __attribute__((section (".customSection"))) to place data here. */
RW_m_custom_section m_data_2_start ALIGN 0x4 {
.ANY (.customSection) /* Keep section even if not referenced. */
}
RW_m_data_2 +0 m_data_2_size-Stack_Size-Heap_Size { ; RW data
.ANY (+ZI)
}
ARM_LIB_HEAP ((ImageLimit(RW_m_data_2) == m_data_2_start) ? m_data_2_start : +0) EMPTY Heap_Size { ; Heap region growing up
}
ARM_LIB_STACK m_data_2_start+m_data_2_size EMPTY -Stack_Size { ; Stack region growing down
}
}