background image

Debugging your Application

Getting Started with the MCUSLK for MC9S12C32 Application Module, Rev. 0

Freescale Semiconductor

15

Figure 13

main.c in Editor Window

c.

Make changes to the contents of main.c file, if desired

d.

If you make changes to main.c, from IDE main menu bar, select File> Save

5.

Add files (if appropriate)

a.

Highlight the “sources” folder

b.

From the IDE main menu bar, select “project”; a menu will appear

c.

Select “add files”; a dialog box will appear

d.

Navigate to that directory that contains the file you want to add

e.

Highlight the filename of the file you want to add to your project

f.

Click “open”; the “add files” dialog box will appear

g.

Check the checkbox for each build target to which the file applies

h.

Click “OK”; the “add files” dialog box closes. In the “project” window, the filename of added file 
will appear under the “sources” folder

6.

Build project

a.

From IDE main menu bar, select “project”

b.

Select “make”; IDE builds (assembles, compiles, and links) project; error and warnings window 
will open and show error messages and warning messages, if appropriate

Debugging your Application

The following steps explain how to establish communication and upload your application software to the 
MC9S12C32 MCU application module (CSM-12C32). This will allow you to debug your application 
through Metrowerks’ True-Time Simulator & Real-Time Debugger using the BDM pod interface on the 
MCU Project Board – 2. The 

Software Setup

 and 

Hardware Setup

 sections must be completed before 

executing the steps in this section.

1.

Make sure power is applied to the project board. If not, go back and follow hardware setup section 
instructions.

2.

Start debugger

Summary of Contents for MCUSLK

Page 1: ...essary to begin development on an HCS12 Family microcontroller unit MCU using your MCUSLK The software setup section will assist you install the Metrowerks CodeWarrior software and necessary software...

Page 2: ...ce patch labeled CW12_V3_1_ICD12_USB2_0_Sim_patch exe located in the Service Pack CD found inside the supplied 3 cd case labeled CodeWarrior Development Studio for HC S 08 Special Edition and HC S 12...

Page 3: ...oject Board 2 1 To begin place the MCU Project Board 2 on a flat sturdy surface Ensure sufficient space is available around the project board to safely construct and test prototyped circuits 2 Verify...

Page 4: ...L_A in USB position VDD_SEL 5V 3 3V JP3 Sets VDD to 5 V for project board PS1_EN JP11 Enables PS1 output 15 V supply from dc dc converter to the project board J301 HIGH FULL USB ML MCUSLK Selects USB...

Page 5: ...cation signals individually for project board COM port AMPL JP7 Oscillator output at reduced amplitude 3 3 Vpp LED_EN JP6 Enables all LED outputs on project board UFEA JP10 Enables access to direct co...

Page 6: ...project board Align pin 1 on the application module with pin 1 of the MCU PORT connector on the project board as marked by Figure 2 Figure 2 Installation of MC9S12C32 MCU Application Module 6 Power up...

Page 7: ...n module board Figure 3 Installation of USB Cable NOTE Steps 8 through 11 are a one time required procedure per host PC that you intend to use with the MCU Project Board 2 and can be skipped on subseq...

Page 8: ...software automatically recommended from the Found New Hardware Wizard Screen 1 and click Next button to continue with installation 10 Installation will begin with the Found New Hardware Wizard Screen...

Page 9: ...Wizard Screen 3 12 Verify that the 3 3 V LED 5 V LED and both green and yellow USB LEDs on the MCU Project Board 2 are lit 13 Verify that the VDD LED on the MC9S12C32 MCU application module board CSM1...

Page 10: ...m the steps described in the quick start pamphlet included in the CodeWarrior for HC S 12 development tools CD case The instructions below are adjusted for the MCUSLK and MC9S12C32 development module...

Page 11: ...rked if using assembly or C mark the respective selection i Click Next Page 3 of the new project wizard will appear see Figure 9a Figure 9 New Project Wizard Page 3 and Page 4 j Select No you do not w...

Page 12: ...evelopment Figure 10 New Project Wizard Page 5 and Page 6 n Select None you do not want to specify a floating point format o Click Next Page 6 of the new project wizard will appear see Figure 10b p Se...

Page 13: ...Page 7 r Page 7 allows you to specify connections that the project should be configured to support Select P E Hardware Debugging and Motorola Serial Monitor Hardware Debugging s Click Finish the wiza...

Page 14: ...build target Your project can contain multiple build targets For this example we use the P E ICD target which uses the USB BDM pod on the MCU Project Board 2 This BDM pod provides bidirectional commu...

Page 15: ...Click OK the add files dialog box closes In the project window the filename of added file will appear under the sources folder 6 Build project a From IDE main menu bar select project b Select make ID...

Page 16: ...elect the appropriate host PC USB port being used by the BDM pod and click OK Figure 14 Debugger Window1 1 For a description of debugger windows see Table 2 Table 2 Debugger Windows Window Name Descri...

Page 17: ...sent Command pane displays program status NOTE Alternatively you can click on start continue icon in the debugger taskbar 7 Click start continue icon to resume program code execution if breakpoint occ...

Page 18: ...damages Typical parameters which may be provided in Freescale Semiconductor data sheets and or specifications can and do vary in different applications and actual performance may vary over time All op...

Reviews: