I use IAR (5.60.6) in simulation mode to check that mathematical fonctions are correct before using them in the target: input from file and results in other files.
MSP430F2417, small data model, no stack/heap overflow,
no interrupt: _DINT(); at the program beginning.
Every thing was ok until today when I change one line of code: I have some very weird errors:
Thu Apr 17, 2014 14:38:08: User error: Illegal opcode found on address 0x0
Thu Apr 17, 2014 14:38:08: Unable to execute: driver error.
Thu Apr 17, 2014 14:38:08: The stack pointer for stack 'Stack' (currently Memory:0xF378) is outside the stack range (Memory:0x2E12 to Memory:0x3100)
Then I restart the simulation (Download and Debug) without code modification and I can have the same error or something else like:
Thu Apr 17, 2014 14:56:44: User error: Illegal opcode found on address 0xD0100
Thu Apr 17, 2014 14:56:44: Unable to execute: driver error.
Thu Apr 17, 2014 14:56:44: The stack pointer for stack 'Stack' (currently Memory:0x8346) is outside the stack range (Memory:0x2E12 to Memory:0x3100)
or:
Thu Apr 17, 2014 14:58:10: Warning: A word access on odd address 0x1
Thu Apr 17, 2014 14:58:10: Unable to execute: driver error.
Between 1st and 2nd compilation,the code size difference is only 2 bytes. I created some compilation output files in the msp430-txt format and the main difference is around function calls (there is an offset of 2 bytes in the address)
Do you have any suggestions?
Best regards
Michel