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.

Flash application in OmapL138

Other Parts Discussed in Thread: OMAPL138, CCSTUDIO

Hi: I have an OMAPL138 Experimenter kit. I want to flash and run an application which only use DPS core, tested by ccs on OMAPL138 SOM , in SOM's SPI flash. Do I have to boot arm first or is it possible to convert out file to binary flash it and run only on DSP core!? I tried aisgen, spi flsh writer and none was successfull. Thanks
  • Hi Alireza,

    We have created wiki page specifically for this task, found here: http://processors.wiki.ti.com/index.php/Boot_Images_for_OMAP-L138#Booting_DSP_Binaries

    Try out those examples and that should show you what you need. Thanks

    Jeff

  • Thanks Jeff, I have read many pages in past 24 hours and it seems to be exhusting task. Very glad that you have put them all togather. It is exactly what I need but I tested OMAPL138-DSP-LED-v1 ready files. It is not working! no flashing LEDs. I have already tested OMAPL138-ARM-LED-v2 and it is working well. I noticed that loading OMAPL138-DSP-LED-NAND-SPI-UART.cfg in AISgen, boot mode is set to "NOR FLASH". Is it a bug?!
  • For the NAND, SPI, and UART boot modes the "Boot Mode" selector doesn't matter when creating the AIS file. You can try changing it to SPI but I don't think that will fix your issue.

    Have you followed the debug steps at the bottom of the wiki? What were the results?

    Jeff

  • here is the result: --------------------------------------------- | Device Information | --------------------------------------------- DEV_INFO_00 = 0x0B7D102F DEV_INFO_01 = 0x00000000 DEV_INFO_02 = 0x0000000C DEV_INFO_03 = 0x00000030 DEV_INFO_04 = 0x00000000 DEV_INFO_05 = 0x000003E0 DEV_INFO_06 = 0x00000000 DEV_INFO_07-DEV_INFO_08-DEV_INFO_09-DEV_INFO_10-DEV_INFO_11-DEV_INFO_12 = 0-0-6230032-10-26-9 DEV_INFO_13,DEV_INFO_14,DEV_INFO_15,DEV_INFO_16 = 0,0,0,95 ----- DEV_INFO_17 = 0x00030003 DEV_INFO_18 = 0x00000000 DEV_INFO_19 = 00000 ----- DEV_INFO_20 = 0x30303864 DEV_INFO_21 = 0x3230306B DEV_INFO_22 = 0x00000000 DEV_INFO_23 = 0x00000000 ----- DEV_INFO_24 = 0x0A00901A DEV_INFO_25 = 0x005F1010 DEV_INFO_06 = 0x00000000 DEV_INFO_26 = 0x00BE0000 --------------------------------------------- | BOOTROM Info | --------------------------------------------- ROM ID: d800k002 Silicon Revision 1.0 Boot Mode: SPI1 Flash ROM Status Code: 0x00000001 Description: DSP was put to sleep Program Counter (PC) = 0x00712120 thanks. Alireza
  • here is the result :

    ---------------------------------------------
    |             Device Information            |
    ---------------------------------------------
    DEV_INFO_00 = 0x0B7D102F
    DEV_INFO_01 = 0x00000000
    DEV_INFO_02 = 0x0000000C
    DEV_INFO_03 = 0x00000030
    DEV_INFO_04 = 0x00000000
    DEV_INFO_05 = 0x000003E0
    DEV_INFO_06 = 0x00000000
    DEV_INFO_07-DEV_INFO_08-DEV_INFO_09-DEV_INFO_10-DEV_INFO_11-DEV_INFO_12 = 0-0-6230032-10-26-9
    DEV_INFO_13,DEV_INFO_14,DEV_INFO_15,DEV_INFO_16 = 0,0,0,95
    -----
    DEV_INFO_17 = 0x00030003
    DEV_INFO_18 = 0x00000000
    DEV_INFO_19 = 00000
    -----
    DEV_INFO_20 = 0x30303864
    DEV_INFO_21 = 0x3230306B
    DEV_INFO_22 = 0x00000000
    DEV_INFO_23 = 0x00000000
    -----
    DEV_INFO_24 = 0x0A00901A
    DEV_INFO_25 = 0x005F1010
    DEV_INFO_06 = 0x00000000
    DEV_INFO_26 = 0x00BE0000


    ---------------------------------------------
    |               BOOTROM Info                |
    ---------------------------------------------
    ROM ID: d800k002
    Silicon Revision 1.0
    Boot Mode: SPI1 Flash

    ROM Status Code: 0x00000001
    Description: DSP was put to sleep

    Program Counter (PC) = 0x00712120

     

  • It looks like you are using an old revision of the silicon, which I don't believe was tested with this program. Do you have a newer EVM you can test this out on, as I assume you will go into production with the latest silicon.

    The main difference is that the device must be unlocked with the KICK registers in order to write to some of the SYSCFG registers. Although that is in the code it was not tested for this release. Connect to the ARM and see if the the HOST1CFG register was actually written to and is 0x80010000.

    Thanks,

    Jeff

  • you are quite right Jeff, I tested another SOM with silicon revision 2.0 it is working well. but I still cannot run my application, which I think have to look for the reason in the map file and entry point address!? Regarding connecting to arm: I am using onboard usb emulator with ccs 3.3 which I believe canot connect to arm. am I right? Thanks a lot!
  • Yes if it is the XDS100v1 then you will not be able to connect to the ARM.

    The main thing for you to check will be the entry point address. You can copy what was done in the example and assign that section to a 1k boundary in the map file.

    Jeff

  • Hi Jeff:

    1.Put following lines into my cmd fiie:

       entry_point:     ORIGIN = 0x11800000  LENGTH = 0x00000080
       arm_local_ram:   ORIGIN = 0xFFFF0000  LENGTH = 0x00002000
    }

    SECTIONS
    {
       .text:_c_int00 > entry_point

    result in map file:

    ENTRY POINT SYMBOL: "_c_int00"  address: 1180fe60

    2. rebuilding orginal arm project  "OMAPL138-DSP-LED-ARM.pjt" result in following warning:

    >> warning: entry point symbol _c_int00 undefined

    and generating ais file from rebuild is not working!

    Alireza

  • 1. You do not need to set a special entry point for the ARM. The AISgen tool and bootloader will load all the sections correctly. You only need to do this on the DSP code, which must be on a 1k boundary as explained earlier.

    2. What did you change in the original arm project? If you redownload it you are able to rebuild without issue right?

    Jeff

  • sorry I may be confused about some points but:

    1. these lines are what I have put in DSP project and I expected that they force c_int00 to entry point address which does not happen.

    2.I changed nothing. I even downloaded code again but same result. I build with ccs3.3. Can it be related to the same limitation which does not let me connect to arm?

    Thanks,

    Alireza

  • What version of the DSP and ARM compilers are you using? Here is the output when I build the ARM code:

    ----------------------  OMAPL138-DSP-LED-ARM.pjt - Debug  ----------------------
    [main.c] "C:\Program Files\Texas Instruments\TMS470 Code Generation Tools 4.6.4\bin\cl470" -g -pdsw225 -fr"C:/flashtest/OMAPL138-DSP-LED/ARM/ccs/../Debug" -i"C:/flashtest/OMAPL138-DSP-LED/ARM/ccs/../include" -d"_DEBUG" -me -mv5e --abi=ti_arm9_abi -@"../ccs/Debug.lkf" "main.c"

    [Linking...] "C:\Program Files\Texas Instruments\TMS470 Code Generation Tools 4.6.4\bin\cl470" -@"Debug.lkf"
    <Linking>

    Build Complete,
      0 Errors, 0 Warnings, 0 Remarks.

    Jeff

  • cl470 report:

    TMS470 C/C++ Compiler                   v4.1.4

     

    [main.c] "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -g -pdsw225 -fr"D:/OMAPL138-DSP-LED-v1/OMAPL138-DSP-LED/ARM/ccs/../Debug" -i"D:/OMAPL138-DSP-LED-v1/OMAPL138-DSP-LED/ARM/ccs/../include" -d"_DEBUG" -me -mv5e --abi=ti_arm9_abi -@"../ccs/Debug.lkf" "main.c"

    [Linking...] "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -@"Debug.lkf"
    <Linking>
    >> warning: entry point symbol _c_int00 undefined

    Build Complete,
      0 Errors, 1 Warnings, 0 Remarks.

    Alireza

  • You are right again! I upgraded to compiler to 4.6.5 its working!

    But still my problem is that c_int00 is not in 1k boundary and there is no statement like " .text:_c_int00" in map file.

    At early stage of developing my application to make my project work, I have added a "myconfigcfg.tcf" DSP/BIOS  config file from another project and I cahnged it for my project.

    What happend then was: it create a"myconfigcfg.cmd" file which i had to add to my project. Since then, every time I build, this file return to its original state so I added another cmd file to keep my new commands, in which I have added lines for entry point. could it be the pssible cuase?

    Alireza

     

  • I found valuable information in following link I was totally unaware of:

    http://processors.wiki.ti.com/index.php/Accessing_c_int00

    Succeeded to fix c_int00 address but my application is not work yet!!!

    Maybe I have to manipulate AISgen config.

  • Great thanks for sharing that link, I have added it to the wiki page given earlier.

    So now when you connect to the DSP what is the PC? Can you read back the HOST1CFG register and see if it was set by the ARM successfully?

    Jeff

  • I dont know how to read HOST1CFG. Do I have to do this by viewing its address?

    Anyway I checked a simple program which I was able to add commands and addresses to it exactly as your sample code.

    Flash it to SPI and boot  I connected to DSP. And run the program, it is working. Being suspicious that Gel file maybe the difference, I deleted it but the same result.

    SO only possible cause is that after correctly loading DPS application, it halt. Am I right!?

    Alireza

  • While I was struggling with my test application, I decided to test my main application and to my surprise: It boot from SPI flash!!!!!!!!!

    Better to forget about test. By the way,HOST1CFG was 0x80010001. I don't know why  the address is odd!?

    Thank you very much Jeff for your kind help.

    Alireza