Skip to main content
Jack3
Senior II
June 8, 2020
Question

From TrueStudio to STM32CubeIDE how to?

  • June 8, 2020
  • 2 replies
  • 1016 views

Until now I used TrueStudio.

But now I generated a project for STM32CubeIDE, suing the seprated CubeMX.

I'm using STM32CubeIDE Version 1.3.0, STMCuneMX Version 5.6.1

Reinstalled both, but no luck to get it working on Windows 10.

And get these error when compiling:

...

specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -o "Src/wwdg.o"

 USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size)

          ^~~~~~~~~~~~~~~~

In file included from ../Src/usbd_conf.c:26:0:

../Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h:127:21: note: previous declaration of 'USBD_LL_Transmit' was here

 USBD_StatusTypeDef USBD_LL_Transmit (USBD_HandleTypeDef *pdev,

           ^~~~~~~~~~~~~~~~

../Src/usbd_conf.c:592:20: error: conflicting types for 'USBD_LL_PrepareReceive'

 USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size)

          ^~~~~~~~~~~~~~~~~~~~~~

In file included from ../Src/usbd_conf.c:26:0:

../Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h:132:21: note: previous declaration of 'USBD_LL_PrepareReceive' was here

 USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev,

           ^~~~~~~~~~~~~~~~~~~~~~

make: *** [Src/subdir.mk:134: Src/usbd_conf.o] Error 1

make: *** Waiting for unfinished jobs....

"make -j8 all" terminated with exit code 2. Build might be incomplete.

Has anybody seen this?

I will try with the inmtegrated CubeMX now...

Update: ioc files from other STM32CubeMX versions cause these problems.

While they seem to look right in STM32CubeMX , under the hood things seem to go wrong.

Just needed to redo everything, generating a new ioc.

This topic has been closed for replies.

2 replies

Cartu38 OpenDev
Graduate II
June 11, 2020
Cartu38 OpenDev
Graduate II
June 12, 2020

I've got a try then with proper tool suite versions Thanks your .ioc file sharing. I confirm I'm facing same issue as you at compilation time.

Issue is well reported by compiler ... some mismatch within code between some function definitions (.h) and their implementation (.c).

On my side syncing both .h/.c is solving issue. Please update last parameter (i.e. size) from uint32_t to uint16_t within faulty .c file. Your project compiles then like a charm !