cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeH7 - CDC example not getting compiled

Rajam
Associate II
 
1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Rajam 

It's working with With STM32CubeH7 from this link.

As you downloaded the examples from Github, I think you forget to add --recursive option when you cloned the repository or you downloaded the project as zip file.

So to download the package, it's recommended:

-  As a zip file: you need to download  from this link.

- When cloning from Github: use --recusrive option.

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.

View solution in original post

3 REPLIES 3
TDK
Guru

Please edit your post and add relevant details, including exact project name, chip, and error messages.

If you feel a post has answered your question, please click "Accept as Solution".
Rajam
Associate II

we have bought STM32H743I eval board and we downloaded the demo binaries from the link https://www.st.com/en/evaluation-tools/stm32h743i-eval.html. The demo binaries are working. 

We downloaded STM32CubeH7 package and imported example project from USB_Device/CDC_example using this link:

https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/STM32H747I-EVAL/Applications/USB_Device/CDC_Standalone/STM32CubeIDE

The project gets imported to IDE but getting many build errors.  The dump is enclosed below:

make -j2 all

arm-none-eabi-gcc "D:/STM32Cube_FW_H7_V1.11.0/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DUSE_IOEXPANDER -DSTM32H743xx -DUSE_USB_HS -c -I../../Inc -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../../../../../../Drivers/STM32H7xx_HAL_Driver/Inc -I../../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../../../../../../../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../../../../../../../Drivers/BSP/STM32H743I-EVAL -I../../../../../../../Drivers/BSP/Components/Common -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Middlewares/STM32_USBD_Library/Core/usbd_core.d" -MT"Middlewares/STM32_USBD_Library/Core/usbd_core.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Middlewares/STM32_USBD_Library/Core/usbd_core.o"

arm-none-eabi-gcc "D:/STM32Cube_FW_H7_V1.11.0/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DUSE_IOEXPANDER -DSTM32H743xx -DUSE_USB_HS -c -I../../Inc -I../../../../../../../Drivers/CMSIS/Include -I../../../../../../../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../../../../../../Drivers/STM32H7xx_HAL_Driver/Inc -I../../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../../../../../../../Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -I../../../../../../../Drivers/BSP/STM32H743I-EVAL -I../../../../../../../Drivers/BSP/Components/Common -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Middlewares/STM32_USBD_Library/Core/usbd_ctlreq.d" -MT"Middlewares/STM32_USBD_Library/Core/usbd_ctlreq.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Middlewares/STM32_USBD_Library/Core/usbd_ctlreq.o"

In file included from ../../../../../../../Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h7xx.h:125,

from ../../../../../../../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:29,

from ../../../../../../../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:27,

from ../../Inc/stm32h7xx_hal_conf.h:194,

from ../../../../../../../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h:29,

from ../../Inc/usbd_conf.h:24,

from ../../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_def.h:28,

from ../../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h:28,

from D:/STM32Cube_FW_H7_V1.11.0/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c:20:

../../../../../../../Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h743xx.h:223:10: fatal error: core_cm7.h: No such file or directory

223 | #include "core_cm7.h" /*!< Cortex-M7 processor and core peripherals */

| ^~~~~~~~~~~~

compilation terminated.

In file included from ../../../../../../../Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h7xx.h:125,

from ../../../../../../../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_def.h:29,

from ../../../../../../../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_rcc.h:27,

from ../../Inc/stm32h7xx_hal_conf.h:194,

from ../../../../../../../Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal.h:29,

from ../../Inc/usbd_conf.h:24,

from ../../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h:28,

from D:/STM32Cube_FW_H7_V1.11.0/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:20:

../../../../../../../Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h743xx.h:223:10: fatal error: core_cm7.h: No such file or directory

223 | #include "core_cm7.h" /*!< Cortex-M7 processor and core peripherals */

| ^~~~~~~~~~~~

compilation terminated.

make: *** [Middlewares/STM32_USBD_Library/Core/subdir.mk:25: Middlewares/STM32_USBD_Library/Core/usbd_core.o] Error 1

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

make: *** [Middlewares/STM32_USBD_Library/Core/subdir.mk:27: Middlewares/STM32_USBD_Library/Core/usbd_ctlreq.o] Error 1

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

 

04:55:06 Build Failed. 5 errors, 0 warnings. (took 6s.538ms)

 

Hello @Rajam 

It's working with With STM32CubeH7 from this link.

As you downloaded the examples from Github, I think you forget to add --recursive option when you cloned the repository or you downloaded the project as zip file.

So to download the package, it's recommended:

-  As a zip file: you need to download  from this link.

- When cloning from Github: use --recusrive option.

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.