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/CODECOMPOSER: Linking Issues building OMAPL-137 ARM UBL

Part Number: CODECOMPOSER

Tool/software: TI C/C++ Compiler

Hello,

I need a bit of help. I'm trying to rebuild the ARM UBL from lsp_2_20. I understand is a bit old but it is the only missing piece for this bootloader stage. I have build uboot, dps_flash_write, DSP AIS UBL but I'm stuck with the ARM UBL. Any help, suggestion or idea will be greatly appreciated. 

"/opt/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armcl" ..... 

I get quite a few warnings:

  1. warning #1119-D: this assembly directive potentially unsafe inside a function
    ....
    main();
    asm("_stack:"); 
    asm(" .word STACKStart");  <---- this is the offending line
    ...
  2. /tmp/TI1NT0u0XST|79| [W0000] Deprecated use of PSR; flag bits not specified, "cf" assumed MSR  cpsr, r0
  3. /ubl2bin.cmd|3| error #10022-D: invalid option:  -zero
  4. /ubl2bin.cmd|8| error #10043-D: expecting "";"" instead of "}"
  5. undefined symbol _boot <-- I can fix this by changing the function definition in boot.c to _boot but I'm not sure if that is the correct approach
  6. warning #10202-D: no suitable entry-point found; setting to 0

 I understand these are a lot of questions but as mention before, guidance, clue, literature, pdf, rtm, anything will help.

For reference I get the same results if I build the ARM UBL from the new SDK which has a CCSv4 project for the newer version Davinci 3.x.x

  • Hi,

    I've notified the RTOS team. They will post their feedback directly here.

    Best Regards,
    Yordan
  • Hoffiz,

    Unfortuntely, you are using fairly old software and trying to build this using latest compiler tools. I would recommend that for UBL that you use CCSv5/CCSv6 that shipped with the older TI ARM compiler cl470 as this is what was used to build the binaries.

    There have been significant changes brought in with newer TI ARM compiler and the ARM UBL baseline was never tested with this baseline. When using this legacy software, I would stick to versions in release notes/Readme/Software Manifest to avoid running into such issues.

    Regards,
    Rahul
  • Thanks Rahul, I was afraid of that answer but I trust your suggestion. On the other side, before switching (I'm being a bit stubborn), I managed to fix most of my errors but one.

    Errors related to: /ubl2bin.cm where fixed by reading:

    processors.wiki.ti.com/.../Hex_Utility_in_CCS

    _c_int00 warning eliminated by changing the entry point from boot to _c_init and changing the header file accordingly.

    The only two I can't manage to shake out are:

    warning #1119-D: this assembly directive potentially unsafe inside a function
    ....
    main();
    asm("_stack:");
    asm(" .word STACKStart"); <---- this is the offending line
    ...
    /tmp/TI1NT0u0XST|79| [W0000] Deprecated use of PSR; flag bits not specified, "cf" assumed MSR cpsr, r0

    Could I just download the cgt version instead of installing CCSv5/6?

    Would you be so kind to point me to some literature I can use to understand what is asm("_stack:");  and asm(" .word STACKStart");  doing?

  • I have no expertise regarding a UBL.  But I can shed some light.

    Hoffiz said:
    warning #1119-D: this assembly directive potentially unsafe inside a function
    ....
    main();
    asm("_stack:");
    asm(" .word STACKStart"); <---- this is the offending line

    You cannot have those asm statements inside a C function.  Move them outside a C function.

    Hoffiz said:
    /tmp/TI1NT0u0XST|79| [W0000] Deprecated use of PSR; flag bits not specified, "cf" assumed MSR cpsr, r0

    Unfortunately, I lack the detailed knowledge of ARM instruction set and registers needed here.

    Hoffiz said:
    Could I just download the cgt version instead of installing CCSv5/6?

    You can download older TI ARM compiler releases from this page.

    Hoffiz said:
    what is asm("_stack:");  and asm(" .word STACKStart");  doing?

    asm statements inject that string into the assembly code generated by the compiler.  The first one creates a label of that name.  The second one initializes a word of memory with the address of the symbol STACKStart.  For more detail, see the ARM compiler manual (for asm statements), and assembly tools manual (for the rest), which can be accessed on this recent compiler release download page.

    Thanks and regards,

    -George

  • Thanks George, I was suspecting having to dust off my old assembler books.

    Between your response and this one: e2e.ti.com/.../2586166 I have enough info to figure it out or at least reverse engineer the initialization.

    Regards, Jaime