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: CCSv7: program does not reload on rebuild after changes

Other Parts Discussed in Thread: TMS320F28335

Tool/software: Code Composer Studio

CCS Team,

I am using CCSv7.0.0.00042 with TMS320F28335 device, XDS510USB emulator.  I have a project that uses only internal RAM.  I am relying on CCS to load the program for me.  When I first enter Debug mode, the project loads and runs.  But if I change the program and rebuild (while staying in Debug mode connected to the target), it does not reload.

This is not a CCS setting issue.  I actually have CCS configured to prompt me for reloading on build, and it does prompt me.  But the program doesn't reload.  If I do Run->Load->Reload_Program then the program reloads.  I am able to see this by watching the part of the program I change in a memory view (yes, I have also refreshed the window.  It is not a refresh problem).  Alternately, I can change something like a LED blink rate, and I can see that the blink rate has not changed when I run the program.

Is this a known issue?

Regards,

David

Addendum, 03/23/17 224PM EDT -

The problem seems related to the flash programmer.  I had a constant table in flash, rest of program linked to RAM.  It seems the programmer does not do a RAM reload after flashing the device.  Earlier, I had removed the table and the failure to reload stuck.  Even without the flash table, CCS was not reloading the program after modifying and rebuilding it.  I've since restarted CCS and the behavior does not seem to stick.  If I remove the flash table, the reload is working.

  • David,

    I suspect your issue is related to this known bug https://jira.itg.ti.com/browse/CCDSK-2466.

    Although your use case does not involve CLA, the root cause of the bug, which is that the IDE remembers the last operation performed on a file and only performs that operation on reload. seems to be the same for your case. 

    The bug is targeted to be fixed in 7.2. 

  • Hi Aarti,

    I'm not convinced this is the same problem.  It might be, but hard to tell.  The problem I'm seeing is that on Program Load, the flash programmer is failing to do a RAM load after programming the flash.  This is a problem in projects that have initialized sections in RAM and flash (a debug-only situation, but a valid scenario none the less).  On program load, the flash is programmed, but the RAM is not loaded.

    A workaround is to program the flash, then change the flash programming screen for "RAM Load Only" and load the program again.

    I think someone should investigate the problem to make sure it is getting corrected.  I can supply a test case if desired.

    Incidentally, I tried CCS v7.1.0.00016 today.  The problem still exists there.

    Regards,

    David

  • Hi David,

    If you can provide a test case that would be great. I will file another bug report to make sure it gets looked at and addressed in case it is not the same issue as the one I referenced.
  • Aarti,

    Attached is a CCSv7.1.0.00016 project for F28335.  The .out file is in the /Debug folder.  You do not need to import the project.  Instead, you can just connect to the target (any F28335 board), and then do a Run->Load->Load_Program and browse to the .out file.  This will load the flash, but not the RAM.  You can open a memory window to address 0x0000/0x0001.  The correct value there is 0040 8761 (a long branch to a hard address).  But what you will see after loading is 0000 0000.  This is because the RAM failed to load.  If you do Tools->On-Chip_Flash, and set the flash tool to "Load RAM Only" and then reload the program, you will see the correct contents 0040 8761.  In the .zip file, there is also a video illustrating what I just described to reproduce the problem.

    CCS_RAM_Load_Issue.zip

    Regards,

    David

  • David,

    I can reproduce this but I wanted to check on one detail before filing the bug. 

    Specifically the issue I see is that address 0x0 (code_start) does not get loaded properly, as you mentioned. So if the entry point for the project is set to code_start, then the code does not halt at main() and does not run as expected. Changing the On-chip Flash setting to "Load RAM only" and reloading the program fixes that issue. 

    However, you had mentioned earlier that changing some code (like the LED blink rate) was also not reflected after reloading the code. This part I was not able to reproduce. For example, If I change this line in DefaultIsr_nonBIOS.c:  if(GPIO32_count++ > 1250), I do see that code has changed when it is reloaded (even without the need for the "Load RAM only" workaround). 

    Could you confirm if code changes are picked up for you on reload?

  • Hi Aarti,

    I've probably confused two different issues.  Initially I was using only RAM in the project.  I noticed that if I changed the program and rebuilt it, the program did not reload (even though I had auto-reload enabled).  I had to deliberately do a RELOAD PROGRAM to get the newly built code to load.  That was on CCSv7.0.  During the course of investigating the issue, I moved on to CCSv7.1.0.00016, and the problem does not seem to occur anymore (I just checked).  Either I had something configured funny at the time, or whatever was causing the problem in CCSv7.0 is fixed in v7.1.

    The other problem is that when you have flash and (initialized) RAM in your project, the flash programmer fails to do a RAM load after burning the flash.  Looking at address 0x0000 in RAM is just one way to detect this.  I happen to have initialized RAM at this address.

    Regards,

    David

  • Aarti,

    I did a little more looking at this today. One fine point: the flash programmer seems to be doing a RAM load after flashing the device, but it is not loading all of the RAM. I have initialized RAM at multiple addresses, including 0x0000, and then the bulk of the program is in RAM block at 0x8000. The block at 0x8000 gets loaded after the flashing, but the code at 0x0000 does not get loaded. Just wanted to point this out.

    - David
  • David,

    Thank you for clarifying. I filed bug # CCBT-2077 for this issue.