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.

UBLs and custom application OMAP L137

Other Parts Discussed in Thread: CCSTUDIO, OMAP-L137

Hi everyone,

 

Up to now, I've been working with CCStudio, and to launch a program I only had to click on Debbug active project ...

I would like to flash my program into the SPI Flash and boot from there, But I haven't been able to launch my program so far.

The thing I've tried is flashing either with CCStudio SPI flasher and Serial Flasher executable. (I provided the utilities with dsp-ais and arm-ubl). What I did then is provide the flasher with an example from rCSL quickstart package (I created an AIS file from .out file) instead of providing U-boot as the third file.

 

Is it the right way to do it ? Because, nothing happens when I turn on the OMAP with SPI Flash boot mode activated once the 3 files have been flashed.

(When I connect the board with CCStudio, DSP runs until address 0x0071307A which contains BNOP 0x0071307A, and ARM just stays at 0xFFFF0000 which contains B 0xFFFF0000).

 

What changes do I have to make in either of my three files ? Do I do something the wrong way ?

 

Thanks,

 

Maxime

  • Maxime,

    Are you attempting to boot to an ARM or DSP application?  Booting to a DSP application on OMAP-L137 is pretty straightforward:

    1. Use AISgen to generate an AIS file (.bin or .ais) from your original .out file
    2. Flash your AIS file to the very beginning of SPI flash (i.e. offset 0)
    3. Make sure your boot switches are set for SPI flash boot
    4. Disconnect the emulator and power cycle the EVM

    You don't need a UBL or U-boot if you want to boot to a DSP application.

    Hope this helps.  Please let me know if you are looking for help booting to an ARM application instead.

  • Thanks,

    I have been able to run a DSP application, you're right, pretty simple.

    But that's just one part because my project is in two parts, ARM is doing general processing, and DSP signal processing.

    What more do I have to do to have my ARM program running on the ARM while DSP is running its program ?

     

    Thank you for your help

  • Maxime,

    On OMAP-L137, your DSP application is responsible for loading and running the ARM application.  This is usually referred to as a DSP UBL.  The standard flow for booting Linux on the ARM goes something like this:

    1. DSP boots to DSP UBL at offset 0 in flash
    2. DSP UBL loads and runs an ARM UBL from 0x2000 in the flash
    3. ARM UBL loads and runs U-boot from 0x8000 in flash
    4. U-boot loads and starts Linux kernel

    Your application may be simpler than that if you don't want to run Linux, but you will definitely need a DSP UBL.  This application basically loads ARM program data into some shared memory space (i.e. L3RAM or external memory) and then loads the the appropriate vectors to ARM local RAM via PRU.  In your case, you would insert this functionality at the beginning of your DSP application so that it started ARM processing and then proceeded to perform its own (DSP) processing.

    I wish that I could give you more information on creating a DSP UBL, but this is a gap in our current documentation.  We plan to create a wiki article to address this, so I will post an update here when that is done.

  • Alright, okay. So correct me if I'm mistaken, but DSP UBL is just a name you're giving to it but there is nothing different from a basic program a part from the fact that it's loading ARM program.

    And yeah, I don't want to run Linux, just a program on ARM and another one on DSP which will exchange data through shared memory for processing.

    So beginning from the DSP program that I have been able to run on the DSP, I would just have to add the functionality that sets ARM vectors via PRU, and copy ARM program from SPI flash to shared memory.

     

    Do you know where I can find documentation about PRU for OMAP L137 ? And could you give me the basci steps to copy ARM program from SPI flash to the location it must be in order to be run ?

     

    Thanks a lot !

  • Hey,

    I had the chance to work a little on my problem. So, now, the DSP program set ARM vectors before releasing it via PRU (I used some code from existing DSP UBL).

    I tried it in debug and it was working but by flashing the SPI, it doesn't work anymore. I know that my DSP program works until the tight loop I wrote at the end since I light led. But ARM program is not running, actually I don't even know where it's stopping (or it even started) since I can't connect the board when in SPI Flash 0 mode with my program running ... (don't know why though).

    I don't know if I flashed it the right way, I don't know how to flash the ARM binary. I tried with serial flasher with -flash option in second argument, or with flash_dsp in third argument. But nothing ...

     

    Any tips ?

     

    BR

     

    Maxime

  • Maxime,

    Are you able to connect to the ARM using the emulator?  If not, then it's likely that the ARM is not actually running.  If you can connect an emulator to the DSP, then you should at least be able to verify that the ARM program data is being loaded correctly to shared memory.

    If you haven't already, I recommend looking at the DSP UBL source code that is included with the OMAP-L137 SDK.  This can give you a better idea of the specific steps involved in turning on the ARM core and starting the ARM application.  One thing to be aware of: the UBL source code refers to the PRU as "DMAX."

  • Hi Maxime, we just put up some detailed instructions and examples on how to boot ARM code on the OMAP-L137. Please find the article here: http://processors.wiki.ti.com/index.php/Boot_Images_for_OMAP-L137#Booting_ARM_Binaries

    Take a look and let me know if you have any questions. This was just created today. Thanks,

    Jeff

  • Thank you so much, Just have one or two things to modify my code in order to make it work, but it should be okay.

     

    Thank for you fast support !