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.

MSP430I2031: Project generated using Energy Measurement Library is compiled but not linked

Part Number: MSP430I2031
Other Parts Discussed in Thread: EVM430-I2040S, EVM430-F6736

Tool/software: Code Composer Studio

I created a simple project using Energy Measurement Design Center and library. Every went OK without any error and it created the CCS and IAR projects.

I want to build the project using CCS and the TI compiler, importing the project in CCS shoud satisfy this condition but when starts to link it exits because does not recognize the format of some IAR libraries.

I suppose it is a project setup problem because seems it is trying to link CCS and IAR libraries.

Any other engineer had the same problems?

  • Hi Massimo,

    Thanks for your post. I'm excited that you've found and are using the Energy Measurement Design Center and software library.

    What version of CCS are you using? After generating code using the EMDC GUI, open CCS, go to "Project", click "Import CCS Projects...", paste the filepath from the EMDC Code Generation window into the "Select search-directory" box in CCS and hit Enter. As shown below, the project should be found by CCS. Click "Finish" to import the project into CCS. Then, you should be able to build the project without errors.

    Are you following these steps described in the Load and run the generated firmware using the CCS IDE section of the EMDC Technology Guide?

    Regards,

    James

  • Yes, I followed that procedure but unfortunately it does not work. I tryed to build an example project: EVM430-i2040S_SH_1V_1C_50Hz but this is the error output:

    <Linking>
    "C:\\Users\\massimo\\AppData\\Local\\Temp\\{C1CF7E29-D5EE-446A-814B-D4E74CF760F9}", line 92: fatal error #10004: unrecognized file:  "../src/lib/EM/IAR/MSP430i2xx/EMLib_IAR_MSP430i2xx_small_code_small_data.lib"
     
    gmake[1]: *** [EVM430-i2040S_SH_1V_1C_50Hz.out] Error 1
    >> Compilation failure
    makefile:289: recipe for target 'EVM430-i2040S_SH_1V_1C_50Hz.out' failed
    gmake[1]: Target 'secondary-outputs' not remade because of errors.
    gmake: *** [all] Error 2
    makefile:285: recipe for target 'all' failed

    **** Build Finished ****

    then I tryed to do a project by myself but the result is the same.

    I am using  CCS Studio Version: 8.2.0.00007

    Thanks,

    Massimo

  • Does the device selected in the EMDC GUI match the device under the CCS project settings? I'm using CCS v8.1, so I'll try to replicate the issue using v8.2 this week. I'm confused about why the linking step is pointing to the Temp folder under your profile folder. That's strange.

    Also, did you make sure to select "Copy projects into workspace" when importing the EMDC-generated project into CCS? I'm not sure if you can manually select that or not, but please make sure it is.

    EDIT: I tried to replicate your issue in CCS v8.2 but couldn't. Please try creating a new CCS workspace and importing the EMDC project as described above. If that doesn't work, we may need to look at how you're using the EMDC workspace and projects.

    Regards,

    James

  • Hi James,
    nothing different between default and new workspace.
    Seems to me that the problem born on a library.

    These are the 4 errors as reported in the "Problems" tab:

    Description Resource Path Location Type
    #10004 C:\\Users\\massimo\\AppData\\Local\\Temp\\{F1D6A8F7-8A20-4732-BAA5-77AC66F704B3}: unrecognized file: "../src/lib/EM/IAR/MSP430i2xx/EMLib_IAR_MSP430i2xx_small_code_small_data.lib" EVM430-i2040S_SH_1V_1C_50Hz line 92 C/C++ Problem

    Description Resource Path Location Type
    gmake: *** [all] Error 2 EVM430-i2040S_SH_1V_1C_50Hz C/C++ Problem

    Description Resource Path Location Type
    gmake[1]: *** [EVM430-i2040S_SH_1V_1C_50Hz.out] Error 1 EVM430-i2040S_SH_1V_1C_50Hz C/C++ Problem

    Description Resource Path Location Type
    gmake[1]: Target 'secondary-outputs' not remade because of errors. EVM430-i2040S_SH_1V_1C_50Hz C/C++ Problem



    the same errors as reported in the Console tab:

    <Linking>
    "C:\\Users\\massimo\\AppData\\Local\\Temp\\{F1D6A8F7-8A20-4732-BAA5-77AC66F704B3}", line 92: fatal error #10004: unrecognized file: "../src/lib/EM/IAR/MSP430i2xx/EMLib_IAR_MSP430i2xx_small_code_small_data.lib"

    gmake[1]: *** [EVM430-i2040S_SH_1V_1C_50Hz.out] Error 1
    >> Compilation failure
    makefile:289: recipe for target 'EVM430-i2040S_SH_1V_1C_50Hz.out' failed
    gmake[1]: Target 'secondary-outputs' not remade because of errors.
    makefile:285: recipe for target 'all' failed
    gmake: *** [all] Error 2

    **** Build Finished ****


    About how I used EMDC to load the example project:

    1. I open EMDC and load the EMDC project: File/Project Open
    2. When project is open I see 3 icons for MCU, voltage sensor, current sensor (shunt)
    3. Double click on MCU icon to open the MCU form
    4. I do not change anything, just a Ctrl-C to copy the project folder and then I click Error Status to check no errors (and I confirm there are no errors) then I click "Generate Code" and wait it completes.

    After that I followed since the first time the procedure you described to import the EMDC project.

    These are my tools releases:
    - EMDC 1_30_00_00
    - CCS 8.2.0.00007
    - TI MSP430 Toolchain 8.2.0

    Kind regards,
    Massimo
  • Hi James,
    I tried to build a different example project and it works perfectly.

    I imported EVM430-F6736_CT_1V_1C_50HZ in EMDC, generate the code and then built using CCS as described and done since the beginning. So I am convinced the problem is on the IAR lib side... I suspect EMLib_IAR_MSP430i2xx_small_code_small_data.lib is corrupted or wrong.

    May you send me your copy of the same lib so I may quickly test it?

    You may send it at massimo.manca@aiotech.tk or at massimo.manca@micron-engineering.tk or at massimo.manca.pn@gmail.com (I amd always the same... probably you will find me as massimo.manca@micronengineering.it (the old domain of Micron Engineering).
    Micron Engineering is my (first) company and AIoTech is just a mark for my individual professional consulting firm.

    Kind regards,
    Massimo
  • Hi Massimo,

    Thanks for sharing these details, and I'm sorry that you're having issues building the i20xx projects. I'm still trying to figure out why CCS is complaining about IAR, since it doesn't use anything related to IAR. Perhaps this issue is related to you deleting a project but not completely deleting everything (when it asks for confirmation in CCS, you want to select "Delete project contents on disk (cannot be undone)" every time) and then importing another project with the same name. This can cause issues when artifacts are left over.

    Can you try renaming your i20xx-based project, saving it, generating the code, and importing it into CCS?

    Regards,

    James
  • Hi James,

    I am happy to say that the problem is solved.

    I did not delete any project, not mine and the example project neither but your suggestion put me on the right path.
    Just to be sure I created a new (3rd) workspace and I repeat exactly what I did since the beginning. These are my steps:
    1. I opened the i2041 example project using EMDC
    2. when I click on the Generate Code button EMDC warned me that the code was already generated and if I want to regenerate it deleting the already existing one and I choose "Yes"
    3. In a few seconds EMDC generated the source code and I copy and paste its location
    4. I imported the project as described in the EMDC docs, as I did since the first time and as you reported to me
    5. Et voilà... built without any errors
    6. Happy face :-)

    So,thanks for your help, everythig OK now. For your information take care that I did not delete anything, at project or file level before. After the error I only searched and checked CCS, C compiler and linker setups and so on without finding anything wrong. Probably something went wrong during the compilation or linking phases but in a different way, may be some investigation may be needed, If there are log files or other files may hekp you to understand what happened, please just say me what you need and I will send you or check for you.

    Another unrelated question: as you may imagine I am involved in smart-meter design (as an independent firm) I would need a couple of informations about MSP430 i20xx series and about the use of the EMDC libraries and also DLMS library. May you address me to the correct forums,  support channel() and/or to TI field engineer(s)?

    Thank you very much,

    Massimo

**Attention** This is a public forum