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.

Piccolo controlSTICK & Matlab

Other Parts Discussed in Thread: CONTROLSUITE

Hello all,

I've been working with the piccolo controlSTICK (PCS). I have been having a hard time trying to get it to communicate with the host computer. It seems that RTDX support has been dropped. The only other thing I can think of is using the SCI blocks. Does anyone have any hints or example Simulink models they could share?

Thanks,

Alex

  • I am trying to figure out how to get this working in general. I would like to build and deploy.

    I get the following error message when trying to run demos:

    "Could not get settings from the IDE: Error map is empty."

    Does this mean anything to anyone? Is there something I have to do in CCS?

     

    Thanks a ton,

    Alex

  • More info:

    These error messages were tossed by Simulink. I have installed CCS 4.1.3

    Do I need to make some sort of setup/link between CCS and matlab?

    ----

    The call to idelink_ert_make_rtw_hook, during the entry hook generated the following error:
    Could not connect to the board specified in Target Preferences block.

    The build process will terminate as a result.

    ----

    Could not connect to the board specified in Target Preferences block.

    ----

    Could not obtain board configuration from Code Composer Studio(TM). Make sure that Code Composer Studio and Embedded IDE Link are installed and properly registered.

    ----

    Error map is empty.

  • Getting this running has been killing me. It looks like Matlab 2010a does not support ccs 4.1.3! (Is this verified by TI support?)

    How do I get TI ccs 3.3 for running with matlab?

    Alex

  • Chris,

    Thanks for the help. I've been directed to a page that is asking for my SDS registration. Do I have one of these?

    Alex

  • Alex,

    You need a my.ti.com log-in. I think it's the same one you use to log-in to this e2e forum.  I tried using my "non Employee" my.ti.com log-in and it worked fine.

     

     

  • 1) Let me be more specific. It says on the page:

    Please continue the two step registration process for: C2000 Code Composer Studio v3.x *

    And then it asks for a "service code".

    CCS3.3 seems to be working fine without it. I don't know what this is for.

     

    2) On a side note, is there a getting started guide for using Matlab, the piccolo controlSTICK, and ccs 3.3? I am running into problem after problem.

    Right now, CCS is asking me for where the 2802x C/C++ Header Files are installed. It also can't find DSP2802x.txt and complains.

     

    Alex

  • 1) When I click on that link it immediately brings up a "save as" window for a zip. If it's asking you for a service code that's just for future updates. You should be fine w/o it.

    2) Not sure if there is a guide. Try emailing this thread with that question to c2000_expert@mathworks.com

    The header files are wherever you installed them. Latest are through www.ti.com/controlSUITE which will install

    C:\ti\controlSUITE\device_support\f2802x\v127\DSP2802x_headers

    if you downloaded the pre-controlSUITE version it should be at

    C:\tidcs\c28\DSP2802x\v120\DSP2802x_headers

     

  • Chris,

    I installed the DSP header files. However, matlab throws me an error from CCS that says that the file: DSP2802x.txt can't be found and prompts me to find it. It does not seem to be in the installation.

    I have both controlSUITE and the header files installed. Should I prefer one over the other? Do you have any guidance here? Matlab support wasn't able to help.

     

    Thanks,

    Alex

     

  • Hi Chris,

    Check the matlab help (target support package), look fro your target . 

    write in the command windows:

    >>c2000lib

    Open the block that has the same number that your target, you'll see a target preferences and other block. Open the target, all the links the target need are there.

    Hope this help you

    Regards

    Gastón

  • DSP2802x.txt  must be a config file used by Matlab, it's not something from TI.  Did you send something to c20000_expert@mathworks.com ?


  • ChrisClearman,

    check this post http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/t/66505.aspx

    Could you please tell me if this is a CCS problem?

    You know if this a patch to this issue?

    Regards

    Gastón

  •  This is not a CCS issue. I have an email into the Mathworks for explanation.

  • Hi Chris,

    Hope they give you an answer, let me ask you something:

    There is a way to know how many extra codes lines generates simulink compare to CCS program? Related to optimization code.

    Regards

    Gaston

  • Here is the answer regarding flashing Piccolo:

    There is a bug in Mathworks tools, described here

    http://www.mathworks.com/support/bugreports/search_results/index

    597766

     

    Summary

     

    Flash Loader/Flash Programmer utility for C2000 processors does not work

     

    Description

     

    This bug consists of the following four issues:

    1. The enableQuestion_Flash.fig file is corrupt, preventing the flash warning message dialog from opening. This failure halts code generation with the flash loader and stops the entire flash programming procedure.
    2. The C2808pmsmfocflash and c28335pmsmfocflash demos give annoying popup warnings blocking the code generation process. After launching code generation on the demo, the pop up warning window appears multiple times stating "Unconfigured FLASH memory section".
    3. The Execute button on the Flash_loader pane under the Peripherals tab of a C2000 target preferences block doesn't work. Regardless of how you set Enable Flash Programmer parameter, clicking Execute produces the following error message:Undefined variable "prop" or class "prop.Enable_Flash.ui".
    4. Flash API browse button does not work. After you click "Apply", the API goes back to the default one, unless before clicking "Apply", you manually edit the input area, e.g., type an extra space to the end or cut and paste the entire content.
    5. F28027 flash programmer does not work.

     

     

    Workaround

     

    The patch is created for R2009b release.

    1. To install the patch, download the attached files, patch_installer.m andpatch_flashprogrammer.zip.
    2. Start MATLAB and enter the following command at the prompt:
      patch_installer('patch_flashprogrammer.zip', 'install')
    3. Complete the installation by following the instructions on the MATLAB command line.
    4. Remove the following file:
      toolbox\idelink\foundation\pjtgenerator\tgtpref2\+targetpref\@Controller\Controller.p
    5. Reboot MATLAB.

     

     

    Yes, you can get performance benchmarks from the Mathworks codegen, and you can optimize.  if you have a specific module (like PID, Clarke, etc) you could go and compare to our TI docs, but if they use our Libs it will be the same.  I understand that Greg from Mathworks is already in touch with you and will reply next week.

     

  • Chris,

    I did send them an email. They haven't been able to answer my question about that file though. I don't think that that file even exists!

    Alex

  • See my files to check an example, i´m using RTDX block there.

    Regards

    Gastón

  • Gaston,

    I appreciate your reply. I have actually been using your I2C file to test this. However, the problem I get is that the build itself fails, not your example (which I assume works).

    The Matlab compiling process gets to the part where it starts CCS, but it claims that it can't find the 2802x header files and asks me for their location. In specific, it asks for the DSP2802x.txt file, which does not seem to exist. I checked to see if I am using all the right program versions, and I am.

    Did you have to modify the environment or path variables to get yours to work? I am using 2010a.

    Alex

  • No, to a friend  (he went from CCv4 to CCS 3.3). You should trying uninstalling the CCS, erase all track of drivers from your computer (check the regedit). Then install CCS 3.3, open a matlab example, try to download it to the piccolo. 

    Maybe this error is because you still have some driver for the newer version and is bothering the CCS 3.3. 

    Gastón

  • Hi,

    I have been having the same problem with header.

    I have been working with F28035 controlStick and Matlab 2010a, but I used simulator, not emulator.

    Is there any difference? Do you mean that error shouldn't appear with using simulator?


    So, is there a solution of this problem for Matlab 2010a?



    Thanks!

  • An update:

    I had no luck getting this problem resolved. Perhaps it won't be a big issue with the release of CCS 5.0, though that seems to not support the piccolo (?).

    There does not seem to be a good step by step tutorial on how to get this working, or at least that I am aware of. Does anyone have any input on this?

    Alex

  • Alex,

    Are the mathworks guys not responding to your emails or forum questions on their site?  I know we (TI) aren't going to be able to help with this problem...hopefully another user can.  But mathworks certainly supports the XDS100 emulator on the PCS, I've seen them show plenty of demos using these tools.

     

  • Hi,

    below is the Mathworks respond, may be helpful:

    #############################################

    Try installing the following support files from TI:

    http://focus.ti.com/docs/toolsw/folders/print/sprc892.html



    When generating code for your model, you should be asked to point to the header and peripheral directory, by default:

    C:\tidcs\c28\DSP2803x\v121

    This should fix the issue.



    If it doesn't, check if the following environment variable is set in windows: DSP2803x_INSTALLDIR, the value should be the location of the install dir, by default: C:\tidcs\c28\DSP2803x\v121

    To check environment variables in Windows, right-click on "My Computer" à PropertiesàAdvancedàEnvironment VariablesàSystem Variables.

    For any change to apply, you need to restart Matlab.



    Regards,

    MathWorks C2000 Team

  • I'm going to give this another shot. Right now, I need to update CCS v3.3, however, the TI website asks for a "Service Code". What is this?

    Alex

  • Well,

    After a lot of head scratching, I finally got this to somewhat work! The issue was the environment variable not being set in Windows. I did the following suggestions:

     

     

    Try installing the following support files from TI:

    http://focus.ti.com/docs/toolsw/folders/print/sprc892.html

    When generating code for your model, you should be asked to point to the header and peripheral directory, by default:

    C:\tidcs\c28\DSP2803x\v121

    This should fix the issue.

    If it doesn't, check if the following environment variable is set in windows: DSP2803x_INSTALLDIR, the value should be the location of the install dir, by default: C:\tidcs\c28\DSP2803x\v121

    To check environment variables in Windows, right-click on "My Computer" à PropertiesàAdvancedàEnvironment VariablesàSystem Variables.

    For any change to apply, you need to restart Matlab.

     

    Note: I got the files for the piccolo 2802x files for my hardware.

     

    Alex

     

  • I didn't try, but is that working with simulator or emulator?
    I  have no success with simulator...

    Lukasovich

     

  • I'm not sure what the difference is. When you say simulator, do you mean the actual simulink "run" command? If so, I think the hardware blocks (like RTDX) don't actually do anything during simulation, which may explain your problems.

    However, I haven't been able to test further due to my controlSTICK being bricked...

    Chris, do you have any ideas on how to overcome this "bricking" issue (it seems to be a ccs thing).

    Thanks,

    Alex

  • I do all of these things but it doesn't go....

    everytime the system ask for the DSP2802x.txt file....

     

    i work with Matlab R2010b and CSS v4

     

    what i have to do??? please help me i need some help rapidly!!!

     

     

  • Hi,

    Some question first:

    1) Did you have an environment variable pointing to tidcs\C28\DSP2802x\your_version ?

    Matlab used this files (headers and common) to generate the code to CCS, another thing you can do is do it manually.

    Matlab used CCS3.3, I don't know if this issue is solved in Matlab 2010b.

    Hope this can help you.

    Regards

    Gaston

  • Yes i have this environment variable set but it doesn't work. 

     

    hmmm another easy question. i would generate a sinusodial PWM signal with my f28027 piccolo stik. is it possible to do something like that: 

    int i;

    for(i=0;i>=Pi;i++)

    epwm-2a(GPIO-02)= sin(i*50);

    I only want this to do but i have no idea how i can solve my problem i'm absolutly a newbie 

     

    please help me 

     

     

  • Try installing CCSV3.3 . You can generate a PWM signal, all you need is the right configuration. Go to Matlab help--->target preferences--->>choose your target, see the examples there. 

  • I had installed CCS V3.3 from this Forum on the first page. 

     

    but it's doesn't work also... hmmm i don't know what to do.... 

     

    hmmm it's queit hard... 

     

     

  • Maybe there is a conflict  between CCS4 and CCS3. You should try uninstalling both of them and re-install one of those. 

    Regards

     

  • i had only one installed but this don't solve the problem 

     

    other tipps?? 

  • ok now finaly i had installed CCS V3.3 and Matlab 2010b on a windows 7. And it aks me again where are the Header files are..

     

     

    where are they?? 

     

     

  • look in C:\ for tidcs, inside that folder you'll see DSP2802X folder. There are the files you need. Remember to define an environment variable to that folder.

    Hope this help you

     

  • Hmmm 

     

    no in the C:\tidcs there is no folder called DSP2802x, only one folder called DSP2803x is inside. hmm where do i get the DSP2802x folder? :-) 

     

  • Hey guys

     

    a new day and a new chance - and well it works!!!!!

     

    great work thanks a lot and have a present day

     

    regards

  • dear: 

    I need to ask some questions please help me:

    1- i have ccs v5 and win x64 and matlab 2012 and 2010a? can they work with them and can i implement my system for f28035 control card?

    2- 

    >> checkEnvSetup('ccsv5', 'f28035', 'check')

    1. CCSv5 (Code Composer Studio)
    Your version :
    Required version: 5.0 or later
    Required for : Code Generation
    TI_DIR=""

    2. CGT (Texas Instruments C2000 Code Generation Tools)
    Your version :
    Required version: 5.2.1 to 6.0.2
    Required for : Code generation
    C2000_CGT_INSTALLDIR=""

    3. DSP/BIOS (Real Time Operating System)
    Your version :
    Required version: 5.33.05 to 5.41.11.38
    Required for : Code generation
    CCSV5_DSPBIOS_INSTALLDIR=""

    4. XDC Tools (eXpress DSP Components)
    Your version :
    Required version: 3.16.02.32 or later
    Required for : Code generation

    5. CCS (Code Composer Studio)
    Your version :
    Required version: 3.3.83.11
    Required for : Automation and Code Generation

    6. 2803x C/C++ Header Files
    Your version : 1.21
    Required version: 1.25
    Required for : Code generation
    DSP2803x_INSTALLDIR="C:\tidcs\c28\DSP2803x\v121"

    7. Flash Tools (TMS320F2803x Piccolo(TM) Flash API)
    Your version : 1.00
    Required version: 1.00
    Required for : Flash Programming
    FLASH_2803X_API_INSTALLDIR=""

    this from matlab! how can i adjust my setting of matlab to find ccs v5 instulation?

    thanks

    regards

    ahmed

  • Ahmed,

                Check matlab help, but as far as I know you can only use CCSV3.3 with Matlab (I use winx32).

    Regards

    Gastón