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.

MSP430F5437A: Running source code of MSP430F5418A on a MSP430F5437A

Part Number: MSP430F5437A
Other Parts Discussed in Thread: MSP430F5418A

Since the MSP430F5418A is currently not available, we want to run our source code on the MSP430F5437A.

Our product is now more than 10 years on the market and therefore we use an older compiler, which we do not want to change!

When compiling it comes to the errors that can be seen in the attachment.

Also you can see the poperties of the project.

How can I fix this?

Best regards
Daniel

  • Which CCS version are you using? Can you set the project to use the large code memory model? If that's not set, only the lower 64k of memory can be used.

    Project Properties -> Build -> MSP430 Compiler -> Processor Options

  • We are using CCS version 6.1.0 and we are already using the large code memory model as you can see in the screenshots as well. 

  • Seth,

    I find it interesting that in the screenshot below, CCS thinks that that LARGE_CODE_MODEL is not defined in the linker command file based on the error lines:

    Any idea why that may be? I know the CCS interpretation of defines is separate parser compared to linker's (of course in theory they should always agree). However in my demo project LARGE_DATA_MODEL is defined according to CCS.

    Regards,

    Evan

  • No idea so far. I have checked the entire setting and found nothing abnormal.

    The problem is that we have a complet line stop for weeks now.
    So how do we proceed? We have a serius problem!

  • we are already using the large code memory model as you can see in the screenshots as well.

    That's what I was confused about. In the flag summary for the compiler settings, there's no "--code_model" directive. The compiler manual, SLAU132P from June 2017, states that "Large" is the default for MSP430X-based devices so its absence shouldn't matter.

    As Evan pointed out, it was the linker file errors that added to my assumption that the correct memory model wasn't set. Maybe you could try adding "--code_model=large" to the compiler and linker flags by clicking the "Set Additional Flags" on each menu respectively?

  • Hi Daniel,

    I was able to install TI compiler version v4.1.9. I can reproduce your issue, it doesn't appear that __LARGE_CODE_MODEL__ is defined by default in this older toolchain. However, I did seem to get past it by defining __LARGE_CODE_MODEL__ like so:

    Can you try that and report back?

    Regards,

    Evan

  • Hi Evan, hi Seth,

    thanks for your help!

    @Seth right. But I already fixed this by using the advanced settings. So "--code_model=large" is already part of the Compiler and Linker Flags.

    -- still get the errors

    @Evan I added "__LARGE_CODE_MODEL__" as an Enviroment Variable.

    -- I also get the errors

    I added "#define __LARGE_DATA_MODEL__" to the file "lnk_msp430f5437a.cmd" to resolve the errors but then the code is not running on the system.

    Regards,

    Daniel

  • Hi Daniel,

    Can you share more information about the error?

    Evan

  • Of course, what do you need?

  • Are you able to connect to the device that is "not working"? Does the debugger have any interesting information about the when the program counter is? 

    Also, can you try loading an example program onto the 5437A. Does that work as expected?

    Evan

  • Nothing special.

    If I take out some parts from the existing project so that it fits into the 64k, the program runs without problems.

**Attention** This is a public forum