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.

Compiler/TMS320F280049: bl_entrytable.asm EABI compilation

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

Hello!

I have another problem with eabi format.

There is a problem with the bl_entrytable.asm assembler file, it is contained in the bl_app example.

If you switch to the COFF format, then everything compiles fine, in the EABI format the pAppEntry and pAppSig pointers are thrown out by the compiler or linker and the app_table section remains empty.

How to place these pointers in memory in EABI mode?

Below is an example of the contents of this file in both formats. What am I doing wrong?

EABI format:

    .def pBootEntry
    .ref CRCTestVector
    .ref code_start
    .def pAppEntry
    .def pAppSig

***********************************************************************
* Function: codestart section
*
* Description: Branch to code starting point
***********************************************************************

    .sect "app_table"

app_table:
pAppEntry    .long code_start
pAppSig      .long CRCTestVector
    
    .sect "bl_table"

bl_table:
pBootEntry   .long 0
    

	.end

COFF format:

.def _pBootEntry
.ref _CRCTestVector
.ref code_start
.def _pAppEntry
.def _pAppSig

***********************************************************************
* Function: codestart section
*
* Description: Branch to code starting point
***********************************************************************

.sect "app_table"

app_table:
_pAppEntry .long code_start
_pAppSig .long _CRCTestVector

.sect "bl_table"

bl_table:
_pBootEntry .long 0

.end

  • Hi,

    Is this your custom project or you are trying C2000ware DriverLib example?

    What are the error messages?

  • Hello!

    I am making my own bootloader, but this also applies to the bootloader from the 2806x example.

    I already figured out what the problem is. In the EABI mode, vectors with jump addresses (pAppEntry and pFwCrcTable) are optimized and discarded by the compiler.
    To avoid this, you need to use them, for example:

    extern volatile void * pFwCrcTable;
    
    Void taskFxn(UArg a0, UArg a1)
    {
        System_printf("enter taskFxn()\n");
    
        Task_sleep(10);
    
        volatile uint32_t * ptr = pFwCrcTable;
        (void)ptr;
    
        System_printf("exit taskFxn()\n");
    
        System_flush(); /* force SysMin output to console */
    }

    And yet I have not found a mention anywhere that in the EABI mode it is necessary to manually register the transition vector to the code_start, otherwise it is also optimized and thrown out by the compiler. This is done in the DriverLib examples, and not in the older examples. I'm sorry that TI has succumbed to this tendency to use "high-level" libraries.

    If the transition vector code_start is not specified correctly, the examples work only for debugging. 

    Workaround: