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.

Piccolo/ boot from Flash

Other Parts Discussed in Thread: TMS320F28035, CONTROLSUITE

We work with TMS320F28035 and F28M35H52C1 based custom board and CCS 5 with USB JTAG emulator.We can not perform booting from the flash without  CCS running.

We managed to run from the flash Example_2803xLEDBlink project without sys/bios using. But the same application with SYS/BIOS using doesn't run from the flash.

Of course sys/bios program includes another cmd file - TMS320F28035.cmd instead of F28035.cmd(in Example_2803xLEDBlink project without sys/bios).

Should we do any  additional steps for running program(with SYS/BIOS using) from the flash ? Could you help us with this ?

Thanks,Sabina

  • Sabina,

    Recent XDCtools releases provide a “Boot” module that can be used to enable booting from Flash.

    For the F28035, if you add this to your application configuration file (.cfg file) it will cause a long branch instruction to the program entry point to be generated, which should get the C28 booting from Flash:

    var Boot = xdc.useModule('ti.catalog.c2800.init.Boot');
    Boot.bootFromFlash = true;

    There is similar support for both the M3 and C28 on Concerto (in the 'ti.catalog.arm.cortexm3.concertoInit.Boot' and ‘ti.catalog.c2800.concertoInit.Boot' modules respectively).

    You can find some documentation on these modules in the XDCtools release.  Or, via the download site for a particular release, for example:

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_23_03_53/exports/docs/cdoc/ti/catalog/c2800/init/Boot.html

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_23_03_53/exports/docs/cdoc/ti/catalog/arm/cortexm3/concertoInit/Boot.html

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_23_03_53/exports/docs/cdoc/ti/catalog/c2800/concertoInit/Boot.html

    Have you tried using these Boot modules?

    Also, which versions of SYS/BIOS and XDCtools are you using?

    Scott

  • Hi Scott,

    We work with SYS/BIOS 6.33.3.33 and CCS 5.1.
    I added above changes  into the cfg file - but it doesn't help

    Thanks, Sabina

     

  • Hi Scott,

    in the beginning of the main() I have the following code:

    Int main(Int argc, Char* argv[])
    {
      MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
      InitFlash();
    ....
    }

    After removing InitFlash() calling, boot from flash work (it seems so...).  Sould we init the flash memory or not?

    Thanks,Sabina

  • Hi Sabina,

    This is for the F28035, right?  Not Concerto?

    Which version of XDCtools are you using?

    I don’t know why you would need to comment that function out to get the program to run.  Is the InitFlash() function your own, or from controlSUITE?

    Adding “Boot.bootFromFlash = true;” will have the program generate a “LB _c_int00” and place it at BEGIN specified in the linker command file (0x3f7FF6).  That is all it will do, so I can’t see why it would cause a problem where you need to not call that function.

    Are you using the linker command file provided by ti.platforms.tms320x28?  If you are using a different one, can you please post its contents?

    Thanks,
    Scott

  • Hi Scott,

    It is F28035, XDCtools  ver 3_23_01_43, InitFlash() function is from controlSUITE. For linker we use DSP2803x_Headers_BIOS.cmd , but project includes also TMS320F28035.cmd. Both files attached. 5280.Mycmdfiles.zip

    About Concherto - boot from Flash still doesn't work with the changes in cfg file. I continue working with this problem.

    Thanks for your help,  Sabina

  • Sabina,

    OK, thanks.

    I don’t know why that InitFlash() function would be failing.  

    If you don’t call this function, does everything else seem to be OK, but maybe running a bit slower without the Flash controller configuration?

    If you call InitFlash() and the application doesn’t boot, can you attach with the debugger and see what the CPU is doing?  If it has crashed, I wonder if you can put a spin loop before calling InitFlash(), boot, connect with the debugger, set the program counter to the call to InitFlash(), and step into the function and watch what happens?

    I will also send an email internally to see if I can get some ideas from those familiar with InitFlash().  

    For Concerto there are some different Boot configuration parameters to be set.  Please see this forum thread: http://e2e.ti.com/support/embedded/bios/f/355/p/195714/701228.aspx#701228  The configuration settings are described in the second message posted to that thread.

    Scott

  • thank you very much for the help!

  • Sabina,

    So the boot problem is resolved now?

    FYI, last night a new XDCtools was released that provides support for initializing the M3 and C28 Flash controllers on Concerto devices.  It is here: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_23_04_60/index_FDS.html

    This update does not initialize the Flash controller on the 28035 or other standalone C28x devices; that is planned to be added to a future XDCtools release.  But for Concerto, if you move to this new release you won’t need to explicitly call functions for doing the initialization.

    Scott

  • Hi Scott,

    Yes, it is resolved now. I've downloaded new XDTOOLS and started  working with it. 

    Thank you very much, you helped me a lot.

    Thanks, Sabina

     

  • Hi Scott,

    If application is not dial core - boot from the flash with SYS/BIOS work properly. But if application is dual core(with sys/bios) - boot from flash doesn't work. I compiled code with new XDTOOLS and put in cfg file for arm:

    var Boot = xdc.useModule('ti.catalog.arm.cortexm3.concertoInit.Boot');
    Boot.bootFromFlash = true;

    for dsp:
    var Boot = xdc.useModule('ti.catalog.c2800.concertoInit.Boot');
    Boot.bootFromFlash = true;

    Should we do something else for booting from flash dual core application?

    Thanks,Sabina

  • Hi Sabina,

    To have the M3 boot the C28 you’ll need to set an additional configuration parameter for the M3’s Boot module:

    Boot.bootC28 = true;

    This will have the M3 Boot module communicate with the C28 boot ROM to start your C28-side application running.

    This parameter is usually “false” for a CCS debug environment, because the C28 boot ROM is not free running when CCS is attached to the C28, and the M3 will get stuck waiting for the necessary handshakes with the C28 boot ROM.  But when booting entirely from Flash, you should set “Boot.bootC28 = true” so that the M3 will start the C28 side application running (since CCS isn’t present).

    Does setting “bootC28” get your C28-side application running?

    Thanks,
    Scott

  • Hi Scott,

    Yes, it start working from the flash!
    With this parameter setting application doesn't run with debugger connected (in CCS debugging mode) - I have to restart device and application is running from the flash.
    it seems that C28-side works also - have to verify it more.

    Why it doesn't work with debugger connected ? it is no so important, but...we have to comment this parameter by working from debugger

    Thanks a lot for your help, Sabina

  • Hi Sabina,

    OK, good!

    To start the C28 running the M3 needs to send an IPC command to the C28’s boot ROM. To do this requires some handshaking, to determine if the C28 boot ROM is ready to accept a new command, and then to send the actual command to boot the C28 program from Flash.  Also, in this latest XDCtools release there are some additional IPC commands to the C28 boot ROM to initialize certain C28-side memory regions before booting the C28 from Flash.  (If you want, you can look at the sources of the M3 Boot module for doing this; it is located in the “packages\ti\catalog\arm\cortexm3\concertoInit” subdirectory of the XDCtools installation.)  All of this IPC communication requires that the C28 processor be running and able to communicate with the M3.  

    In a typical CCS configuration the C28 is not running, and the M3-side IPC code will get stuck attempting to handshake with the C28 boot ROM.  It may be possible to find a CCS configuration that will allow this, but I tried several things and could not find a configuration that worked for me.  I know of other users of this code who will routinely change this bootC28 configuration parameter when they go from running their programs with CCS versus Flash.  It is a bit of a pain, but I don’t know of a way around it at the moment.

    Scott

  • Hi Scott,

    thanks for your help. Now it is much more clear.

    We thank you for so profesional assistance, Sabina 

  • Hi scott,

       I try to config the .cfg with boot configuration of my M3 side.  

    My C28 code was downloaded without RTOS. When i try to debug my M3 it was looped in  "Boot_initC28RAMs(Void)" this function.

    After reading this post, i restart my device. So my code was running in both M3 and C28, but IPC was not initialized.

    Both of my M3 and C28 core was running, if i send a data from the C28 to M3 means that time C28 was hanging in the IPCput function.

    I am using Concerto F28M3H52C1 custom board.

    My RTOS version 1_20_00_28 version. My XDC tool version is 3_25_04_88

    Please help me to resolve this error.

    Thanks in advance

    Thirumoorthy.R