 
					
				
		
Hi,
Just got a USBSpyder08 kit, which includes a copy of codewarrior. I'll be targetting the MC9RS08KA2. The hardware hasn't arrived yet, but I noticed that CW includes a full-chip simulator for the RS08. So I ran through the device initialization wizard, ran the simulator, and it immediately fails with the error message "attempt to use unimplemented memory".This seems to happen whenever the simulator encounters an instruction that uses the paging window to access the high page registers. Any advice? Am I missing something? I tried loading up the RS08 demo shipped with Codewarrior and targetting the simulator with that too, and it fails with the same error. Datasheet confirms that the memory address is a real register, and oddly enough the "View register files" menu command even lists the register with the right address.This is my first exposure to CodeWarrior, up until now I've been working with PICs, so perhaps I'm missing something obvious.
Cheers,
Carl
Solved! Go to Solution.
 
					
				
		
Hello
I would suggest you to upgrade top a later release of CodeWarrior.
I did some test with CodeWarrior for MicroController V6.2 and I am able to run the RS08KA2 demo on that build.
I assume V5.1 simulator had some problems.
CrasyCat
 
					
				
		
Hello
- Which version of CodeWarrior are you using?
To retrieve that info:
- Start CodeWarrior
- Select Help -> About Freescale CodeWarrior
- Click on "Install Products"
- CodeWarrior version used is displayed on top in the Installed Products dialog.
CrasyCat
 
					
				
		
Hi,
At the top of the installed products window it says "CodeWarrior Development Studio for Freescale HC08 5.1, Build 6124". At the bottom I've also got an IDE version of 5.7.0 Build 2015.
The problem is simple to reproduce:
1. Start CodeWarrior
2. File->Open
3. Browse to "C:\Program Files\Freescale\CodeWarrior for HC08 V5.1\(CodeWarrior_Examples)\RS08\Evaluation Board Examples\DEMO9RS08KA2\Asm\Demo"
4. Open Demo.mcp
5. Select "Full Chip Simulation" from the drop down list
6. Compile and Debug (Project->Debug)
7. True-time simulator will open. Click run (F5).
8. Will fail with uninitialized memory error.
The simulator similarly fails with the USBSpyder demo under RS08. It works with some of the HC08 demos I've tried, however.
Cheers.
Hello,
So the error message is now for uninitialised memory, and not for unimplemented memory.
The demo project code attempts to read a pre-programmed oscillator trim value from flash. The full chip simulator observes this as an unprogrammed memory location, and generates the error message. This is a quirk of the full chip simulator attempting to be "over-helpful".
There would not be a problem using the actual hardware - the byte value would simply be read as $FF if the location were unprogrammed.
A solution, for simulation purposes only, might be add code to ORG to the flash address, and then program a value using the DC.B directive. This flash address would normally be programmed during the oscillator calibration process.
Regards,
Mac
 
					
				
		
Hi Mac,
Thanks for the response. You're quite right: I actually had two separate error messages and hadn't noticed. The first (on my project generated by the device initialization code) was for unimplemented memory when accessing SPMSC1. The second (from the demo code) was for uninitialized or invalid memory and was the clock trim. I'll see if I can find an easy way to reproduce the first message and get back to you.
Cheers,
Carl
 
					
				
		
Hello
I would suggest you to upgrade top a later release of CodeWarrior.
I did some test with CodeWarrior for MicroController V6.2 and I am able to run the RS08KA2 demo on that build.
I assume V5.1 simulator had some problems.
CrasyCat
 
					
				
		
