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.

custom board with TMS320F28377S will not run as standalone device - CCSv12

Other Parts Discussed in Thread: UNIFLASH, TMS320F28377S

Hello,

I was given a git repo of source code and a custom piece of hardware with a TMS320F28377S that uses this source code. Some time ago (maybe 2 years) this device was programmed and then deployed out in the field. Since then, a new feature has been added to the source code, which now needs to be implemented in these devices. I am able to successfully build the output target. I am able to load the new image into the flash of the device with the debugger, and I can see the code run properly while plugged into the debugger. When I power cycle the device, I am told it should just boot on it's own without CCS; this does not happen. I cannot get the device to run standalone. I have verified that the image is in the device after a power cycle (using uniflash).

There is a DIP switch on the device for toggling the boot mode pins that I have tried working with (I do not think this is the issue). Presumably, this has worked in the past with the project that I have. That said, I have been going down every path I can find. I know there is a difference between RAM and FLASH. The cmd file for this project is a custom version of one of the default flash files available for this chip (2837xS_FLASH_lnk_cpu1.cmd).

For sanity sake, I took the blinky_cpu01 example in CCS, and was able to load that into my device and have it run in standalone (so I know it is possible; I had it blink a GPIO I had access to, and measured it as proof). I tried stripping out almost everything from my own project and inserted the blinky gpio bit to see if I could get that to stick. It ran with the debugger, but not standalone.

The developer is no longer available, and I am working with what he left me. It seems like something is set wrong within the settings/properties of the project. I have the .project and .cproject files from the original project, but at this point I am not sure if something else is a miss. This should have all just worked out of the box, in an ideal world.

  • I would proceed by switching on the device in STANDALONE and allowing it to run to its faulty condition then attempt to connect the debugger but using settings that do not reset or restart the device. If all goes well after connection, the CPU should be running still, i.e. showing the Play symbol. When you hit the suspend button you should see where the instruction pointer got stuck. Spinning around in a while loop presumably.

  • Hi Maxx, 

    Sorry for the delayed response...let us see if we can help you make some progress with this debug.  It looks like you are using flash boot mode (your boot mode pins are configured for flash boot mode).  You have also confirmed that the when using the blinky app from our examples, you are able to configure and toggle a GPIO pin.  

    Are you able to move the GPIO toggle code around to see if you are able to predictably see the GPIO toggle?  If so, is it possible to place the GPIO toggle code in the code you are trying to debug.  If so, please see if you can configure this GPIO togglng at various places in your code and see if that reveals something.

    Please let us know. 

    Regards,

    Krisna

  • Thank you Kier for joining me in this effort! Here are some of my debug configuration settings:

    • Under Program: Load symbols only (the load program option would auto-load when I started the debugger, so I switched it to load symbols only; seems like I had to choose one of them
    • Under Target:
      • Program/Memory Load Options: reset the target on a connect is unchecked; auto connect if a child connects is checked; reset the target on a program load or restart is unchecked
      • Auto Run and Launch Options: auto run options are checked; launch options are checked
      • Flash settings: Reset target before flash programming/operations is checked

    Here is what I tried, based on your instructions:

    • For starters, I programmed the device, and confirmed it was running properly just after being flashed with the debugger; then I closed the debugger and rebooted.
    • With the debugger off, I turn on the device in standalone, and let it run for about 10 seconds (presumably enough time)
    • I then start the debugger. When I do, it does not restart the device, or reprogram it. It says it is suspended (CPU1), and it says '0x3FF16A (no symbols are defined)'
    • I also see the CPU1_CLA is 'Disconnected: Unknown', and I think the CLA is used based on the source code
    • The 'Suspend' button is greyed out, and when I try to resume, it goes to 'Suspended - SW Breakpoint', '0x3FE493 (no symbols are defined)'

    Not sure what to make of this behavior, or if I have followed the instructions correctly. I do not see any breakpoints that were added when in the Breakpoints window. Thank you!

  • Hi Krishna, thank you for joining in as well! I did try putting the blinky gpio loop into my code, and I removed everything that did not seem necessary. I matched the functions that the blinky gpio code had, but with my project's own versions of them (there are slight changes to the InitSysCtrl function, for example). The last thing I do before the gpio blink loop is the gpio init function, so I am not sure there is any more moving around I can do. I cannot get the my own code to run properly after a reboot in standalone, even with mostly everything removed and this blinky gpio loop (to be clear, it does work right after I flash the device).

    The main difference between our InitSysCtrl functions:

    • The blinky gpio has InitFlash_Bank0 only, while mine has InitFlash_Bank1 also
    • Then, in my main, after a few more setup functions, main makes a call to InitFlash_Bank1 on its own. Not sure why

    The list of functions in blinky gpio, and what I kept in my project, with the blinky loop:

    • InitSysCtrl
    • InitPieCtrl
    • InitPitVectTable
    • InitGpio (mine is custom to the GPIO used on my board)
  • Update, more things I have tried:

    • I completely replaced the device_support, driverlib, and libraries directories in my project and replaced them with the ones from the blinky_gpio project
    • I commented out the entirety of main from my own project and replaced it with the entirety of main from the blinky_gpio project
    • I removed all the project specific source code from my project so that I could compile main with just the blinky_gpio code
    • I replaced the cmd file in my project with the one used in the blinky_gpio project (2837xS_Generic_FLASH_lnk.cmd) (I needed to change the size of RAMM1 since my project was seeing libraries (not sure why) that blinky_gpio was not seeing, and it was complaining about not having enough size; this change matches a change made in the cmd file for my project)

    In my project, the gpio blink works right after I flash the device, but it does not work once I power cycle the device (to reiterate, when I use the blinky_gpio project, it works both after a flash, and after a power cycle).

  • I think the only way progress this is for you to make a stripped down project that demonstrates the problem that you can also distribute. If I have time I will try to at least replicate the issue on my F2837xD controlCARD.

  • Update: my apologies, I added an update a couple weeks ago but it did not go through.

    The issue has been resolved. Somehow, the F2837xS_CodeStartBranch.asm file got unlinked from the project. When I relinked this file, the issue was resolved

    Thank you Kier and Krishna for the help!!