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.

Take a working CCS example project to standalone

Other Parts Discussed in Thread: OMAP-L137, OMAP-L138

Hello,

I'm using a Spectrum Digital OMAP-L137 EVM board. Here’s a recount of all I’ve done after visiting all the documentation that I can find. I'm simply trying to take an example app and make it work standalone...

I have a working standard application using NDK 2.0.0. using CCS 3.3. I have prepared for standalone execution adding the following capabilities to main():

The equivalent of the GEL initialization is now done 1st.
Setup of UART2 and a short message sent to UART2
 
This works under CCS hooked up to the EVM board using an XDS510 USB JTAG connection. I then attempt to make this work standalone by the following steps:
 
Using the resultant app.out of the above application I have created an AIS binary using AISgen for D800K003 (the EVM board has D800K001 version by the way, but is still supposed to be compatible). This is to standard setting setup by selecting “Configure for EVM”. These values appear correct. AISgen denotes that it has created the app.bin file successfully.
The JTAG connector is disconnected and the boot dipswitches are set for UART2 boot. A null modem serial port cable connects the PC to EVM board.
The SPI flash is presented the app.bin file using the utility sfh_OMAP-L137.exe by the following steps:
1) sfh_OMAP-L137 –p COM3 –spierase
2) sfh_OMAP-L137 –p COM3 –spiflashnoubl app.bin
 
At this point the application should be in SPI flash at start address 0. Put the boot dipswitches to boot from SPI flash. All of this from the documentation I’ve been able to find with the result that it doesn’t work. I do not see the message from UART2 and the Ethernet operations do not occur. I’m blind as I’m disconnected from the JTAG. Is there any way to debug this? I’m not sure CCS connects via JTAG without being invasive (GEL and maybe more) and dictating it’s own resources on the app(?)
 
I’ve not seen references to the above troubles in any documentation or blogs I’ve encountered. Any ideas on how to get this app to work – or to properly debug it?

Thanks for your time & effort,

Steve

  • Hi Steve,

    First, the majority of the stuff that happens in the gel file should be done by the bootloader (i.e. through settings entered in AISgen) as opposed to being put into main.  Consider this scenario.  Assuming you have code that resides in external memory that means you would need the PLL and DDR controller setup in order for the bootloader to actually place that code in external memory.  Therefore it's critical that the PLL and DDR initialization occur very early in the boot process.  Furthermore, you do not want your code to reinitialize the DDR interface.  Doing so may cause loss of code/data that's already resident in the DDR.  In other words, you don't want to disable/reset the DDR controller while you're in the midst of executing code from DDR!

    I've not yet looked carefully at AISgen to see what all options it offers.  At a minimum I expect it will offer PLL and DDR configuration.  Beyond that it might potentially have options for pin-muxing configurations, PSC configuration, etc.  There may be a couple things that need to be done in main, but make sure that PLL and DDR init are not among them.

    Perhaps you'll find this article helpful in doing non-invasive debug of your code.  You'll need to get to a point where the code is actually being loaded in order for the article to help you.  You may want to look at a few specific places in memory to see if it has been loaded.  

    Brad

  • Before you connect to CCS, make sure you have removed the GEL file. The GEL has some functions that run when you connect, which you do not want to happen. Once the GEL is removed you can safely connect without being invasive.

    From there you should be able to see the PC and memory contents. Check and see if your code ever got loaded in the correct location using the memory window. If it's there, try doing Load Symbols to see if you ever got into your code or not.

    Jeff

  • Do you have any updates on your debug efforts?
    Jeff

  • Hi Jeff,

    I got redirected before I got a chance to finish to another board. This time a Logic OMAP-L138/TMSC6748 evm board. Have a need to get the same above mentioned application working on the 6748 SOM.

     

    Was able to get the very basic test uart CCS application up and working pretty quick. Same old story in regards to getting it to run standalone. Used the following steps:

    1) Enabled the additional initialization within main of setup normally done by the GEL. This was also provided by the vendor - so less likely to be something I screwed the pooch on.

    2) Compiled to the .out file. Used AISgen utility to create the AIS .bin. The defaults for evm were used.

    3) The evm board uses D800K002, so TeraTerm at 115200. With appropriate dip setting I got the BOOTME splash. Attempted to write the .bin file using sfh_omap-l138.exe. It sees the initial BOOTME, but then refuses to do anything more - citing read error/timeouts. This portion worked before on the OMAP-L137 board using the matching sfh_xxxx.exe utility.

    Anyways - I shifted my focus to the more immediate need of converting my working ethernet test application from the OMAP-L137 of the Spectrum Digital evm board to 6748 SOM of the LogicPD evm board. When I get that I hope to revisit (successfully) this standalone issue.

    Thanks for the tip of non- invasive debugging using load symbols only!

     

    Thanks for your time,

    Steve Speier