we migrated the project form s32 studio to keil for S32K144 controller.
After build in keil hex file size is not multiple of 256 and same we are checking in our own bootloader(.hex size multiple of 256)
But .hex file generated is not multiple of 256.
Below is the SCT file which is used for build
#! armclang --target=arm-arm-none-eabi -mcpu=cortex-m4 -xc -E/* * modified by ARM * * If __flash_vector_table__ is defined then interrupt vector table is not copied to RAM. * If __flash_vector_table__ is defined at link time then it must also be defined for * assembling startup_14*.s *//*** ###################################################################** Processor: S32K144 with 64 KB SRAM** Compiler: ARM Compiler**** Abstract:** Linker file for the ARM Compiler**** Copyright (c) 2015-2016 Freescale Semiconductor, Inc.** Copyright 2017 NXP** All rights reserved.**** NXP Confidential. This software is owned or controlled by NXP and may only be** used strictly in accordance with the applicable license terms. By expressly** accepting such terms or by downloading, installing, activating and/or otherwise** using the software, you are agreeing that you have read, and that you agree to** comply with and are bound by, such license terms. If you do not agree to be** bound by the applicable license terms, then you may not retain, install,** activate or otherwise use the software. The production use license in** Section 2.3 is expressly granted for this software.**** http: www.nxp.com**** ###################################################################*/
#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 0x00000410#define m_text_size 0x0007FBF0
#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 0x00000000+0xB000 0x0001FBF0 { ; load region size_region VECTOR_ROM 0x00000000+0xB000 0x00000400 { ; 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 0x00000400 + 0xB000 FIXED m_flash_config_size { ; load address = execution address * (FlashConfig) }
ER_m_text_const 0x00000410 + 0xB000 { ; load address = execution address .ANY (+RO-DATA) }
ER_m_text +0 0x0001FBF0 { ; 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 }}