Вы находитесь на странице: 1из 4

HOW-TO Setup THRSim11 to Simulate the M68HC11 EVB

Jason Bales, 28 Aug 2006 ECE 447, Fall 2006 George Mason University This document will guide you through setting up THRSim11 to properly simulate the Motorola 68HC11 Evaluation Board (EVB) that comes in the lab kit for ECE 447 offered at George Mason University in Fall of 2006. It assumes you have already correctly installed THRSim11 and you have access to the buffalo.h header file. 1. Start Programs THRSim11 68HC11 Simulator THRSim11

You should get a screen similar to [Figure 1] with the MASON splash in the background.

Figure 1, THRSim11 Startup Screen Now we need to setup the memory map in THRSim11. Because we are simulating the Evaluation Board (EVB), the simulation setup will actually need to write data in what is normally ROM on the EVB. THRSim11 will stop us from writing to memory that is designated as ROM, so for simplicity, we will set everything to RAM. 2. View Memory Memory configuration

Verify you are selecting the correct menu item by referring to [Figure 2].

Figure 2, Memory Configuration menu item

THRSim11 will tell you that it needs to close. 3. Click YES THRSim11 will nicely ask you if you are sure you want to exit 4. Click EXIT The THRSim11 Memory Configuration Tool will now open. Follow this procedure to set the address space to RAM. Afterwards verify that your configuration matches [Figure 3]. 5. Select User defined from the drop down box in the top left of the window 6. Uncheck all ROMx enabled sections in the second row 7. Set the Ram sections according to this table: RAM0 $0000 $01FF RAM1 enabled $2000 $FFFF RAM2 enabled $0000 $0000 RAM3 enabled $0000 $0000

RAM Start RAM End

RAM0 is by default always enabled. We are using the RAM1 section to make the rest of memory RAM. Note that this covers all of memory space except for a small section $01FF-$1FFF. This is fine. Some of that area is for memory mapped I/O. Ensure that the remaining RAM and ROM sections are unchecked. It is also OK to leave the LCD enabled checked if you like, but do not change any of the addresses in the third row (IO and LCD).

Figure 3, Memory Configuration Tool 8. Click OK in the top right of the window THRSim11 will reload and is now ready to simulate your code. If all you are doing is setting THRSim11 up to simulate, you are done. If you are ready to simulate actual program code then follow the remaining steps. We need to include a single header file in our application for our code to simulate properly. 9. Copy buffalo.h to your source code folder 10. Include it in your main.c file 11. Call buffalo_thrsim_setup() right after you have declared any variables in your main() function in main.c Now you are almost ready to simulate the EVB with Buffalo running on it. Compile your code as normal in the SciTE editor and run it. 12. Tools 13. Tools Build Go

THRSim11 will open if it isn t already running and bring your code up. You are now ready to start the simulation.

Вам также может понравиться