A few errors when porting VisSim project into CCS

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Submitted by allejard on Tue, 04/30/2013 - 21:12 

I ported the VisSim project DRV8312-pmsm-28M35H52 into CCSv5 using the instructions given in this previous post. I'm only getting 6 curious errors during compilation. The following:

 #20 identifier 'ADC2CTL1' is undefined #20 identifier 'ADC2SOC1CTL' is undefined #20 identifier 'ADC2SOC1CTL' is undefined #20 identifier 'GPEMUX1' is undefined #20 identifier 'TRIG1SEL' is undefined #20 identifier 'TRIG2SEL' is undefined 

All but the 'GPEMUX1' variables are related to the A/D converter. Am I missing a header file or something? It's strange that the 'ADC2CTL1' variables throws an error but the 'ADC2CTL2' variable does not.

Any assistance is greatly appreciated. Thanks.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Wed, 05/01/2013 - 19:20.

    I can see from the name of your undefined registers (ADC2CTL1), that you are using Concerto with 2 ADC units. You must define the preprocessor name '_CONCERTO_' in this case, as Concerto uses certain hardware registers in an incompatible way with previous Piccolo parts.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by allejard on Thu, 05/02/2013 - 02:01.

    Thanks. Are there other directions for porting VisSim generated C code into CCS that is specific to this Concerto project? I still have issues with compilation.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Thu, 05/02/2013 - 03:03.

    As the C28x Concerto core has an FPU you will need to link with lib\ii_F280x_fpusr.lib if you checked 'Minimize RAM usage' or lib\ii_F280x_fpu.lib if you didn't.
    What issues are you having?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by allejard on Thu, 05/02/2013 - 03:19.

    It looks like I need to link a different library. I get an 'unresolved symbols remain' and a list of 3 symbols:

    unresolved symbol _IQ24atan2PU, first referenced in /vissim80/cg/ii_F280X_fpu.lib unresolved symbol _rampgen_calc, first referenced in ./DRV8312EVM-pmsm-28M35H52 unresolved symbol _svgendq_calc, first referenced in ./DRV8312EVM-pmsm-28M35H52

    I also don't understand why the VisSim model imported an IQ24 function since Concerto supports floating point. I did not check the 'minimize RAM' option, just for your information.

    Thanks for your assistance.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by Anders89 on Thu, 05/02/2013 - 03:38.

    No, that library is correct. It looks like you are missing the VisSim80/cg/lib/F28M35H52lnk.cmd in your project. It will pull in a number of additional libraries. It will also include some object files that will need to be included directly as CCS doesn't like them in the .cmd file. These are:

    lib\f28xxFLASHboot_fpu.obj

    lib\initFlash_fpu.obj

    lib\F28M35x_GlobalVariableDefs.obj

    Be sure to make a copy of the .cmd file before editing to remove the .obj references otherwise you won't be able to build from VisSim

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by allejard on Thu, 05/02/2013 - 22:03.

    Thanks. Unfortunately, this did not fix the problem. I'm actually getting more errors on top of the previously mentioned errors. I attached a screen shot of the errors I'm getting. I hate to keep asking about this on the forum - is there a document that describes how this should be done somewhere?

    <?xml version="1.0" encoding="UTF-8"?>Compile Errors.jpg

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

     

    Submitted by Anders89 on Fri, 05/03/2013 - 03:56.

     

    Here is a CCS project that builds either Debug-RAM or Debug-Flash versions of the VisSim example blink28M3H52.
    Just replace blink28M3H52.c in the project with your file.