Vous êtes sur la page 1sur 3

Using the 68HC11 Introl Simulator (v. 4.01.

2)
The Introl CODE IDE includes a 68HC11 simulator that will allow you to run code compiled and liked for the 68HC11 board on the PC. In order to do so you will first need to create a project to build a simulator targeted executable.

Creating your simulator-targeting project.


When you create a new project using the project wizard the only selection you will need to make are the processor and the variant. All other wizard defaults should be left unchanged.

After creating the project you can add files to the project either via the wizard prompt or using the Folder Browser in the Windows menu. When in the folder browser right click on the file you wish to add and select Add to Project.

After files have been added to the project you can build the project by clicking the Build button in the upper right corner of the CODE window. This will produce the executable *.e11 file that runs

in the simulator. When double click it the simulator will launch and the simulator will go to the start location. Note that this is not the your main function but the startup code that was generated by Introl for you.

u Clicking the Go button once at the top will take you to the first line of code in the main().

At this point you can single step, install breakpoints in other locations if needed and then Go to continue the program execution. Breakpoints are added by selecting the source file where you want the breakpoint from the Files menu and then clicking in the left gray margin until a red dot appears. Clicking go for this sample program with a printf statement shows the output in the Program Stdio window. The Program Stdio window can be open by selecting it from the Windows menu.

The source window shows that the execution has completed to the exit loop that was generated by Introl for you. These are all the steps needed to use the simulator. Please take care to assure that the focus is on the desired window when you use the simulator. This is especially important in the case of using the Program Stdio window for input. If you are not careful after stepping you may find yourself typing in the source window rather than the Stdio window. Notes: If you #include a file in your source code it is NOT necessary to Add that file to the project. This is true for header(.h) or source files (.c or .s) Remember if you #include something in a file it is inserted into the file at the time of the first compiler pass. If you Add that same file to the project you will likely see linker errors complaining of multiple defines.

Vous aimerez peut-être aussi