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.

Using ARM UBL to run DSP program on OMAP L138 (TDMSEVML138-B)

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

This seems like it should be easy, but I am having a lot of trouble booting a DSP program on the OMAP L-138 from NOR flash. I have a LogicPD TMDSEVML138 and have been following the steps here: http://processors.wiki.ti.com/index.php/Boot_Images_for_OMAP-L138#Booting_DSP_Binaries

This works just fine. I follow the steps under "Running" and the program boots out of NOR and the lights flash. I decided to try another program and see if I really understood what was going on; clearly I do not. I downloaded 1020489B-1_CCSv4-2-4_with_SOM-M1_BSL_WS.zip from LogicPD and tried to connect their LCD test to the ARM UBL from the TI wiki. I changed the linker_dsp.cmd file to:

/*****************************************************************************
* linker command file for OMAP-L138 test code.
*
* © Copyright 2009, Logic Product Development Company. All Rights Reserved.
******************************************************************************/
-l rts6740.lib

-stack 0x00000800
-heap 0x00000800

MEMORY
{
dsp_l2_ram: ORIGIN = 0x11800000 LENGTH = 0x00040000
shared_ram: ORIGIN = 0x80001000 LENGTH = 0x00020000
external_ram: ORIGIN = 0xC0000000 LENGTH = 0x08000000
arm_local_ram: ORIGIN = 0xFFFF0000 LENGTH = 0x00002000
}

SECTIONS
{
.cinit > shared_ram
.text > shared_ram
.const > shared_ram
.bss > shared_ram
.far > shared_ram
.switch > shared_ram
.stack > shared_ram
.data > shared_ram
.sysmem > shared_ram
.cio > shared_ram
}

After building the .bin with AISGen it does not actually run. I am totally confused as to why one program works while the other does not. What am I missing?


  • This works just fine. I follow the steps under "Running" and the program boots out of NOR and the lights flash. I decided to try another program and see if I really understood what was going on; clearly I do not. I downloaded 1020489B-1_CCSv4-2-4_with_SOM-M1_BSL_WS.zip from LogicPD and tried to connect their LCD test to the ARM UBL from the TI wiki. I changed the linker_dsp.cmd file to:

    Able to run the LCD test through emulator (CCS)?
    I would like you to refer the OMAPL138 starterware examples.

    processors.wiki.ti.com/.../StarterWare
  • Yes it works just fine through the emulator. I am starting to wonder if maybe the GEL file is enabling something that's not in my application.

  • Dear William,
    Which bootloader are you using ?
    You can also refer to the following TI wiki page.
    processors.wiki.ti.com/.../OMAPL138_StarterWare_Booting_And_Flashing

    Can you refer starterware package for OMAPL138 EVM board ?

    C:\ti\OMAPL138_StarterWare_1_10_04_01\examples\evmOMAPL138
  • Hi william,

    Follow these steps to boot DSP program using ARM UBL. In the steps below, place your DSP example in place of raster example.

    Revert if you have any questions or if you face any issues in the below steps when experimenting.

    Steps to follow:

    =============

    1. It is assumed that you already installed "OMAPL138_StarterWare_1_10_03_03". For example, Consider you want to flash and boot the Raster example given at path "..\ti\OMAPL138_StarterWare_1_10_03_03\examples\lcdkOMAPL138\raster"

    First, import the raster display project given at "..\ti\OMAPL138_StarterWare_1_10_03_03\build\c674x\cgt_ccs\omapl138\lcdkOMAPL138\raster" into CCS, build and generate the rasterDisplay.out.

    Using CCS, Open up the linker file, "raster_c674x_omapl138_lcdkOMAPL138.map" and notice the entry point "ENTRY POINT SYMBOL: "_c_int00" address: c009d000".

    Import the ARM starterware bootloader project given at "..\ti\OMAPL138_StarterWare_1_10_03_03\build\armv5\cgt_ccs\omapl138\lcdkOMAPL138\bootloader" and import it into CCS.

    Before building the bootloader project, in bl_main.c, assign the DSP entry point address( Please note that this is the address noticed in the raster_c674x_omapl138_lcdkOMAPL138.map linker file of raster display project) as 0xc009d000(i.e., unsigned int DspEntryPoint = 0xc028cc00 0xc009d000 ; )

    Buid the project and generate the boot.out file.

    Using AIS gen tool, load the appropriate configuration file and convert the boot.out into boot.ais

    Using out2rprc, convert the rasterDisplay.out into rasterDisplay.bin

    On OMAPl138 LCDK board,set the boot switches for UART mode(1:4 = 0101 on OMAPL138 LCDK). Open serial terminals like teraterm and make sure you get the "BOOTME" message.

    By sfh utility, flash the two images, boot.ais and rasterDisplay.bin using the below command.

    $>sfh_OMAP-L138.exe -flash boot.ais rasterDisplay.bin -targetType OMAPL138_LCDK -flashType NAND -p COM3

    Where 3 is the COM port number. After flashing successfully, Change the boot switches for NAND boot (1:4 = 0111 on OMAPL138 LCDK) and power on or reset the LCDK board. You will Observe the starterware messages from both the sample projects, bootloader and Rasterdisplay.

  • Please note that this is the address noticed in the raster_c674x_omapl138_lcdkOMAPL138.map linker file of raster display project) as 0xc009d000(i.e., unsigned int DspEntryPoint = 0xc028cc00

    I am confused. How does unsigned int DspEntryPoint = 0xc028cc00 come from  0xc009d000? Shouldn't it be   int DspEntryPoint = 0xc009d000?

  • ******************************************************************************
    TMS320C6x Linker PC v7.4.4
    ******************************************************************************
    >> Linked Wed Jan 27 12:58:47 2016

    OUTPUT FILE NAME: <rasterDisplay.out>
    ENTRY POINT SYMBOL: "_c_int00" address: c009b800

    --stuff--

    .text:_c_int00
    * 0 c009b800 00000080
    c009b800 00000080 rts6740_elf.lib : boot.obj (.text:_c_int00)

    --stuff--

    LINKER GENERATED HANDLER TABLE

    __TI_handler_table @ c0096298 records: 2, size/record: 4, table size: 8
    index: 0, handler: __TI_decompress_rle24
    index: 1, handler: __TI_decompress_none


    GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

    --stuff--

    address name
    -------- ----
    c009b800 _c_int00


    I do not understand why the DspEntryPoint does not match the ENTRY POINT as defined in the .map file. If _c_int00 (the entry point) is at 0xc009b800, then why would I set the DSP entry point to a different address?
  • HI,

    william said:
    Please note that this is the address noticed in the raster_c674x_omapl138_lcdkOMAPL138.map linker file of raster display project) as 0xc009d000(i.e., unsigned int DspEntryPoint = 0xc028cc00


    Sorry, it is a typo error. It should be " unsigned int DspEntryPoint = 0xc009d000"

    Also I have updated the wiki page, please refer to know more.

  • I finally got the program working with a few path fixes (it is missing libraries). Everything runs fine if I flash to SPI0. I tried NAND and that fails. I did solve most of the linker errors by adding nand.lib and grlib.lib from the /binary/armv5/cgt_ccs path. However I still have 2 unresolved linker errors:

    undefined first referenced
    symbol in file
    --------- ----------------
    BL_NAND_Configure ./bl_copy_rprc.obj
    BL_NAND_ReadFlash ./bl_copy_rprc.obj

    error: unresolved symbols remain

    Any chance you can provide the missing libraries? Also, do you have a parallel NOR version?
  • Hi william,

    Please make sure that you have defined  "NAND" in "CCS Predefined symbol"

    What is your board ?

    Custom board or TI EVM ?

    We have OMAPL138 LCDK board which has 16bit NAND flash.

    We don't have support for NOR flash and I hope it can be executed directly.

    C:\ti\OMAPL138_StarterWare_1_10_04_01\bootloader\src

  • EDIT: I have a TMDSEVML138-B from LogicPD. It does have parallel NOR flash on the daughter card. I am able to successfully burn to it and boot from it with their examples. Your example here is much more sophisticated so I would like to learn to use it in NAND and NOR.

    http://www.logicpd.com/products/system-on-modules/zoom-omap-l138-evm/

    I do have that defined. Here is my build output:

    **** Build of configuration Debug for project bootloader_armv5_omapl138_evmOMAPL138 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all

    'Building file: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_copy_rprc.c'

    'Invoking: TMS470 Compiler'

    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=NAND --define=RPRC_IMAGE --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="../../../../../../../include" --include_path="../../../../../../../bootloader/include" --include_path="../../../../../../../bootloader/include/evmOMAPL138" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv5" --include_path="../../../../../../../include/armv5/omapl138" --include_path="../../../../../../../grlib/include" --include_path="../../../../../../../usblib/include" --include_path="../../../../../../../ipclite/include" --include_path="../../../../../../../nandlib/include" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="bl_copy_rprc.pp" "C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_copy_rprc.c"

    'Finished building: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_copy_rprc.c'

    ' '

    'Building file: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_main.c'

    'Invoking: TMS470 Compiler'

    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=NAND --define=RPRC_IMAGE --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="../../../../../../../include" --include_path="../../../../../../../bootloader/include" --include_path="../../../../../../../bootloader/include/evmOMAPL138" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv5" --include_path="../../../../../../../include/armv5/omapl138" --include_path="../../../../../../../grlib/include" --include_path="../../../../../../../usblib/include" --include_path="../../../../../../../ipclite/include" --include_path="../../../../../../../nandlib/include" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="bl_main.pp" "C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_main.c"

    'Finished building: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_main.c'

    ' '

    'Building file: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/evmOMAPL138/bl_platform.c'

    'Invoking: TMS470 Compiler'

    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=NAND --define=RPRC_IMAGE --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --include_path="../../../../../../../include" --include_path="../../../../../../../bootloader/include" --include_path="../../../../../../../bootloader/include/evmOMAPL138" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv5" --include_path="../../../../../../../include/armv5/omapl138" --include_path="../../../../../../../grlib/include" --include_path="../../../../../../../usblib/include" --include_path="../../../../../../../ipclite/include" --include_path="../../../../../../../nandlib/include" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="bl_platform.pp" "C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/evmOMAPL138/bl_platform.c"

    'Finished building: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/evmOMAPL138/bl_platform.c'

    ' '

    'Building target: boot.out'

    'Invoking: TMS470 Linker'

    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=NAND --define=RPRC_IMAGE --diag_warning=225 -me --abi=eabi --code_state=32 -z -m"bootloader_armv5_omapl138_evmOMAPL138.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/arm_5.1.1/lib" -i"../../../../../../../binary/armv5/cgt_ccs/grlib/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/nandlib/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/ipclite/Debug" -i"C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/drivers/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/evmOMAPL138/platform/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/system_config/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/ipclib/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/usblib/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/utils/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/grlib/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/nandlib/Debug" --reread_libs --xml_link_info="boot_linkInfo.xml" --rom_model -o "boot.out" "./bl_platform.obj" "./bl_main.obj" "./bl_copy_rprc.obj" "../boot.cmd" -l"libc.a" -lipclite.lib -lgrlib.lib -lnand.lib -ldrivers.lib -lutils.lib -lplatform.lib -lsystem_config.lib

    <Linking>

    undefined first referenced

    symbol in file

    --------- ----------------

    BL_NAND_Configure ./bl_copy_rprc.obj

    BL_NAND_ReadFlash ./bl_copy_rprc.obj

    error: unresolved symbols remain

    error: errors encountered during linking; "boot.out" not built

    >> Compilation failure

    gmake: *** [boot.out] Error 1

    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • Hi william,
    Can you please attach your project ?
    Will try to build.
  • Hi william,


    I'm able to build the EVM based starterware bootloader for NAND flash.
    What is your starterware version ?

    I have "BlNANDConfigure()" line in "bl_copy_rprc.c" file but your project has some different name "BL_NAND_Configure"

    C:\ti\OMAPL138_StarterWare_1_10_04_01\build\armv5\cgt_ccs\omapl138\evmOMAPL138\bootloader

    Also, I found one more issue in your project; that is, you have to add the "bl_nand.c" source code into your bootloader project to resolve the "BL_NAND_Configure" linking problem.
    Then, you will be able to build the bootloader without any issue.