This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2634: What is the meaning of the cannot be loaded and run on a target system?

Part Number: AM2634

Hi, Supporter,

We are using AM2634/AUTOSAR platform, and build our system using AUTOSAR vendor makefile.

I found that there is build log which is "warning: output file "output\Application.elf" cannot be loaded and run on a target system"

Actually, elf file is created and it can run on the RAM(in DEV mode).

But when I tried to download the image to External flash using QSPI and change the mode to BOOT mode. In case of this it can not jump to the application start address(_start0=0x70040000).

Due to this reason, I suspect below log. Could you let me know what is the problem?

Actually, we have legacy code with build CCS tool. And it can run in Dev mode and also BOOT mode.

warning: entry-point symbol other than "_c_int00" specified: "_start0"
warning: relocation to symbol "_default_exception_handler_0" overflowed; the
31-bit relocated address 0x380000c4 is too large to encode in the 25-bit
signed PC-Relative field (type = 'R_ARM_JUMP24' (29), file =
"objs\AM263x\crt0.o", offset = 0x00000004, section =
".exception_vectors_0")
warning: relocation to symbol "_default_exception_handler_0" overflowed; the
31-bit relocated address 0x380000c0 is too large to encode in the 25-bit
signed PC-Relative field (type = 'R_ARM_JUMP24' (29), file =
"objs\AM263x\crt0.o", offset = 0x0000000c, section =
".exception_vectors_0")
warning: relocation to symbol "_default_exception_handler_0" overflowed; the
31-bit relocated address 0x380000be is too large to encode in the 25-bit
signed PC-Relative field (type = 'R_ARM_JUMP24' (29), file =
"objs\AM263x\crt0.o", offset = 0x00000010, section =
".exception_vectors_0")
warning: relocation to symbol "_default_exception_handler_0" overflowed; the
31-bit relocated address 0x380000bc is too large to encode in the 25-bit
signed PC-Relative field (type = 'R_ARM_JUMP24' (29), file =
"objs\AM263x\crt0.o", offset = 0x00000014, section =
".exception_vectors_0")
warning: relocation to symbol "_default_exception_handler_0" overflowed; the
31-bit relocated address 0x380000ba is too large to encode in the 25-bit
signed PC-Relative field (type = 'R_ARM_JUMP24' (29), file =
"objs\AM263x\crt0.o", offset = 0x00000018, section =
".exception_vectors_0")
warning: relocation to symbol "_default_exception_handler_0" overflowed; the
31-bit relocated address 0x380000b8 is too large to encode in the 25-bit
signed PC-Relative field (type = 'R_ARM_JUMP24' (29), file =
"objs\AM263x\crt0.o", offset = 0x0000001c, section =
".exception_vectors_0")
warning: output file "output\Application.elf" cannot be loaded and run on a target system

  • Hi ,

    Can you share your application linker command file?

    Thanks And Regards,

    Sunil

  • Hi,
    We can't upload file.
    Please see the below script.
    /**
      * Link command file for AM263x main domain R5 cores
      *
    **/

    /* Linker Settings */
    --retain="*(.exception_vectors)"  /* Not using the boot.asm from ti-arm */
    --retain="*(.crt0_start)"
    --entry_point=_start0

    /* Memory Map */
    MEMORY
    {
        ATCM             (RWX) : origin=0x00000000 length=0x800    /* ATCM (R5F view)     */
        STARTUP_CODE     (RWX) : origin=0x70040000 length=0x800    /*  SRAM             */
        RAM              (RWX) : origin=0x70040800 length=0x85000  /*  SRAM             */
        ROM              (RWX) : origin=0x700C5800 length=0x200000 /*  SRAM             */
        PERIPHERAL_SPACE (RW)  : origin=0x30E00000 length=0x8000   /* 32 KB Spinlock      */
        /* MSS mailbox memory is used as shared memory, we dont use bottom 32*12 bytes, since its used as SW queue by ipc_notify */
        RTOS_NORTOS_IPC_SHM_MEM (RW) : ORIGIN = 0x72000000, LENGTH = 0x3E80
    }


    /* Allowed section sizes */
    #define OS_SIZE_32B     32
    #define OS_SIZE_64B     64
    #define OS_SIZE_128B    128
    #define OS_SIZE_256B    256
    #define OS_SIZE_512B    512
    #define OS_SIZE_1KB     1024
    #define OS_SIZE_2KB     2048
    #define OS_SIZE_4KB     4096
    #define OS_SIZE_8KB     8192
    #define OS_SIZE_16KB    16384
    #define OS_SIZE_32KB    32768
    #define OS_SIZE_64KB    65536
    #define OS_SIZE_128KB   131072
    #define OS_SIZE_256KB   262144
    #define OS_SIZE_512KB   524288
    #define OS_SIZE_1MB     1048576
    #define OS_SIZE_2MB     2097152
    #define OS_SIZE_4MB     4194304
    #define OS_SIZE_8MB     8388608
    #define OS_SIZE_16MB    16777216
    #define OS_SIZE_32MB    33554432
    #define OS_SIZE_64MB    67108864
    #define OS_SIZE_128MB   134217728
    #define OS_SIZE_256MB   268435456
    #define OS_SIZE_512MB   536870912
    #define OS_SIZE_1GB     1073741824
    #define OS_SIZE_2GB     2147483648
    #define OS_SIZE_4GB     4294967296

    /* Section sizes to be defined here */
    #define OS_PUBLIC_SIZE                     OS_SIZE_1MB
    #define OS_PRIVATE_SIZE                    OS_SIZE_128KB
    #define OS_PRIVATE_CONST_SIZE              OS_SIZE_32KB
    #define OS_PUBLIC_DATA_SIZE                OS_SIZE_32KB
    #define OS_PUBLIC_BSS_SIZE                 OS_SIZE_128KB
    #define OS_PRIVATE_DATA_SIZE               OS_SIZE_16KB
    #define OS_PRIVATE_BSS_SIZE                OS_SIZE_32KB
    #define OS_TASK_STACK_C0_SIZE              OS_SIZE_512KB
    #define OS_RESERVED_SIZE                   OS_SIZE_2KB

    /* Stack Sizes for various modes */
    #define OS_IRQ_STACK_SIZE OS_SIZE_2KB
    #define OS_FIQ_STACK_SIZE OS_SIZE_2KB
    #define OS_ABT_STACK_SIZE OS_SIZE_2KB
    #define OS_UND_STACK_SIZE OS_SIZE_2KB
    #define OS_SVC_STACK_SIZE OS_SIZE_2KB
    #define OS_USR_STACK_SIZE OS_SIZE_2KB


    #define Os_SchMTask_STACK_SIZE OS_SIZE_16KB
    #define Os_MainFuncs_STACK_SIZE OS_SIZE_16KB
    #define Os_InitTask_STACK_SIZE OS_SIZE_16KB


    SECTIONS
    {
        /*
         Exception vectors and Startup code will be covered by
         background region with default memory attributes i.e.
         accessible in PL1
        */

        .OS_STARTUP           : {
          OS_STARTUP_START = .;
            *(.crt0_start)
          OS_STARTUP_END = .;
        } palign(8) > STARTUP_CODE

        /* this is used only when IPC RPMessage is enabled, else this is not used */
        ipc_vring (NOLOAD) : {} > RTOS_NORTOS_IPC_SHM_MEM
       
        /*
         Overlay exception arrays so that each core can update as per
         core memory view
        */
        UNION: run = ATCM
        {
            .OS_EXCEPTIONS_0      : { *(.LOW_EXCEPTION_0)   } palign(4)
        }

        /******************** Mandatory Public CODE + CONST ***********************/

        .OS_PUBLIC_TEXT_CONST : {
          OS_PUBLIC_START = .;
            *(.text)
            *(.Os_PUBLIC_TEXT)
            *(.invalid_CODE)
            *(.Os_PUBLIC_CONST)
            *(.const)
            *(.rodata)
          OS_PUBLIC_END = .;
        } palign(OS_PUBLIC_SIZE) >  ROM


        /*********************** Mandatory Private CODE ***************************/

        .OS_PRIVATE_TEXT : {
          OS_PRIVATE_START = .;
            *(.Os_TEXT)
          OS_PRIVATE_END = .;
        } palign(OS_PRIVATE_SIZE) > ROM

        /*********************** Mandatory Private CONST **************************/

        .OS_PRIVATE_CONST : {
          OS_PRIVATE_CONST_START = .;
            *(.Os_CONST)
          OS_PRIVATE_CONST_END = .;
        } palign(OS_PRIVATE_CONST_SIZE) > ROM


        /************************** Configurable CODE *****************************/



        /************************** Configurable CONST ****************************/



        /************************* Mandatory Public DATA **************************/

        .OS_PUBLIC_DATA : {
          OS_PUBLIC_DATA_START = .;
            *(.Os_PUBLIC_DATA)
            *(.invalid_DATA)
            *(.data)
          OS_PUBLIC_DATA_END = .;
        } load = ROM, run = RAM, palign = OS_PUBLIC_DATA_SIZE
        LOAD_START(OS_PUBLIC_DATA_START_ROM)
        LOAD_END(OS_PUBLIC_DATA_END_ROM)


        /************************* Mandatory Public BSS ***************************/

        .OS_PUBLIC_BSS : {
          OS_PUBLIC_BSS_START = .;
            *(.Os_PUBLIC_BSS)
            *(.bss)
            *(.bss:.common)
          OS_PUBLIC_BSS_END = .;
        } run = RAM, palign = OS_PUBLIC_BSS_SIZE
        RUN_END(OS_PUBLIC_BSS_SECTION_END)


        /************************ Mandatory Private DATA **************************/

        .OS_PRIVATE_DATA : {
          OS_PRIVATE_DATA_START = .;
            *(.Os_DATA)
          OS_PRIVATE_DATA_END = .;
        } load = ROM, run = RAM, palign = OS_PRIVATE_DATA_SIZE
        LOAD_START(OS_PRIVATE_DATA_START_ROM)
        LOAD_END(OS_PRIVATE_DATA_END_ROM)


        /************************ Mandatory Private BSS ***************************/

        .OS_PRIVATE_BSS : {
          OS_PRIVATE_BSS_START = .;
            *(.Os_BSS)
          OS_PRIVATE_BSS_END = .;
        } run = RAM, palign = OS_PRIVATE_BSS_SIZE

        /************************ Mandatory Reserved Section **********************/

        .OS_RESERVED_DATA : {
          OS_RESERVED_START = .;
            *(.Os_RESERVED)
          OS_RESERVED_END = .;
        } run = RAM, palign = OS_RESERVED_SIZE



        /************************** Configurable DATA *****************************/



        /*************************** Configurable BSS *****************************/



        /**************************** Process Stacks ******************************/

        /* Core 0 */

        GROUP
        {
            .Os_SchMTask_STACK : {
                . = align(Os_SchMTask_STACK_SIZE);
                OS_TASK_STACK_C0_START = .;
                Os_SchMTask_STACK_START = .;
                *(.Os_SchMTask_STACK)
                Os_SchMTask_STACK_END = .;
            }

            .Os_MainFuncs_STACK : {
                . = align(Os_MainFuncs_STACK_SIZE);
                Os_MainFuncs_STACK_START = .;
                *(.Os_MainFuncs_STACK)
                Os_MainFuncs_STACK_END = .;
            }

            .Os_InitTask_STACK : {
                . = align(Os_InitTask_STACK_SIZE);
                Os_InitTask_STACK_START = .;
                *(.Os_InitTask_STACK)
                Os_InitTask_STACK_END = .;
                OS_TASK_STACK_C0_END = .;
            }

        } run = RAM



        /**************************** Process Contexts ****************************/

        /* Core 0 */

        GROUP
        {
            .Os_SchMTask_CONTEXT : {
                OS_PROCESS_CONTEXT_C0_START = .;
                Os_SchMTask_CONTEXT_START = .;
                *(.Os_SchMTask_CONTEXT)
                Os_SchMTask_CONTEXT_END = .;
            }

            .Os_MainFuncs_CONTEXT : {
                Os_MainFuncs_CONTEXT_START = .;
                *(.Os_MainFuncs_CONTEXT)
                Os_MainFuncs_CONTEXT_END = .;
            }

            .Os_InitTask_CONTEXT : {
                Os_InitTask_CONTEXT_START = .;
                *(.Os_InitTask_CONTEXT)
                Os_InitTask_CONTEXT_END = .;
                OS_PROCESS_CONTEXT_C0_END = .;
            }

        } run = RAM
    }




        /*************************** C run-time symbols ***************************/
        /* Public BSS */
        __public_bss_start          = OS_PUBLIC_BSS_START;
        __public_bss_end            = OS_PUBLIC_BSS_END;
        __public_bss_size           = OS_PUBLIC_BSS_END - OS_PUBLIC_BSS_START;

        /* Private BSS */
        __private_bss_start         = OS_PRIVATE_BSS_START;
        __private_bss_end           = OS_PRIVATE_BSS_END;
        __private_bss_size          = OS_PRIVATE_BSS_END - OS_PRIVATE_BSS_START;


        /* Process Context Core0 */
        __process_context_c0_start  = OS_PROCESS_CONTEXT_C0_START;
        __process_context_c0_end    = OS_PROCESS_CONTEXT_C0_END;

        /* Task Stack Core0 */
        __task_stack_c0_start       = OS_TASK_STACK_C0_START;
        __task_stack_c0_end         = OS_TASK_STACK_C0_END;
        __task_stack_c0_size        = OS_TASK_STACK_C0_END - OS_TASK_STACK_C0_START;



        /* Public DATA */
        __public_data_start_ram     = OS_PUBLIC_DATA_START;
        __public_data_start_rom     = OS_PUBLIC_DATA_START_ROM;
        __public_data_size          = OS_PUBLIC_DATA_END - OS_PUBLIC_DATA_START;

        /* Private DATA */
        __private_data_start_ram    = OS_PRIVATE_DATA_START;
        __private_data_start_rom    = OS_PRIVATE_DATA_START_ROM;
        __private_data_size         = OS_PRIVATE_DATA_END - OS_PRIVATE_DATA_START;

        /* Private Const */
        __private_const_size        = OS_PRIVATE_CONST_END - OS_PRIVATE_CONST_START;

        /* Public Code and Const*/
        __public_code_const_size    = OS_PUBLIC_END - OS_PUBLIC_START;

        /* Private Code */
        __private_code_size         = OS_PRIVATE_END - OS_PRIVATE_START;

        /* Reserved */
        __Reserved_size             = OS_RESERVED_END - OS_RESERVED_START;

        /* CPU execution mode stacks */
        OS_CPU_MODE_STACKS_OFFSET   = OS_SIZE_16KB;
        OS_CPU_MODE_STACKS_BASE_0   = OS_PUBLIC_BSS_SECTION_END;
        OS_CPU_MODE_STACKS_BASE_1   = OS_CPU_MODE_STACKS_BASE_0 - OS_CPU_MODE_STACKS_OFFSET;
        OS_CPU_MODE_STACKS_BASE_2   = OS_CPU_MODE_STACKS_BASE_1 - OS_CPU_MODE_STACKS_OFFSET;

        /*
        BASE = OS_CPU_EXECUTION_MODE_STACKS_BASEn
        LOW ADDRESS  |--FIQ STACK START--| BASE - (SVC+USR+ABT+UND+IRQ STACK SIZE)
                     |--IRQ STACK START--| BASE - (SVC+USR+ABT+UND STACK SIZE)
                     |--UND STACK START--| BASE - (SVC+USR+ABT STACK SIZE)
                     |--ABT STACK START--| BASE - (SVC+USR STACK SIZE)
                     |--SVC STACK START--| BASE - (USR STACK SIZE)
        HIGH ADDRESS |--USR STACK START--| BASE
        */

        __usr_stack_end_0 = OS_CPU_MODE_STACKS_BASE_0;
        __svc_stack_end_0 = __usr_stack_end_0 - OS_USR_STACK_SIZE;
        __abt_stack_end_0 = __svc_stack_end_0 - OS_SVC_STACK_SIZE;
        __und_stack_end_0 = __abt_stack_end_0 - OS_ABT_STACK_SIZE;
        __irq_stack_end_0 = __und_stack_end_0 - OS_UND_STACK_SIZE;
        __fiq_stack_end_0 = __irq_stack_end_0 - OS_IRQ_STACK_SIZE;

        __usr_stack_end_1 = OS_CPU_MODE_STACKS_BASE_1;
        __svc_stack_end_1 = __usr_stack_end_1 - OS_USR_STACK_SIZE;
        __abt_stack_end_1 = __svc_stack_end_1 - OS_SVC_STACK_SIZE;
        __und_stack_end_1 = __abt_stack_end_1 - OS_ABT_STACK_SIZE;
        __irq_stack_end_1 = __und_stack_end_1 - OS_UND_STACK_SIZE;
        __fiq_stack_end_1 = __irq_stack_end_1 - OS_IRQ_STACK_SIZE;
       
        __usr_stack_end_2 = OS_CPU_MODE_STACKS_BASE_2;
        __svc_stack_end_2 = __usr_stack_end_2 - OS_USR_STACK_SIZE;
        __abt_stack_end_2 = __svc_stack_end_2 - OS_SVC_STACK_SIZE;
        __und_stack_end_2 = __abt_stack_end_2 - OS_ABT_STACK_SIZE;
        __irq_stack_end_2 = __und_stack_end_2 - OS_UND_STACK_SIZE;
        __fiq_stack_end_2 = __irq_stack_end_2 - OS_IRQ_STACK_SIZE;



  • Hi,

    Which bootloader are you using?Are you trying to load elf file onto qspi flash and trying to boot?

    Thanks And Regards,

    Sunil

  • Hi,

    Yes. We are using TI bootloader and we are trying to load elf file onto qspi flash and trying to boot.

  • Hi Kim,

    You need to convert ELF file to appimage and then flash it and try over qspi bootmode. You can find scripts $MCAL_INSTALL_DIR\build\bootimage_scripts\

    Our SBL supports only rprc image format parsing. Please find the detailed documentation below.

    software-dl.ti.com/.../BOOTFLOW_GUIDE.html

    Thanks And Regards,

    Sunil Kumar M S

  • Hi,

    I already convert the elf file to appimage and flash it to external flash.

    I wonder what is the meaning of the "warning: output file "output\Application.elf" cannot be loaded and run on a target system"?

    I don't know this is related to not APP running or not.

    As I said above, we have

    - TI bootloader image(#A)

    - APP image(#@B) build with CCS

    - AUTOSAR APP image(#C).

    When I try to flash #A and #B with Boot Mode, It is running.

    But When I try to flash #A and #C with Boot mode, It is not running

  • Hi,

    Have you referred MCAL linker file and updated the changes? Can you make sure all sections are 8B aligned?

    $MCAL_INSTALL_DIR\mcal\examples\lnk_r5_am263_CLANG.cmd

    Regards,

    Sunil Kumar M S

  • Hi Kim,

    Our SBL expert informed me that this warning is because TI Bootloader does not support different load/run sections.

    Any updates on this issue?

    Thanks And Regards,

    Sunil Kumar M S