68HC11Sim

download 68HC11Sim

of 3

Transcript of 68HC11Sim

  • 8/13/2019 68HC11Sim

    1/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 andliked for the 68HC11 board on the PC. In order to do so you will first need to create a project tobuild 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 makeare 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 usingthe Folder Browser in the Windows menu. When in the folder browser right click on the file youwish 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 inthe upper right corner of the CODE window. This will produce the executable *.e11 file that runs

  • 8/13/2019 68HC11Sim

    2/3

    in the simulator. When double click it the simulator will launch and the simulator will go to thestart location. Note that this is not the your main function but the startup code that wasgenerated 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().

  • 8/13/2019 68HC11Sim

    3/3

    At this point you can single step, install breakpoints in other locations if needed and then Go tocontinue the program execution. Breakpoints are added by selecting the source file where youwant the breakpoint from the Files menu and then clicking in the left gray margin until a red dotappears. Clicking go for this sample program with a printf statement shows the output in theProgram 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 generatedby Introl for you.

    These are all the steps needed to use the simulator. Please take care to assure that the focus ison the desired window when you use the simulator. This is especially important in the case ofusing the Program Stdio window for input. If you are not careful after stepping you may findyourself 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. Thisis true for header(.h) or source files (.c or .s) Remember if you #include something in a file it isinserted into the file at the time of the first compiler pass. If you Add that same file to theproject you will likely see linker errors complaining of multiple defines.