cancel
Showing results for 
Search instead for 
Did you mean: 

USB HID example compilation issues with IAR

charlieincanada69
Associate II
Posted on November 16, 2011 at 17:35

Hi,

I have downloaded UM0424 and opened the SWARM workspace in IAR workbench v6. The project compiles with lots of error, all of which are like this:

declaration is incompatible with ... then it lists a data type in core_cm3.h that is incompatible with the definition in intrinsics.h (the IAR ARM inline function file).

Has anyone else seen this problem?

Thanks, Charlie

#mouse #um0424 #iar #usb #hid #cmsis #stm32-usb-hid-communication
8 REPLIES 8
charlieincanada69
Associate II
Posted on November 30, 2011 at 21:58

Replying to my own post in case anyone else needs the answer...

The older versions of CMSIS are not compatible with the later IAR versions. The CMSIS stuff has to be updated to work with IAR v6. 

http://supp.iar.com/Support/?note=75890&from=search+result

ac
Associate II
Posted on December 08, 2011 at 02:35

Did you get this to work completely?  I have the same problem.  I have the latest, 6.30.3.3241 EWARM and common components version 6.3.12.2118.

I was able to get the STM3210B-EVAL software (UM0435) working using the techniques to change CMSIS, but not the custom hid project in the USB-FS-Device development kit (UM0424).

rosarium
Associate II
Posted on December 08, 2011 at 09:15

1. Check the box against ''Use CMSIS''  at the following

Project-->Option --> General Options --> Library Configuration --> CMSIS

2. Remove 

$PROJ_DIR$\..\..\..\Libraries\CMSIS\Core\CM3   from

Project-->Option --> C/C++ Compiler --> Preprocessor

3. Select the correct target controller.

rosarium
Associate II
Posted on December 08, 2011 at 09:18

1- Support of ST-LINK/V2:

You need  to run  ST-ink_V2_USBdriver.exe from [IAR_install directory]\Embedded Workbench 6.\arm\drivers\ST-Link

2- The compiler adds a lot of new intrinsics which  breaks other CMSIS headers since there will be double definitions.

To overcome this change, it's mandatory to :

  - Check ''Use CMSIS'' option from: Project options > General Options > Library Configuration

  -  Remove all CMSIS headers files from your project.

For ST packages you should remove:

$PROJ_DIR$\..\..\..\Libraries\CMSIS\CM3\CoreSupport  from  [Project>Options>C/C++ Compiler>Preprocessor]

charlieincanada69
Associate II
Posted on December 08, 2011 at 16:00

Hi Aaron Clarke,

To get the compilation running I used the version of CMSIS that was provided with IAR. To achieve this I did exactly how pila.rosarium.001 has stated.

I was trying to use the example on an IAR dev board rather than an ST one. This mean I had to go through the example code and remove all the dev board specific stuff - which was a lot. I found the example was well written for all the various ST dev boards, but hard work to port to different hardware.

rosarium
Associate II
Posted on December 09, 2011 at 09:08

which hardware you are using???

ac
Associate II
Posted on December 09, 2011 at 18:59

I am using the STM3210B-EVAL, I was able to get it to work finally.

Thanks for your help.

Aaron

ac
Associate II
Posted on December 09, 2011 at 19:29

Thanks for responding to my question.  I was able to get it to work after I read your original posts.  I was more work than I thought at first.

I also have to port it to a different board so I will have to remove the eval specific code like you did.  I expected that would take some time, but I never anticipated the IAR problems.

Best regards,

Aaron

Update: 

http://blog.embeddedcoding.com/2011/12/how-to-compile-stmicro-um0424-usb-stack.html

, it should also work for the other USB FS device demo projects, I tested out the joystick mouse too.