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.

MSP430F6731: Code runs on MSP430F6726 but not on MSP430F6731

Part Number: MSP430F6731
Other Parts Discussed in Thread: MSP430F6723,

Hi,

As summarized in tittle, one of my project will run just fine on MSP430F6723 but somehow not on MSP430F6731. The only difference between those two MCUs seems to be flash (64KB vs 32KB), and RAM(4KB vs 2KB). None of the SD24 channels are used, so this should not matter. Memory allocation in CCS says 1360B RAM is used, and 18912B flash is used. So MSP430F6731 should have enough RAM.

When I tried to debug/step through the code on MSP430F6731, the play/resume button will be greyed out. If I press pause button, I will something like the screenshot. Does this mean code is stuck in some low level initialization process upon booting?

If I just load some simple test code such as blinky or UART echo into MSP430F6731 based board, everything seems to run just fine. So the board itself should be fine.

Can anyone offer some pointer on how to solve the problem? Thanks in advance.

  • Hi Zhiyong Li,

    Can you share your .map files for each of the builds, and the output files in .txt format?

  • Hi Dennis,

    Thanks for your reply. Files attached. Update: files removed.

  • Hi Zhiyong Li,

    Try setting the processor options to use small code memory and small data memory for the F6731 and see if that makes a difference.

    I have reached out to SW team to help take a look into this.

  • Hi Dennis,

    code_model seems to be the problem. My teammate also stumbled onto this option earlier yesterday. Once we changed it to small from default large, compiled binary can run on F6731 without problems. We also tried some other options like increasing size of stack/heap from default, those didn't work. Commenting out certain portion of code can also make the remaining part work.

    Do you have any reference on code_model option?

  • Hi Zhiyong Li,

    Ok, good to hear.  Check out section 2.3.4 in the MSP430 C compiler guide regarding code models.

    I'll assume you are good to go from here, so I will mark this posting as RESOLVED. 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 locks, 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.

  • Hi Dennis,

    Again thanks for your prompt reply. While the problem itself has been solved. Just for the sake of curiosity, any idea why compiled binary with code_model = large doesn't run in F6731? From what I can see, both has less 64KB memory.

  • Hi Zhiyong Li,

    I'm not sure exactly.  If you take a look at your two .map files, you will notice the F6723 has multiple code sections (.text, .text.1, .text.2), whereas the F6731 .map file places all the code in one section (.text).  Try building the F6731 project for both memory models, then compare the two .map files.  Share them if you like and I'll take a look

  • Hi Zhiyong Li,

    It's been a few days since we have heard from you so I'll assume you are good to go from here. I will mark this posting as RESOLVED. 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 locks, 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

**Attention** This is a public forum