cancel
Showing results for 
Search instead for 
Did you mean: 

Error: identifier ''GPIO_AF10_USB'' is undefined (in CubeMX generated EWARM project)

marek
Associate II
Posted on October 13, 2014 at 09:10

Hi,

I'm facing a problem with the CubeMX generated code for STM32L151QDHx.

The generated code seems to lack the definition of GPIO_AF10_USB which is referenced in the generated code.

Versions of the software used:

  • STM32CubeMX

    Version 4.4.0-A10

    STM32Cube V1.0
  • IAR Embedded Workbench for ARM

    Version 6.60.1.5104

Steps to reproduce the problem:

  1. Created ''New Project'' for STM32L151QDHx

  2. Checked the checkbox: ''Pinout'' tab -> Configuration -> Peripherals -> USB -> Device (FS)

  3. Selected ''Communication Device Class for'': ''Pinout'' tab -> Configuration -> MiddleWares -> USB_DEVICE -> Class For FS IP

  4. Configured clock crystal pins:

    1. Selected RCC_OSC32_IN for PC14

    2. Selected RCC_OSC32_OUT for PC15

    3. Selected RCC_OSC_IN for PH0

    4. Selected RCC_OSC_OUT for PH1

  5. On ''Clock Configuration'' tab:

    1. Selected HSE in PLL Source Mux

    2. Picked x12 for PLLMul

    3. Picked /3 for PLLDiv

    4. Selected PLLCLK in System Clock Mux

  6. Generated EWARM code

  7. While building that code I get following error:

   usbd_conf.c 

   Error[Pe020]: identifier ''GPIO_AF10_USB'' is undefined C:\[...]\Error\Src\usbd_conf.c 82

   Error while running C/C++ Compiler

Could you please help? Is there a way to submit it as CodeMX bug so that others can benefit from patching it?

For your convenience I attach the project file and generated code.

Looking forward to hearing from you.

Kind regards,

Mark

#ewarm #gpio_af10_usb #cubemx
8 REPLIES 8
Amel NASRI
ST Employee
Posted on October 13, 2014 at 18:33

Hello Mark,

Thanks for reporting this issue. We will contact you soon to provide the fix.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

stm32cube-t
Senior III
Posted on October 14, 2014 at 11:15

Hello Mark,

I don't reproduce your issue.

Did you retrieve the MX version from ST.com website?

Thank you for your feedback

marek
Associate II
Posted on October 14, 2014 at 17:08

Thank you Mayla - much appreciated!

Mark
marek
Associate II
Posted on October 14, 2014 at 17:13

@:

> I don't reproduce your issue.

That's odd - I can replicate the problem time after time...

> Did you retrieve the MX version from ST.com website?

Yes, quite recently in fact - I looked it up - I downloaded & installed it on 16th of September.

Do you have any advice for me? Do you need more info?

When I check the ''About'' of CubeMX I get: Version 4.4.0-A10

Was there a release in the mean time that I didn't catch?

Best regards,

Mark
stm32cube-t
Senior III
Posted on October 14, 2014 at 17:48

Hello,

You're not using an official version. Please wait for the official release that should be out soon on st.com.

Best Regards

marek
Associate II
Posted on October 15, 2014 at 10:04

> You're not using an official version.

So the CubeMX I downloaded from st.com

http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF259242

 is not official?

> Please wait for the official release that should be out soon on st.com.

Okay - I'll wait for the next release - I hope it'll arrive soon :)

Greetings,

Mark

marek
Associate II
Posted on October 16, 2014 at 12:29

I tried the

http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1533/PF259242

again yesterday and despite the version claimed as 4.4.0 the downloaded zip file contained version 4.3. Then indeed I could not replicate the steps because for the selected processor the ''Clock Configuration'' tab was blank.

I downloaded the software again today and this time the zip contained indeed version 4.4.0 (this time labeled without the suffix A10 I saw originally).

After further investigation I tracked down the origin of the A10 version - it turned out indeed that I got it at a training organized by ST, not from the st.com.

Long story short - I tried my steps with this new 4.4.0 CubeMX and the generated code works!

Thanks everybody for your time - I should have been more cautious about what software I'm using.

Best regards,

Mark

stm32cube-t
Senior III
Posted on November 03, 2014 at 10:46

Thank you for keeping us posted and seeing your configuration is now working.

Best Regards