Newbie problem with CodeWarrior simulating MC9S08FL16

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Newbie problem with CodeWarrior simulating MC9S08FL16

Jump to solution
1,027 Views
davidcawthon
Contributor II

Howdy,

 

I am using the simulator in CW (free edition) in an effort to learn the S08 instruction set.  This seems to work -- mostly.  However, while I'm stepping through my programs I am unable to see values that are pushed into the stack.  I see the stack pointer value changing as pushes and pulls occur, but when I set up a memory monitor pointing at that area of memory, I just see a bunch of zeroes.

 

The part I'm simulating is the MC9S08FL16.  My assembly programs are very short and simple and are building with no errors.  I'm using the standard initialization code to "LDHX #__SEG_END_SSTACK" and "TXS" and can see that SP is 0x017f in the register view.  I am pointing the memory monitor to 0x0170 since I am fully aware that the stack will grow downward in memory.

 

Am I doing something wrong here?  Seems like this would be pretty basic functionality.

 

Thanks,

David

Labels (1)
0 Kudos
1 Solution
737 Views
davidcawthon
Contributor II

A quick update...

I see the same behavior when I change my Test3 program to access the stack using "STA oprx8,SP" SP1 addressing mode.  I also tried using "TSX" and "STA oprx8,X" IX1 addressing mode with the same outcome.

To me it feels like the memory views (Memory Monitor and Memory Browser) are not updating properly.  My test code is successfully pulling values off of the stack; I just can't see them in memory!  Either I'm making a mistake somewhere (which I admit is entirely possible!) or this product has a serious bug.

I'm attaching Test3b.zip, which is the version that uses IX1 addressing mode.

Thanks,
David

View solution in original post

0 Kudos
5 Replies
738 Views
davidcawthon
Contributor II

A quick update...

I see the same behavior when I change my Test3 program to access the stack using "STA oprx8,SP" SP1 addressing mode.  I also tried using "TSX" and "STA oprx8,X" IX1 addressing mode with the same outcome.

To me it feels like the memory views (Memory Monitor and Memory Browser) are not updating properly.  My test code is successfully pulling values off of the stack; I just can't see them in memory!  Either I'm making a mistake somewhere (which I admit is entirely possible!) or this product has a serious bug.

I'm attaching Test3b.zip, which is the version that uses IX1 addressing mode.

Thanks,
David

0 Kudos
734 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi David,

please provide us the follows:

1.    your CW version:

  - if you use classic version: Start the IDE and click on Help | About Freescale CodeWarrior. Click on Installed Products.Save all info displayed into a txt file and send it to me.

  - if you use eclipse version: Start the IDE and click on Help | About CodeWarrior Development Studio. Send me the version and build id.

2.    send the entire sample code folder(include mcp, prm,c...) in zip format to me.if your project is confidential, please create a new demo project and isolate the problem a demo code to me so that i can test it on my side directly.

3.      error screenshot.

Best Regards,

ZhangJun

0 Kudos
734 Views
davidcawthon
Contributor II

Hi, ZhangJun.

1.  I'm using the Eclipse version:

Version: 10.6

Build Id:140329

2.  Project attached (Test3.zip).

3.  Screenshot attached (Test3 error screenshot.png).

My source is a very simple assembly program that pushes four bytes onto the stack.  The screenshot shows my debug session after the four values were pushed.  I would expect the values in memory at $017c to be "04 03 02 01".  Instead it shows in the memory monitor as "00 00 00 00".

Thanks!

David

0 Kudos
734 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi David,

I can't download your png file. can you please upload it again in zip format?

Best Regards,

ZhangJun

0 Kudos
734 Views
davidcawthon
Contributor II

ZhangJun,

OK, I've attached a zipped version of the PNG screenshot.

Thanks,

David

0 Kudos