Forums

IAR 'F1611 simulation issue

Started by Augusto Einsfeldt January 13, 2009
Hello IAR users,
I have found a strange behavior when simulating a MSP430F1611 design in the IAR. Maybe I have to change some setting but till now I cannot find where or what should it be.
The issue is the following: when initiating the debug session for simulation the disassembly window shows completely strange instructions and the simulation itself cannot run. It does happen with the latest version available at TI site to download and also with version 3.30. The design is assembly only. The MCU is correctly selected in the Options appropriate tab and the "#include "msp430x16x.h"" is used in the source code.
The exact same design simulates perfectly when selecting a different MCU like MSP430F149. In this case the disassembly window has the correct instructions and the simulations goes well.
I did not noticed this behavior before because I am already used to download the design and debug it there instead of doing simulations. And this works correctly with '1611 hardware. But today I am away from my bench and thought to use the time to check some new routines with simulation.
I can just use the '149 selection to try my routines but wonder if there is a solution for '1611.
Best regards,
Augusto

Beginning Microcontrollers with the MSP430

I do not know what is causing the problem you have. However, I have a
suggestion.

In your source code, do not use #include (i.e., header
file for the specific chip you are using). Use #include
instead. You can inspect msp430.h and see that it will automatically
include msp430x16x.h (or the correct header file for the specific
chip) according to the Target of your project.

The Linker and Simulator also work according to the Target of your
project. That is why I suggest you let the Assembler also do its part
according the Target of your project.

--OCY

--- In m..., "Augusto Einsfeldt" wrote:
>
> Hello IAR users,
> I have found a strange behavior when simulating a MSP430F1611 design
in the IAR. Maybe I have to change some setting but till now I cannot
find where or what should it be.
> The issue is the following: when initiating the debug session for
simulation the disassembly window shows completely strange
instructions and the simulation itself cannot run. It does happen with
the latest version available at TI site to download and also with
version 3.30. The design is assembly only. The MCU is correctly
selected in the Options appropriate tab and the "#include
"msp430x16x.h"" is used in the source code.
> The exact same design simulates perfectly when selecting a different
MCU like MSP430F149. In this case the disassembly window has the
correct instructions and the simulations goes well.
> I did not noticed this behavior before because I am already used to
download the design and debug it there instead of doing simulations.
And this works correctly with '1611 hardware. But today I am away from
my bench and thought to use the time to check some new routines with
simulation.
> I can just use the '149 selection to try my routines but wonder if
there is a solution for '1611.
> Best regards,
> Augusto
>
>

I did try your suggestion but the problem was not solved.

Just to show better what I mean I will try to attach two screen shots
showing the problem in one and how it should be in the other.

In case the images cannot be attached (even small ones) then I will post in
the image area.

It is like the assembler did use a completely different processor since all
instructions are totally different from the MSP430s set.

But it happens only in simulation. When downloading to the hardware the IAR
works fine.

-Augusto



-----Mensagem original-----
De: m... [mailto:m...] Em nome de
old_cow_yellow
Enviada em: ter-feira, 13 de janeiro de 2009 19:07
Para: m...
Assunto: [msp430] Re: IAR 'F1611 simulation issue



I do not know what is causing the problem you have. However, I have a
suggestion.

In your source code, do not use #include (i.e., header
file for the specific chip you are using). Use #include
instead. You can inspect msp430.h and see that it will automatically
include msp430x16x.h (or the correct header file for the specific
chip) according to the Target of your project.

The Linker and Simulator also work according to the Target of your
project. That is why I suggest you let the Assembler also do its part
according the Target of your project.

--OCY

--- In msp430@yahoogroups. com, "Augusto
Einsfeldt" wrote:
>
> Hello IAR users,
> I have found a strange behavior when simulating a MSP430F1611 design
in the IAR. Maybe I have to change some setting but till now I cannot
find where or what should it be.
> The issue is the following: when initiating the debug session for
simulation the disassembly window shows completely strange
instructions and the simulation itself cannot run. It does happen with
the latest version available at TI site to download and also with
version 3.30. The design is assembly only. The MCU is correctly
selected in the Options appropriate tab and the "#include
"msp430x16x.h"" is used in the source code.
> The exact same design simulates perfectly when selecting a different
MCU like MSP430F149. In this case the disassembly window has the
correct instructions and the simulations goes well.
> I did not noticed this behavior before because I am already used to
download the design and debug it there instead of doing simulations.
And this works correctly with '1611 hardware. But today I am away from
my bench and thought to use the time to check some new routines with
simulation.
> I can just use the '149 selection to try my routines but wonder if
there is a solution for '1611.
> Best regards,
> Augusto
>
>
>
>




I did post the images in the group as IAR_1611_simulation_screen_shot photo
album.

-Augusto





-----Mensagem original-----
De: m... [mailto:m...] Em nome de
Augusto Einsfeldt
Enviada em: ter-feira, 13 de janeiro de 2009 19:48
Para: m...
Assunto: RES: [msp430] Re: IAR 'F1611 simulation issue



I did try your suggestion but the problem was not solved.

Just to show better what I mean I will try to attach two screen shots
showing the problem in one and how it should be in the other.

In case the images cannot be attached (even small ones) then I will post in
the image area.

It is like the assembler did use a completely different processor since all
instructions are totally different from the MSP430s set.

But it happens only in simulation. When downloading to the hardware the IAR
works fine.

-Augusto

-----Mensagem original-----
De: msp430@yahoogroups. com
[mailto:msp430@yahoogroups. com] Em nome
de
old_cow_yellow
Enviada em: ter-feira, 13 de janeiro de 2009 19:07
Para: msp430@yahoogroups. com
Assunto: [msp430] Re: IAR 'F1611 simulation issue

I do not know what is causing the problem you have. However, I have a
suggestion.

In your source code, do not use #include (i.e., header
file for the specific chip you are using). Use #include
instead. You can inspect msp430.h and see that it will automatically
include msp430x16x.h (or the correct header file for the specific
chip) according to the Target of your project.

The Linker and Simulator also work according to the Target of your
project. That is why I suggest you let the Assembler also do its part
according the Target of your project.

--OCY

--- In msp430@yahoogroups. com, "Augusto
Einsfeldt" wrote:
>
> Hello IAR users,
> I have found a strange behavior when simulating a MSP430F1611 design
in the IAR. Maybe I have to change some setting but till now I cannot
find where or what should it be.
> The issue is the following: when initiating the debug session for
simulation the disassembly window shows completely strange
instructions and the simulation itself cannot run. It does happen with
the latest version available at TI site to download and also with
version 3.30. The design is assembly only. The MCU is correctly
selected in the Options appropriate tab and the "#include
"msp430x16x.h"" is used in the source code.
> The exact same design simulates perfectly when selecting a different
MCU like MSP430F149. In this case the disassembly window has the
correct instructions and the simulations goes well.
> I did not noticed this behavior before because I am already used to
download the design and debug it there instead of doing simulations.
And this works correctly with '1611 hardware. But today I am away from
my bench and thought to use the time to check some new routines with
simulation.
> I can just use the '149 selection to try my routines but wonder if
there is a solution for '1611.
> Best regards,
> Augusto
>
>
>
>






Same principle but different manifestation as my previous comment.

You probably told the Assembler exactly where to place the code. I
suggest that you do not do that. You should tell it to place the code
in RSEG CODE instead. This way, the Linker will automatically fined
out where the main-flash is and place the code there.

For F149, the main-flash is at 0x1100-0xFFFF. For F1611, the
main-flash is at 0x4000-0xFFFF. Your screen shots showed the code
around 0x2ACE-0x2AF6 which is Flash for F149, but RAM for F1611.

--OCY

--- In m..., "Augusto Einsfeldt" wrote:
>
> I did post the images in the group as
IAR_1611_simulation_screen_shot photo
> album.
>
> -Augusto
>
>
>
>
>
> -----Mensagem original-----
> De: m... [mailto:m...] Em nome de
> Augusto Einsfeldt
> Enviada em: ter-feira, 13 de janeiro de 2009 19:48
> Para: m...
> Assunto: RES: [msp430] Re: IAR 'F1611 simulation issue
>
>
>
> I did try your suggestion but the problem was not solved.
>
> Just to show better what I mean I will try to attach two screen shots
> showing the problem in one and how it should be in the other.
>
> In case the images cannot be attached (even small ones) then I will
post in
> the image area.
>
> It is like the assembler did use a completely different processor
since all
> instructions are totally different from the MSP430's set.
>
> But it happens only in simulation. When downloading to the hardware
the IAR
> works fine.
>
> -Augusto
>
> -----Mensagem original-----
> De: msp430@yahoogroups. com
> [mailto:msp430@yahoogroups. com]
Em nome
> de
> old_cow_yellow
> Enviada em: ter-feira, 13 de janeiro de 2009 19:07
> Para: msp430@yahoogroups. com
> Assunto: [msp430] Re: IAR 'F1611 simulation issue
>
> I do not know what is causing the problem you have. However, I have a
> suggestion.
>
> In your source code, do not use #include (i.e., header
> file for the specific chip you are using). Use #include
> instead. You can inspect msp430.h and see that it will automatically
> include msp430x16x.h (or the correct header file for the specific
> chip) according to the Target of your project.
>
> The Linker and Simulator also work according to the Target of your
> project. That is why I suggest you let the Assembler also do its part
> according the Target of your project.
>
> --OCY
>
> --- In msp430@yahoogroups. com,
"Augusto
> Einsfeldt" wrote:
> >
> > Hello IAR users,
> > I have found a strange behavior when simulating a MSP430F1611 design
> in the IAR. Maybe I have to change some setting but till now I cannot
> find where or what should it be.
> > The issue is the following: when initiating the debug session for
> simulation the disassembly window shows completely strange
> instructions and the simulation itself cannot run. It does happen with
> the latest version available at TI site to download and also with
> version 3.30. The design is assembly only. The MCU is correctly
> selected in the Options appropriate tab and the "#include
> "msp430x16x.h"" is used in the source code.
> > The exact same design simulates perfectly when selecting a different
> MCU like MSP430F149. In this case the disassembly window has the
> correct instructions and the simulations goes well.
> > I did not noticed this behavior before because I am already used to
> download the design and debug it there instead of doing simulations.
> And this works correctly with '1611 hardware. But today I am away from
> my bench and thought to use the time to check some new routines with
> simulation.
> > I can just use the '149 selection to try my routines but wonder if
> there is a solution for '1611.
> > Best regards,
> > Augusto
> >
> >
> >
> >
>
>
>
>
>
>
>
>
>

Holy sh***... you are right, of course. I forgot the address space of 1611.
In my dumb memory I thought about the address space of 149.

It also reminds me that the solution is always much simpler than what we
like to think in other words I should take my vacancy like others do
instead of keep working

Thanks,

Augusto



-----Mensagem original-----
De: m... [mailto:m...] Em nome de
old_cow_yellow
Enviada em: ter-feira, 13 de janeiro de 2009 20:43
Para: m...
Assunto: RES: [msp430] Re: IAR 'F1611 simulation issue



Same principle but different manifestation as my previous comment.

You probably told the Assembler exactly where to place the code. I
suggest that you do not do that. You should tell it to place the code
in RSEG CODE instead. This way, the Linker will automatically fined
out where the main-flash is and place the code there.

For F149, the main-flash is at 0x1100-0xFFFF. For F1611, the
main-flash is at 0x4000-0xFFFF. Your screen shots showed the code
around 0x2ACE-0x2AF6 which is Flash for F149, but RAM for F1611.

--OCY

--- In msp430@yahoogroups. com, "Augusto
Einsfeldt" wrote:
>
> I did post the images in the group as
IAR_1611_simulation_screen_shot photo
> album.
>
> -Augusto
>
>
>
>
>
> -----Mensagem original-----
> De: msp430@yahoogroups. com
[mailto:msp430@yahoogroups. com] Em nome
de
> Augusto Einsfeldt
> Enviada em: ter-feira, 13 de janeiro de 2009 19:48
> Para: msp430@yahoogroups. com
> Assunto: RES: [msp430] Re: IAR 'F1611 simulation issue
>
>
>
> I did try your suggestion but the problem was not solved.
>
> Just to show better what I mean I will try to attach two screen shots
> showing the problem in one and how it should be in the other.
>
> In case the images cannot be attached (even small ones) then I will
post in
> the image area.
>
> It is like the assembler did use a completely different processor
since all
> instructions are totally different from the MSP430's set.
>
> But it happens only in simulation. When downloading to the hardware
the IAR
> works fine.
>
> -Augusto
>
> -----Mensagem original-----
> De: msp430@yahoogroups. com
> [mailto:msp430@yahoogroups. com]
Em nome
> de
> old_cow_yellow
> Enviada em: ter-feira, 13 de janeiro de 2009 19:07
> Para: msp430@yahoogroups. com
> Assunto: [msp430] Re: IAR 'F1611 simulation issue
>
> I do not know what is causing the problem you have. However, I have a
> suggestion.
>
> In your source code, do not use #include (i.e., header
> file for the specific chip you are using). Use #include
> instead. You can inspect msp430.h and see that it will automatically
> include msp430x16x.h (or the correct header file for the specific
> chip) according to the Target of your project.
>
> The Linker and Simulator also work according to the Target of your
> project. That is why I suggest you let the Assembler also do its part
> according the Target of your project.
>
> --OCY
>
> --- In msp430@yahoogroups. com,
"Augusto
> Einsfeldt" wrote:
> >
> > Hello IAR users,
> > I have found a strange behavior when simulating a MSP430F1611 design
> in the IAR. Maybe I have to change some setting but till now I cannot
> find where or what should it be.
> > The issue is the following: when initiating the debug session for
> simulation the disassembly window shows completely strange
> instructions and the simulation itself cannot run. It does happen with
> the latest version available at TI site to download and also with
> version 3.30. The design is assembly only. The MCU is correctly
> selected in the Options appropriate tab and the "#include
> "msp430x16x.h"" is used in the source code.
> > The exact same design simulates perfectly when selecting a different
> MCU like MSP430F149. In this case the disassembly window has the
> correct instructions and the simulations goes well.
> > I did not noticed this behavior before because I am already used to
> download the design and debug it there instead of doing simulations.
> And this works correctly with '1611 hardware. But today I am away from
> my bench and thought to use the time to check some new routines with
> simulation.
> > I can just use the '149 selection to try my routines but wonder if
> there is a solution for '1611.
> > Best regards,
> > Augusto
> >
> >
> >
> >
>
>
>
>
>
>
>
>
>