Trouble getting the Demo-HID USB DemoJM MC9S08JM60 to compile with CodeWarrior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trouble getting the Demo-HID USB DemoJM MC9S08JM60 to compile with CodeWarrior

4,196 Views
krashcraft
Contributor I
All,
I am trying to get started with the USB DemoJM board and CodeWarrior. The HID Mouse Demo runs OK, so I am using it as a starting point to expand from there.
I am using the included version of CodeWarrior that came with the DemoJM board.

I have found the source code for the HID demo, but I can not get it to compile. Any ideas?
Thanks,
Keith
Labels (1)
0 Kudos
6 Replies

543 Views
J2MEJediMaster
Specialist I
When you say you can't get it to compile, are you getting:

Problems because of missing header files?
Compiler syntax errors?
A code size limit error?

What version and target of CodeWarrior are you using?
What version of CodeWarrior was the demo project built with?

---Tom

0 Kudos

543 Views
krashcraft
Contributor I
Version of CodeWarrior: 5.9.0
                              Build: 2404
The Demo that comes with the DEMOJM eval board (I guess)

The error is C4437: Error-directive found: No USB configuration selected.

Where in the code is this selected? Which one is suppose to be selected for the Demo-example?

Thanks,
Keith
0 Kudos

543 Views
J2MEJediMaster
Specialist I
Based on the error message, I'm assuming the USB stack wasn't installed. The DemoJM labs require the use of the USB-LITE by CMX stack for MC9S08JM60 (JM60). Instructions to install the software stack are explained in the DEMOJM Quick Start Guide (DEMOJMQSG). The USB-LITE stack by CMX for MC9S08JM60 is installed into C:\CMXUSB_LITE.

Also, don't forget to install the CodeWarrior for Microcontrollers JM60 Service pack, which is a separate install process on the DVD. HTH,

---Tom

0 Kudos

543 Views
krashcraft
Contributor I
OK, I will double check again, but I am pretty sure I have installed it. I did the complete install, step by step, along with the JM60 Service pack.

The Demo has 3-modes built in, the HID-mouse, HID-keyboard, and then a general LED-SW test.

It is looking like the source code is wanting a #define as to which source version to compile, but.... the original Demo has all three, so I am confused (which isn't to hard to do)

I  am a somewhat seasoned user/programmer/designer with Microchip's products, but my customer wanted the Freescale products.

My last Motorola design was with the old HC711E9 products and pure ASM assembler.

Thanks a bunch, and I will see what I come up with again tonight at home.

Keith

0 Kudos

543 Views
j_pav
Contributor I

You need to define one of the options either in a header file or better yet right on the command line. You can do this in the project / target settings. Open your project in the IDE then select the Edit menu. From there, find your project settings. This should be near the bottom of the list. The target settings dialog should now open. In the Target settings panel under the Target item select Compiler for HC08. Press the Options button. The Compiler Option Settings dialog will open. Select the Language tab. Select and check the Processor Definitions item and type one of the definitions in the control box. Your options are:

HID_MOUSE

HID_KBD_DEMO

HID_JOYSTICK_DEMO

USB_CDC

HID_DEMO 

Close the dialog and re-compile.

 

John Pavlick

0 Kudos

543 Views
J2MEJediMaster
Specialist I
I'm sorry the product is giving you so much trouble. Unfortunately, I don't have such a board handy to trouble-shoot this further. If you're still having problems, I'd recommend that you take it to the next level by submitting a service request. Click here to do that.

---Tom

0 Kudos