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.

MSP-EXP430FR5994: push_back in vectorvariable does not work

Other Parts Discussed in Thread: MSP-EXP430FR5994

Dear sir/ma,

I posted a problem on the msp430 forum but was told to ask it here as the problem could not be solve and it was adjudged to be a code composer studio problem.

The summary and link to the problem is below:

The vector variable i declared is not working as expected.  It does not increase when the is increased.

LINK

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1167720/msp-exp430fr5994-push_back-in-vectorvariable-does-not-work

The laúnch pad I am using is MSP-EXP430FR5994

I shall look forward to your assistance.

Thanks

  • Hello,

    Based on the other thread, the issue is stated as:

    The problem with the code is not that the function is not called but that the variables of the vector are not correctly initialised and when they are increased, the values are wrong.

    But then you mentioned:

    it was adjudged to be a code composer studio problem.

    The issue appears to be that the code itself is not executing as expected. What was the basis that it is a debugger problem? I didn't fully go though the other thread in details, I am hoping you can summarize it for me. Is the issue more of a compilation issue (the generated code is incorrect)?

    Thanks

    ki

     

  • Hallo Ki,  

    Refering to your reply; the code "works" but the values of the variables in the vector are not correct.  The varaibles should increase at each call but this does not happen and the values are incorrect, hence they can not be further used.  If you take a look at my 04.11 reply you would see what I mean.

    I sent the problem to the msp430 forum but they suggested it is a CCS problem.

    timing test code.rar

    I am enclosing a strip down version of the code for you to run it. The same code works well on a C2000 project.

    I look forward to your reply.

    Thanks

  • I see you still have optimization enabled. Can you explicitly set it to "off"? Not the "0" still has some optimization.