Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Error Undefined reference .c hal driver file seems missing - How to add it

To develop my application, I have to use some USD device audio application examples developped for one of the stm32F4 Eval boards, and adapt that example to my STM32F4_dicovery. I have issues to adapt the different path from one project exemple to another project.

In the attached picture is the summary.
Error:
undefined reference to `HAL_PCDEx_SetRxFiFo’ usbd_conf.c /STM324xG-EVAL_USBD-FS/Application/User line 363 C/C++ Problem

I followed the cascade of includes and it seems OK, but stm32f4xx_hal_pcd_ex.c does not appear in the Project>Drivers>STM32F4xx_HaL_Driver folder. A lot of stm32f4xx_hal_xxx.c are here, but the one I need seems to be missing.

So the path seems OK as I have the majority of the hal source files, but a specific one that I need is missing.

On the project STM324x9I-EVAL_USBD-FS, compiles, and stm32f4xx_hal_pcd_ex.c does appear in the Project>Drivers>STM32F4xx_HAL_Driver folder.

How to correct this? I have not found where/how the folders Driver>BSP, CMSIS and STM32F4xx_HAL_Driver are defined (in project properties ?), and how it can happen that for a project, not all .c files from the folder may be listed.

I blocked all the day on this, spending a lot of time trying things, but nothing worked. Help would be much appreciated.

Best regards,

JMF

After looking some more to the .project of working and non working projects, I finally manually created a “Linked file” in the Project>Drivers>STM32F4xx_HaL_Driver folder pointing to stm32f4xx_hal_pcd_ex.c

It works.

It is not clear to me yet how are defined/implemented the project drivers folder in the different Cube projects. I had made the assumptions that all hal files would appear in all folders. But this seems wrong...

JMF


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs