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.

f28335 boot from Flash and Autorun option



Hi,

I am working with CCS 5.3 and f28335. I was able to build my code and run it from RAM. the .cmd file is a combination of DSP2833x_Headers_nonBIOS.cmd and 28335_RAM_lnk.cmd. in the .map file, I can see that the program memory and data memory resides in RAM :

 ENTRY POINT SYMBOL: "_c_int00"  address: 00009b41

Boot pins XA15..XA12 are in "jump to SARAM" position. So if I got it right, after the boot the PC jumps to the entry point which resides in RAM. is it correct?

Now I am trying to create a "release" version, meaning load the program in Flash and run it automatically on Power-on, without pressing every time "play" from the debug session.

I have created a new .cmd file, taking f28335.cmd and adding DSP2833x_Headers_nonBIOS.cmd in the linking search path.

the .map looks correct, all the sections resides in Flash (0x33xxxx adress),  and "_c_int00"  address: 00338b2c.

Boot pins are in "jump to FLASH" configuration.

What I am not able to do is to run the code at the power-on. I still have to load the program from the debug and launch it pressing "play" every time. If I turn off and on the board, I see that the code is not running. I have tried to modify the "autorun options" in the debug proprities (selecting and deselecting the 2 check boxes) but the result is always the same. Probably there is some setting which tells the processor to run automatically on power-on, but i couldn´t find any information in the various manuals and app notes available.

Can someone help me solving this issue? what is still missing? Where can I find some detailed information about this topic?

thanks

Sergio

So then I tried to move

  • Hi!

    Make sure that the file DSP2833x_CodeStartBranch.asm is present in your project.

    Regards,

    Igor 

  • Hi,

    thanks for the suggestion. i added DSP2833x_CodeStartBranch.asm in the source folder, and now it is compiled. i see in the .map the entry point to the boot.obj adress. 


    I am experiencing the same problem though. Code doesn´t start at power-on. Do I have to change something in the debug options for "release" version ?

    what is missing?


    Thanks


    what else is missing? 



  • Hi!

    Further...

    1 Make sure that the function "void config_flash(void)" is presented at the source code and is called at your main()-function.

    2 Make sure that the definition "FLASH" is presented at project options section: Build->C2000 Compiler->Advanced Options->Predefined Symbols.

    3 Try to use 2045.28335_FLASH_lnk.rar (it need unpack) instead of F28335.CMD.

    4 At first try to run your flash-project at the debug-mode of CCS. And if it will work you can try to run its with power-on.

    Regards,

    Igor

  • Hi David,

    thanks for the link, this is what I was looking for. 

    I made all the specified steps, and i am able to compile. What it is still not clear is how to load the .out file in the device for autorun. I am doing it via the debug view, but I still need to press "play" in order to run it, and when I turn off the board, the program is lost. boot pins are in "boot from flash" mode.

    So, assuming that my .out is correct, what is the right way to load the program for run it automatically at every boot of the board? 

    is there some "special" setting or steps which are not captured in the pdf you sent me ?

    thanks for your help

    Sergio

  • Sergio,

    sergio schivazappa said:

    What it is still not clear is how to load the .out file in the device for autorun. I am doing it via the debug view, but I still need to press "play" in order to run it, and when I turn off the board, the program is lost. boot pins are in "boot from flash" mode.

    So, assuming that my .out is correct, what is the right way to load the program for run it automatically at every boot of the board? 

     
    When you load the program in CCS, it burns the code into the flash.  Nothing wrong with this method.
     
    In Debug view, open the Disassembly window.  Then, reset the device on the CCS Debug menu.  The diassembly should show you at address 0x3FF9CE, which is the start of the ROM bootloader.  Now step the code.  It takes about 60 steps (something like that, but don't count.  It could be more or less, I don't remember) to get through the bootloader in jump-to-flash bootmode.  After the right number of steps, you should see the code branch to the jump-to-flash entry point at address 0x33FFF6.  You should have the branch instruction from the CodeStartBranch.asm file there.  It probably branches to a WD disable function, and then on to _c_int00 from the compiler RTS library.  Point is, you should be able to step the code and follow the execution path in order to find out what is wrong.  You cannot step through _c_int00.  Too long.  When (if) you get to _c_int00, do a Go_Main on the Debug menu in CCS and see if you get to main().
     
    Regards,
    David