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.

OMAP-L138: How to burn a simple program to the flash

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138

Hi,

I'm trying to learn to use MityDSP-L138F, an evaluation board that uses TI's OMAP-L138. I don't know if this is the right place to ask for support, but I'll give it a try.

I've been using the board for over a week now, but I've made very little progress so far. I'm pretty unexperienced and the tutorials provided by Critical Link are insufficient. In my host PC, I have CCS v7 running on Windows 7, and I'm able to debug ARM9 and C6748 programs that simply print "Hello World" using an XDS100v2 JTAG debugger. My host PC is also connected to the board through UART, and I can reach the U-boot commands. (However, U-Boot does not boot to Linux, since the "bootcmd" environment variable was modified before I was given the board. When I try restoring bootcmd, U-Boot says it's "erasing SPI flash" and stays there forever.)

Now, what I need to do is burn a flash memory (not sure whether NAND or NOR) with the simple program that prints out "Hello World", but I don't know how to do so. I've looked it up through the forums and documentation of both MityDSP and OMAP-L138 EVM. I know that I need to convert the *.out file built by CCS to a binary using the AISgen tool. I also know I can flash it through either the JTAG and CCS or the UART interface. However, I can't follow the instructions provided in the wiki pages.

Last but not the least, may I use the documentation provided in this site, or do I have to stick with Critical Link?

Thanks in advance.

  • Hi,

    You can boot your linux from SD Card, see the procedure here:
    e2e.ti.com/.../613422
    Linux SDK can be downloaded from:
    www.ti.com/.../processor-sdk-omapl138

    Software developers guides are located here:
    Linux: processors.wiki.ti.com/.../Processor_SDK_Linux_Software_Developer’s_Guide
    RTOS: processors.wiki.ti.com/.../Processor_SDK_RTOS_Software_Developer_Guide
    processors.wiki.ti.com/.../Processor_SDK_RTOS_Getting_Started_Guide
    processors.wiki.ti.com/.../Processor_SDK_RTOS_Release_Notes

    The documentation provided here is the one you should use for OMAP-L138 device & SDKs.

    Best Regards,
    Yordan
  • Thanks for responding so quickly. That'll be useful when restoring Linux.

    However, I still don't know how to send an executable to the board. Before moving on to Linux or some RTOS, I want to make sure that I can program the DSP and/or ARM core with a simple code.

    I'm trying to apply the instructions here: http://processors.wiki.ti.com/index.php/OMAP-L138_Software_Design_Guide#Product_Integration

    To create an executable, I built a HelloWorld project in CCS for release, converted its output COFF file to the AIS format using the AISgen tool, but I'm not sure what to do next. The wiki page above claims that I can transfer the executable via either JTAG or UART, both of which are fine by me, but it doesn't tell how.

    Then, I moved on to: http://processors.wiki.ti.com/index.php/Boot_Images_for_OMAP-L138 

    Flash the AIS image

    For NAND, NOR, and SPI bootmodes, use the serial flasher to flash the image to the desired boot medium using the "-flash_noubl" option. See the serial flasher wiki for more details.

    For UART bootmode, use the serial loader to loader to boot from the UART host as follows:

    ./slh_OMAP-L138.exe -waitForDevice OMAPL138-ARM-LED-uart.bin

    I don't know which boot mode I am or should be using. MityDSP does not have boot pins and its manual does not even mention boot modes. Am I missing something?

  • Hi,

    See this thread:
    e2e.ti.com/.../614814

    To load & run a program through ccs, it should be just a matter of connecting to one of the cores, load your binary & execute it, see this wiki:
    processors.wiki.ti.com/.../Processor_SDK_Bare_Metal_Examples

    Best Regards,
    Yordan
  • Hi, Yordan,

    Thanks for helping me out. I read the "Processor_SDK_Bare_Metal_Examples" wiki, and I already know the steps up to 7. However, I'm lost after the next step.

    8. Launch target configurations using your emulator to connect to OMAPLx/C674x LCDK as described in the Getting Started Guide.

    That "Getting Started" guide never mentions "target configurations", as far as I can tell. What does this line wants me to do?

    9. Developers can Connect to the C674x on OMAPL137/C6747/C6748 can connect directly to the DSP. For OMAPL138 device, you will need to connect to the ARM as this is ARM master boot device and ARM needs to power up the DSP You should see the following log in the Console

    The first sentence is not even a sentence... And step 10 is missing.

    11. Select and Connect to C674x. Load and run hello_world_dsp.out file. You should see Hello World string displayed on console window.

    Again, where exactly am I supposed to select and connect to C674x?

    I'm sorry for asking so many questions, but I really don't understand anything at all from those instructions. Could you at least simplify them a little?

  • Hi, 

    You can create your target configuration file as follows: 

    click File -> New -> Target Configuration File 

    On the popup window write the name of your target configuration and click Finish.

    A new tab opens. It looks like bellow:

    Next to connection, select the JTAG emulator you're using (Blackhawk, Spectrum Digital, etc...)

    In the list bellow, where it says Board or Device, select your board LCDKOMAPL138 or LCDKC6748 (whichever you use).

    After that hit Save, then you can verify your connection by using the Test Connection button.

    NOTE: The above procedure is for CCS v7 & CCS v6, I don't have a previous version installed. 

    Best Regards,
    Yordan 

  • Okay, but I think that target configuration file is already created if you specifically choose ARM9 or C6748 while you create the CCS project, so I got that part.
    As for the CCS version, mine is v7, so you don't need to worry about that.
    So, what's next?
    Thanks again.
  • Once you verify your connection is ok, with the Test connection button, you can start a debug session.  This is done by hitting the debug button:

    This will launch a debug session & you will see a Debug tab, where all device cores (ARM, C6748, etc.. ) will be visible: 

    NOTE: If you're connected you will see the device cores instead of the NewTargetConfiguration.ccxml. 

    Next you can right click on the desired core & connect to it.  Then load a binary & execute it. 

    Best Regards, 
    Yordan

  • Hi, Yordan,
    As I stated in my initial post, I'm already able to debug the board and see its output in the debug console. What I'm asking your assistance for is sending the executable (the *.out or .*bin file built for release) to the board, so that next time I power up the device, it'll be there and I can execute it from the serial monitor (without using the JTAG debugger).

    Then load a binary & execute it.

    This is still for debug, right?

  • Ok,

    As I said you can tftp it from uboot, as I noted in my first reply & as described here:
    e2e.ti.com/.../614814

    You need to change the addresses, so that they match your hardware.

    Best Regards,
    Yordan
  • Hi Yordan,

    I read the forum post in e2e.ti.com/.../614814 but I still don't understand how that solves my problem. All I know now is whoever asked that question was using an invalid address.

    Then, I moved on to www.denx.de/.../UBootStandalone where the executable is downloaded to the board as an "*.srec" file through the serial port. I tried doing that, too, which didn't work.

    As for TFTP, I can't find any tutorials about that on the web.

    What do you think I should do next?

    Thanks again.
  • I'm on the same boat. I followed above and many other tutorials discussing how to flash dsp program (.out file) in NAND memory. The closest I got was using this tutorial processors.wiki.ti.com/.../OMAPL138_StarterWare_Booting_And_Flashing, where every step was succeeded but when I reboot, the program doesn't work. I was trying to control onboard leds with onboard switches (My board is omapl138-lcdk). I'm having hard time in both flashing .out file on dsp core alone when board is booted from NAND memory and in sd card boot up mode where linux is starting a dsp .out application.

  • Hi,
    My colleagues have solved the problem. Here's what we do:
    * Set up a TFTP server for the host PC (I'm currently using an application called "TFTP Util" on Windows)
    * Configure the IP addresses of both the host (through the Control Panel settings) and the board (by editing some environmental variables).
    ** For example, on the host, set ipaddr to "192.168.1.11" and serverip to "192.168.1.10".
    ** On your host PC, you can set the IP address as "192.168.1.10" with the default subnet mask.
    ** (I've also read other methods involving DHCP, but I don't know how to apply those.)
    * Connect the board to the PC with an Ethernet cable.
    * On the PC, start the TFTP server by selecting the correct IP ("192.168.1.10" in my example).
    * Then, on das U-Boot (to which I assume you have access via a serial port) of the board, type "tftp c0700000 path_to_out_file/binary.out", where "binary.out" is the output file of your project formatted in COFF.
    * Finally, type "bootdsp c0700000".
    That solved my problem. Hope it'll solve yours, too.
  • Thanks for the reply. Everything which you mentioned goes fine except the command "bootdsp c0700000" where u-boot says 'unknow command 'bootdsp''. After going through all these steps I reset the switches 1-4 to OFF-ON-ON-ON to boot from NAND and serial terminal show me message saying StaterWare OMAPL138 Boot Loader but the project doesn't run on the board. I've tried using default blink led projects from different ti-wares (starterware, sdk-lcdk old one (1.0), mcsdk and latest processor-sdk). I don't know how to format .out in COFF format.