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-F280049C: Unable to load example code

Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: AFE031

Tool/software: Code Composer Studio

Hi support,
I am working on a PLC EVK, but was failed to load the example code boostxl_afe031_f28004x_dacmode to the C2000 Launchpad LAUNCHXL-F28049C. Followed with the instructions, the CCS Version 10.1 has been installed, the XDS110 driver has been updated, the cJTAG 2-pin advanced modes and OSCAN2 format were selected under connection properties. There's no error prompt with "Build" and "Load" operation (led2 is flashing while Loading). But after reboot, it's sill running the preloaded program. Another example code led_ex1_blinky was also tried , but same situation was experienced.
Please advice!
Thank you.
Eric

  • Eric,

    Here is the user-guide for the piece of hardware you are trying to use. You can follow this step by step,

    https://www.ti.com/lit/ug/spruii7b/spruii7b.pdf

    With the information you have provided, we cannot comment much at this point.

  • Hi Karthik,

    I did all those with following the instruction on Page13 !

    And I tried with example code adc_ex1_soc_epwm following www.youtube.com/watch I got some reasonable ADC values on debug mode for GND and 3.3V input, but only one time conversion even //ESTOP0 within the while (1) loop was commented out. I doubt that the .out file was loaded to the MCU correctly.

    Thanks,

    Eric

  • Hi Eric,

    Eric_L said:
    failed to load the example code boostxl_afe031_f28004x_dacmode to the C2000 Launchpad LAUNCHXL-F28049C

    Eric_L said:
    There's no error prompt with "Build" and "Load" operation

    Can you clarify? Are you seeing a load error or not?

    Eric_L said:
    Another example code led_ex1_blinky was also tried , but same situation was experienced

    What are you observing? When the program loads, does the program counter jump to main()? Can you single step through the source code in CCS?

  • Hi Gus Martinez,

    There's no build error or load error.

    During loading, the LED2 was blinking and a menu was popped up and then disappeared.

    Here is the console output after Flash:

    C28xx_CPU1: GEL Output:
    Memory Map Initialization Complete
    C28xx_CPU1: GEL Output: ... DCSM Initialization Start ...
    C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
    C28xx_CPU1: GEL Output: ... DCSM Initialization Start ...
    C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...

    When the program loads, does the program counter jump to main()?  -- Please clarify how to verify.

    Can you single step through the source code in CCS? --- Yes, in debug mode.

    But if I click Go Main in debug mode, then Step Into and Step Over are greyed out.

    Thanks,

    Eric

  • Eric,

    Eric_L said:
    When the program loads, does the program counter jump to main()?  -- Please clarify how to verify.

    When you start the Debug mode, CCS should automatically load your project and jump to main() in the source code.

    I tried the led_ex1_blinky example. This is what my project look like when I start my Debug session. Note that the program counter is in main().

    Eric_L said:
    But if I click Go Main in debug mode, then Step Into and Step Over are greyed out.

    If you were already at main() (see image above) and you tell CCS to "Go Main" from there, it will start program execution looking for main. Since there is an infinite "for" loop in the code, the program will never come back to main, CCS won't stop and the Step Into and Step Over will continue to be grayed out. You can click the Pause button at any time to stop the program, then you should see the Step Into and Step Over button become active again.

    Having said all this, there is a bug in the led_ex1_blinky example. It is toggling the wrong GPIO, hence you won't see any change in the LaunchPad. You can correct the code, rebuild it, and reload it.  The correction is simple: change DEVICE_GPIO_PIN_LED1 to DEVICE_GPIO_PIN_LED2. The corrected code is given below.

    Updated post: There is no bug in the LED example code. In fact, I was using the wrong build configuration for the project. To get the led_ex1_blinky example to work correctly you need to build the project with one of the LAUNCHXL configurations in CCS. To change the build configuration, from CCS, select Project -> Build Configuration -> Manage. Here you select the LAUNCHXL which executes from RAM or FLASH.

  • Hi Gus,

    Thanks for the clarification! It's working now but ONLY in debugging mode. After reboot or repower, the program will not be able to start and run.

    Please help to verify!

    Thanks,

    Eric

  • Hi Eric,

    That's great! 

    You will need to load your program to device flash in order for your code to always run after reboot or repower. There is an excellent workshop explaining how to do this for the F280049C. You can find that material here:

    See Chapter 10

    Please, let's mark this thread resolved & close since the original problem was resolved. If you have issues or questions loading the program to flash, you can always open a new thread with specific questions on that topic.

  • Eric,

    Please see my update to the post on 7/17. If you want the LED example to run out of flash, simply change the CCS build configuration to CPU1_LAUNCHXL_FLASH.

  • Hi Gus,

    Yes, already got that working by right click led_ex1_blinky ---> Properties ---> Manage Configurations ---> select FLASH_CPU1 ---> Set Active ---> OK.

    Thanks for your support!

    Eric