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.

Issue about running code from flash (Stand-alone operation)

Other Parts Discussed in Thread: TMS320F28335

Hi,

I am creating CCS project and doing some tests, but now I met issue that my project could not run from flash when with emulator disconnected (stand-alone operation).

CCS4 version: 4.2.3.00004 

Target platform: TMS320F28335 Experimenter's Kit

Emulator: XDS100 emulator on chip 

Issue description:

I build the project with linker command file "28335_FLASH_lnk.cmd"(see attached file) and debug successfully, but after I program it into flash, it failed to run (Seem failed to boot, the LEDs were not blinking as normal).

The program sequence:

1>Build the project with "Debug" configuration;

2>Click "Debug" button to launch debug session during which the flash would be erased, programed and verified;

3>Click "Load program" button to reload again;

4>Terminate the debug session and power up the board again;

Is the program process incorrect? Or my configuration especially linker file wrong? (See map file attached)

It really confused me a lot and I have checked the boot process for a while , it seems OK, but why it fails to run when stand-alone operation?

Hope hear from you soon and thank you by advanced!

  • Hello,

    lz li said:

    The program sequence:

    1>Build the project with "Debug" configuration;

    2>Click "Debug" button to launch debug session during which the flash would be erased, programed and verified;

    3>Click "Load program" button to reload again;

    4>Terminate the debug session and power up the board again;

    Step #3 is not really needed since is step #2 will load/flash the program. Otherwise the steps look fine.

    If you terminate the debug session and power cycle the board (step #4), I would expect the code you flashed to run and blink the LED. Can you try shutting down CCS and disconnecting the cable between the kit and the PC and doing a power cycle and see if the LED blinks?

    Thanks

    ki

  • Hi Ki,

    Thanks very much for your kind and fast response! I have done the test based on your suggestion, but unfortunately, it does not work!

    I doubt it is caused by the linker cmd file but not very sure, so I attached it and could you please check it for me?

    Thanks very much!

    lz

  • Hi Ki,

    Also I got the suggestion that it may be caused by the watchdog timeout, and it is better to disable watchdog before _c_int00 is called.

    But my question is, in CCS4 project, where can I find the asm file "CodeStartBranch.asm" to disable the watchdog? I could not find it in my project!!

    Thanks very much!

    lz

  • Hi,

    Pls check you boot load pin settings for you micro controller.

    If the boot load setting is not set as BOOT from FLASH.  You're program will lost once power-off.

    Regards,

    Karthick PH

  • Hi Karthick,

    Thanks for your reply!

    I have checked the boot load pin status, all four pins GPIO84~87 should be kept as high(1) which means "Boot to flash" is selected.

    See attached pictures.

     


  • Hi lz,

      It looks you have done the boot mode settings correctly.  If your program still not booting from FLASH, there is a

    possibility of allocating memory sections to the FLASH.  please verify your .cmd linker file. (also I have attached the

    .cmd file to boot from flash)2867.build_linker.zip

    Also read  "Running Code Standalone" topic from the following link;

    http://processors.wiki.ti.com/index.php/C2000_Flash_Common_Issues/FAQs#Using_Breakpoints_During_Debugging

    Best Regards,

    Karthick

  • Hi Karthick,

    Thanks very much for your reply.

    My vacation is coming, I will try your suggestion after my vacation and keep you informed the result.

    Best regards!

  • Hi, it is solved?