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.

CCS/LAUNCHXL-F28379D: settings for Boot from Flash/CCS/source

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: CONTROLSUITE, , C2000WARE

Tool/software: Code Composer Studio

Ok so I have CCS 8.1.00011 and the out of the box demo in the latest controlSUITE.

After nuking the project settings I got the debugger working fine.

My attempts at simply writing a modified version to the Flash, and having it boot on it's own without the debugger, have gotten nowhere.

I've tried reading the 1 day workshop on C2000 as it is specific to the F2837xD, it didn't help much.

So far I've found on this forum several posts with the same sort of issue, it just left me with some info:

1) Need to change SW3 position 1 to 0 to change the boot mode.

2) Something about OTP_BMODE needing to be set to 0x0B Flash mode

3) Something about a disableWatchdog

4) The CCS debug is also the Flash tool

I would have expected something as important as writing to a permanent copy of the program to a microcontroller so it will boot in standalone mode, to have an entire chapter as the guides on using the debugger do.

Vague references to settings aren't helpful, are these in CCS, the source code, or some other unrelated program I'm not using ?

Really, really frustrated at this point. Please TI rework the documentation for this board/micro, information should not be this scattered.

Write a chapter/document specific to booting from flash in standalone mode, include the Flash/boot/CCS interactions.

ps: Board is stuck in some mode where it does nothing on boot, until I use the debugger, would at least like a way to fix that.

  • Hi,

    We can understand your situation. We will see how we can improve our documentation.
    Have you tried "blinky" example in the controlsuite with Flash configuration? By default the RAM configuraiton will be set.

    Regarding the OTP_BMODE, you don't have to program OTP to get to boot to flash. When there is NO OTP KEY programmed in flash and when boot mode pins are set to HIGH the device boots to flash.

    Please tell the exact steps you followed and the project (with the configuration name) you have used to know more details about the problem.
    Also, please check this thread to know more details : e2e.ti.com/.../140316

    Thanks,
    Katta
  • I did look at the blinky example, aside from using the one in the stand alone flash program folder, I don't see what is different in it.

    Anyway, back to the problem I am having.
    It certainly seems to be a problem with flash load addresses, I can't step through/run the program in the debugger with it in flash mode, no code to run.

    I did find this older TI video that does cover the Flash process.
    www.youtube.com/watch
    I have no idea how to setup the ASM files shown, linker settings etc, is that part supposed to be scripted somehow ?

    The code I'm trying to get put back onto the F28379D is the original demo (with or without minor code changes)
    Found in the latest controlSUITE in \development_kits\LAUNCHXL-F28379D\LaunchPadDemo\

    Would be great to have a known working CCS 8.1 project for this with all the Flash settings/files/mess configured. That way I could limit myself to modifying the C source and learn the boot loader/flash memory behavior later on as I originally planned. Too many variables in how all this is setup, need a project with the RAM configuration _AND_ Flash configured, tested and working.
  • Hi,

    Ok. I have compared both the examples - LaunchPadDemo and blinky(for LAUNCHPAD_FLASH configuration).
    One difference i could notice is LaunchPadDemo doesn't have "code_start" mentioned in the project settings at "Project properties -> CCS Build -> C2000 Linker -> Advanced options -> Symbol Management -> Specify program entry point for the output module (--entry_point, -e)" .

    So, please mention this option in your project or use blinky(LAUNCHPAD_FLASH configuration) to test again.

    ASM file(F2837xD_CodeStartBranch.asm) is already included in both the projects. Linker settings shoould work as it is.

    Please let us know if you face any issue.

    Thanks,
    Katta
  • OK so I stepped through the code in flash mode, using the debugger.

    It calls InitSysCtrl disables the watchdog, and dies when trying to run InitFlash(), after copying it to RAM.
  • Hi,

    That's strange. Can you step in to the InitFlash() and see where the issue is occuring?
    Did you made any changes to the linker command file?

    Thanks,
    Katta
  • I ended up re-installing controlSUITE (after creating a backup of the project files) in case it was a library issue, and to see if it works without needing to redo the project setup.That wasn't a solution, for the most part it made things worse.

    As it turns out, in my case I didn't need 2837x_FLASH_link_cpu1.cmd to be able to flash the LaunchPad, in fact deleting it fixed one issue.

    What I did need was to use the examples from C2000Ware, hidden in there is a project folder called only "launchxl_f28379d" which is in fact the Out of The Box demo, which works as is in CCS 8.1, and only leaves a few steps left to flash the device.

    Steps below for simply taking a program from C2000Ware's "f2837xd" examples, and writing it to flash.

    1. One the program has been tested, and found working in debug mode in RAM. It's time to flash it.
    2. Switch to flash mode:
    Right Click on the project itself "Example_28379D_LaunchPad [active - CPU1_Ram]" and go into Build Configurations > Set Active choose CPU1_Flash

    3. Now run the debugger again now it's in in flash mode.The program is now written to the flash.
    4. Press Run to run the code to verify it works, then press suspend.

    5. Then use a script in Scripts > EMU Boot Mode Select > EMU_BOOT_FLASH
    to 'upgrade' it to boot to flash instead of memory.
    6. Now press reset on the debug toolbar, then Run. It should run the program again.
    7. Now press Stop to disconnect from the device.
    8. All going well you should be able to unplug the device, plug it back in (for USB power) and have it run the program standalone.

    (above steps created from experimentation and watching www.youtube.com/watch )