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.

Loading a program into the flash memory of the LAUNCHXL - F28027 using simulink and ccsv5

Other Parts Discussed in Thread: CONTROLSUITE

Hello, 

I'm trying to make program my board using simulink and would like to load a program onto it so that when I plug it in, my program will boot and run automatically. I have encountered several problems while attempting this:

1) It seems that the switches on the board must be in a certain position and that the I might need to add or remove some jumpers. Most posts just say that it must be in the same position as when I took the board out of the box. Since I was not the first person to use this board, I do not know what those settings are. Could someone please tell me what position the switches and jumpers should be in?

2) From what I have understood, I need to build my program to load onto the flash memory of the board. In the configuration parameters of my simulink model under hardware implementation , I set my hardware board to "TI Piccolo F2802x (boot from flash)" and the device name to F28027 and checked the "Boot from flash (standalone execution)" box. Next, I went into "Flash_loader" group under the hardware implementation and ensured that it was set to "Erase, Program and Verify." The problem seems to be with the location of the API. When I hit "execute" I get an error saying that "The TI flash API library does not exist on your machine. Specify the right path or download the appropriate flash APIs from TI's website or TI's controlSUITE installer." The downloadable APIs in the TI site are only for ccsv3.3 and 4. Where can I find the appropriate ones for my version (ccsv5)?

3) I have heard that I should be able to build and load the program straight from simulink without having to go through the CCS program at all. How do I go about doing this? 

Thank you very much for the help!

-Eric

  • Hi Eric,

    Eric Abboud said:
    1) It seems that the switches on the board must be in a certain position and that the I might need to add or remove some jumpers. Most posts just say that it must be in the same position as when I took the board out of the box. Since I was not the first person to use this board, I do not know what those settings are. Could someone please tell me what position the switches and jumpers should be in?

    Switch S1 - all should be in ON position. Serial switch S4 should also be in ON position.

    Eric Abboud said:
    2) From what I have understood, I need to build my program to load onto the flash memory of the board. In the configuration parameters of my simulink model under hardware implementation , I set my hardware board to "TI Piccolo F2802x (boot from flash)" and the device name to F28027 and checked the "Boot from flash (standalone execution)" box. Next, I went into "Flash_loader" group under the hardware implementation and ensured that it was set to "Erase, Program and Verify." The problem seems to be with the location of the API. When I hit "execute" I get an error saying that "The TI flash API library does not exist on your machine. Specify the right path or download the appropriate flash APIs from TI's website or TI's controlSUITE installer." The downloadable APIs in the TI site are only for ccsv3.3 and 4. Where can I find the appropriate ones for my version (ccsv5)?

    If you want to program to flash, simply refer to this example code in controlSuite:

    C:\ti\controlSUITE\device_support\f2802x\v230\f2802x_examples_structs\flash_f2802x

    Eric Abboud said:
    3) I have heard that I should be able to build and load the program straight from simulink without having to go through the CCS program at all. How do I go about doing this? 

    Yes, you don't have to touch CCS at all. Check my video tutorial for Simulink where I un-tick the option to Boot from Flash. Scroll down to notice the same:

    Regards,

    Gautam

  • Hi Gautam, 

    Thanks for the help regrading the switches, it seems like they were in the correct position. As for the rest, I am still having some trouble. 

    Although I have found the ControlSuite example that you referenced, I have no clue what to do with it or how to apply that to Simulink. it seems to me like it would show me how to make it work using CCS but I know that I should be able to do it all from Simulink. 

    However, in looking for this file, I finally found the flash API library that I needed for Simulink. I specified the location and hit "execute" again. Now it is telling me that it is unable to open CCS and I have to make sure that it is properly installed and configured. I know that it is since I am able to use it, but Simulink does not seem to think so. Any suggestions on how to solve this problem? 

    As for loading it straight onto the board without passing through CCS, I did not find much information in you tutorial aside from the fact that you chose your board and then hit deploy to hardware. When I do that, it only builds the .out file. I'm assuming that you must have done some sort of setup beforehand for this to work. Did you have to connect to your target through CCS beforehand? Did you have to create a makefile in Matlab? I would really appreciate if you could elaborate a little bit on this for me. 

    Thanks again for all the help

    -Eric

  • Hi Eric,

    For the initial C2000 support you can refer to this thread: e2e.ti.com/.../484814

    Regards,
    Gautam
  • Hi Eric,

    Sorry for the delay, I've been out of the office travelling the last week.

    One issue I have seen is that the USB port can get "locked" to the HW board, and will block software from another program from getting downloaded and running.  If you run CCS, and connect to the board, you may find that MathWorks tools fail to download code because CCS is still managing the USB connection. try the MathWorks build and download *before* opening/connecting from CCS.

    You may have some other configuration issues here.  I think you might find it valuable to contact MathWorks Technical Support.

    Thanks,

    -Brian

  • Hey Brian,
    Thanks for getting back to me and now its my turn to apologize for taking so long to get back to you. I tried what you recommended and it does not seem to make any visible difference. When I build my model I get the "build complete" statement but it doesn't show any indication of even trying to deploy.

    In speaking Mathworks Technical support, they informed me that it must have something to do with the specified location of the Flash API location, which is done in the model configuration under Hardware Implementation > Target Hardware Resources > Groups > Flash_loader. Thanks to Gautham's post, I ended up finding the flash api library and provided my model with the proper path. Now, when I try to hit "execute" next to the location specification, I get the following error "cannot find the generated COFF file"

    Do you have any suggestions on how to proceed?

    All the best,
    Eric