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.

TCAN4550: TCAN4550 Sample Code: "identifier is undefined" Errors when MSP430F5529 is the Target

Part Number: TCAN4550
Other Parts Discussed in Thread: MSP430F5529, , MSP430FR6989, , MSP430WARE

I'm trying to receive CAN messages using TCAN4550 and MSP430F5529. I thought the provided sample code for Code Composer Studio would be a good place to start (found here: https://www.ti.com/product/TCAN4550-Q1#design-development##software-developmentthe target to MSP430F5529 I get several "identifier is undefined" errors, preventing the code from compiling. Below are a few examples of the errors I'm getting:

"../driverlib/MSP430FR5xx_6xx/cs.c", line 115: error #20: identifier "CS_BASE" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 115: error #20: identifier "OFS_CSCTL1" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 115: error #20: identifier "DCORSEL" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 116: error #20: identifier "DCOFSEL_7" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 117: error #20: identifier "DCOFSEL_0" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 120: error #20: identifier "DCOFSEL_1" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 123: error #20: identifier "DCOFSEL_2" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 126: error #20: identifier "DCOFSEL_3" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 129: error #20: identifier "DCOFSEL_4" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 132: error #20: identifier "DCOFSEL_5" is undefined
"../driverlib/MSP430FR5xx_6xx/cs.c", line 135: error #20: identifier "DCOFSEL_6" is undefined

These errors continue but with a different class name in the quotes. I would appreciate any advice on the subject. Thanks!

  • My description of the issue seems to be cut off. Here's a repost:

    I'm trying to receive CAN messages using TCAN4550 and MSP430F5529. I thought the provided sample code for Code Composer Studio would be a good place to start. The default target is MSP430FR6989, which compiles fine, but when I switch the target to MSP430F5529 I get several "identifier is undefined" errors... (continues description above).

    Sorry for the inconvenience of looking at two posts.

  • Eleanor,

    Have you tried using the TCAN4550-Q1 starter code found in the TCAN4550-Q1 product folder on TI.com? Along with this, we have a software user's guide that goes through step-by-step on how to send and receive CAN frames, and properly configuring the TCAN4550-Q1 for other functions as well.

    Please let me know if you have already gone through both of these items, and we can dig deeper on this inquiry.

    Regards,

  • Hi Eric,

    The TCAN4550-Q1 starter code is where the errors are occurring. I can successfully compile the starter code when the target is set to the default MSP430FR6989, but I'm using MSP430F5529. When I switch the target to my board, the "identifier is undefined" errors appear (shown above), so I can't send or receive CAN messages using the starter code. I'm not sure how to fix these errors, but if there's another sample code out there that is compatible with the board I'm using then I would love to see it.

    Thanks for your help!

    - Eleanor

  • Hi Eleanor,

    The high level TCAN4550 implementations in the sample code will not change based on the processor being used. This was done to best show use-case examples with general implementations. This means that the TCAN4550 library does not have any particular dependencies on any MSP430 variant. I believe the issue you may be running into is how the compiler in CCS is interpreting the project. Since this forum focuses on the transceivers themselves, we're not experts in this area. However, I think we could point out a few areas to check to hopefully save you from having to search through MCU forums. 

    In the targetConfigs folder in the demo project, there is only one configuration for MSP430FR6989. Based on the readme here, it looks like selecting a new target in CCS will either modify this file or generate a new one based on the device being used. I'd recommend checking this folder after the new target is selected to make sure that there's a valid config for the MSP4305529. 

     Based on the error messages you shared, it looks like the compiler is having trouble associating some driverlib properties to the new target device. My hope is that resolving the config above will fix this, but there's a possibility that the new target device does not have compatible properties for these. If this is the case, the solution would likely be more involved, switching which features are used to make sure that the new target device can support the functionality. Since these devices are pretty similar, and none of the functionality used in this demo is particularly demanding or unique, I don't believe this to be the case - but as I'm not too familiar with this, I thought it would be worth mentioning. 

    I hope this info helps. Let us know if you're still having trouble after looking at the targetConfigs and we'll see if we can find out more about the processor-side of things.

    Regards,
    Eric Schott

  • Hi Eric,

    When I try to compile the program with my desired device as the target, it does create a new file in the targetConfigs folder. The file is a CCXML file called MSP430F5529.ccxml but this does not resolve the "identifier is undefined" errors that occur with setting MSP430F5529 as the target. I've even tried deleting the default CCXML file for MSP430FR6989 in the targetConfigs folder so MSP430F5529.ccxml is the only file left in the folder, but no luck. I appreciate all your help so far. Hopefully we can reach a solution.

    Thanks!

    Eleanor

  • Eleanor,

    We'll get back to you with a response by tomorrow, thanks for your patience.

    Regards,

  • Hi Eric,

    Were you able to get any further along with this error? I hope to hear from you soon

    Thanks,

    Eleanor

  • Eleanor,

    Sorry for the delay here, our team in Dallas is dealing with power outages due to severe weather. An expert will reply soon.

    Regards,

  • Eleanor,

    Since this looks to be more of an issue on the MSP430 side, I've notified engineers from that team of this thread. Thank you for your patience.

    Regards,

  • Hi Eric,

    Thanks for keeping me updated. I appreciate all the help you've given me so far.

    Sincerely,

    Eleanor

  • Hi Eric,

    I haven't heard from anyone yet about attempting to resolve this issue. Do you know if anyone is working on it? This error is really delaying my project's progress. Let me know if you have any updates.

    Sincerely,

    Eleanor

  • Eleanor,

    I've reached out to our MSP430 team again to remind them of this thread. They should be responding shortly, thank you for your patience.

    Regards,

  • Hi Eleanor,

    Let me dig into this for you.

  • Eleanor,

    The example code was written for the MSP430FR6989, which will have a completely different register set compare to F5529.

    Since the example code comes with the MSP430FR5xx_6xx driverlib to support the FR6989, you should be able to substitute it with the MSP430F5xx_6xx driverlib for the F5529.

  • Hi Dennis,

    This solved all the "identifier is undefined" errors! Unfortunately, another error has taken its place. Here's what shows up on the console when I use the debug tool. I highlighted the errors in red.

    **** Build of configuration Debug for project TCAN4550_DEMO ****

    "C:\\ti\\ccs1020\\ccs\\utils\\bin\\gmake" -k -j 12 all -O

    Building file: "../msp430_driverlib_2_91_13_01/packages/ti/mcu/msp430/driverlib/product/package/build.cfg"
    Invoking: XDCtools
    "C:/ti/ccs1020/xdctools_3_62_00_08_core/xs" --xdcpath="C:/ti/simplelink_msp432e4_sdk_4_20_00_12/source;C:/ti/simplelink_msp432e4_sdk_4_20_00_12/kernel/tirtos/packages;" xdc.tools.configuro -o configPkg -r debug -c "C:/ti/ccs1020/ccs/tools/compiler/ti-cgt-msp430_20.2.2.LTS" "../msp430_driverlib_2_91_13_01/packages/ti/mcu/msp430/driverlib/product/package/build.cfg"
    msp430_driverlib_2_91_13_01/packages/ti/mcu/msp430/driverlib/product/package/subdir_rules.mk:12: recipe for target 'build-1023195087-inproc' failed
    js: "C:/ti/ccs1020/xdctools_3_62_00_08_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: Error: no target named: please use -t, -b, or --cb
    gmake[1]: *** [build-1023195087-inproc] Error 1
    gmake: *** [build-1023195087] Error 2
    msp430_driverlib_2_91_13_01/packages/ti/mcu/msp430/driverlib/product/package/subdir_rules.mk:9: recipe for target 'build-1023195087' failed
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

     

    When the "Errors in Workspace" window appears I clicked "Proceed" and it also gave me this error: 

    MSP430: GEL: Encountered a problem loading file: C:workspace_v10\TCAN4550_DEMO\Debug\TCAN4550_DEMO.out Could not open file

    I appreciate your help. The solution is definitely near! 

    Sincerely,

    Eleanor

  • Eleanor,

    Thank you for your patience here, I've notified the expert of this thread to see if they can help out.

    Regards,

  • Hi Eleanor,

    It appears the version of the xdctools you are using doesn't support MSP430 (look in the docs directory where it is installed and look for the xdctools...supported_targets.h file.)  C:/ti/ccs1020/xdctools_3_62_00_08_core/xs

    I found version xdctools_3_32_00_06_core does, but there may be more to this story.  I'm assuming you are building this with whatever tools you have installed with code composer studio, correct?  I believe the MSP430 is not supported in later versions so you may be forced to use the older one.  Not sure how to locate that for you...give me some time.

  • Hi Dennis,

    I tried to find the supported_targets.h file in C:\ti\ccs1020\xdctools_3_62_00_08_core but it doesn't seem to be there for me. The xs folder is also missing for me but there is an xs.exe file. I'm using Code Composer Studio 10.2.0 and you are correct when assuming that I'm building the sample code with whatever tools installed with that version. If installing an older version will solve the problem then I will do that, just let me know which version you recommend once you get there. Thank you for continuing to work on this. I appreciate your help.

    Sincerely,

    Eleanor

  • Hi Dennis,

    Have you gotten any news about a possible solution to this problem? It's been over a month since I opened this thread and we still have not reached a solution, which is very disappointing considering the fact that the issues are occurring in the TCAN4550 sample code when it is supposed to be compatible with the MSP430F5529 board. Please let me know if you have any updates. 

    Sincerely,

    Eleanor

  • Hi Elanor,

    Super sorry for the huge delays in response.  I started over and downloaded the example you are using.  I then downloaded the latest version of the MSP430ware 3.80.13.03.  I then restarted CCS and from the help menu selected > Install new software.  CCS found the latest version and added it in. Next, as per earlier instructions, I deleted the MSP430FR5xx6xx driverlib version and replaced with MSP430F5xx6xx version.  I compiled and got some errors, but they are errors related to the different register names between the FR6989 and F5529.  I can't help you with that.  You will need to go through and find the equivalent registers in the F5529 and replace their names. 

  • Hi Elanor,

    It's been a while since we have heard from you, so I'm going to assume you were able to move forward with your project.
    I will mark this posting as RESOLVED, but if this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread is locked, please click the "Ask a related question" button, and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.