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


Problems to implement a stm32F3 library

Hi, I try to implement a static library to use the hal drivers.
I have generate a static lib with the firmware and the hal driver. If i build the lib all is running well.
Now i want to implement the lib within my project. Therefor i have a new project without firmware for the same target.
At eclipse i have a depend to the lib.
If i Build the project without the depend to the lib all is running well and i can run it at the Target and debug.
If i have the depend to the Lib i get the following build error.

/home/fritz/workspace/remodip/Debug/libremodip.a(hwinit.o): In function `hwinit’:
/home/fritz/workspace/remodip/Debug/../src/hwinit/hwinit.c:36: undefined reference to `HAL_Init’
makefile:53: die Regel für Ziel „HProto1.elf“ scheiterte
/home/fritz/workspace/remodip/Debug/../src/hwinit/hwinit.c:52: undefined reference to `HAL_GPIO_Init’
/home/fritz/workspace/remodip/Debug/libremodip.a(hwinit.o): In function `SystemClock_Config’:
/home/fritz/workspace/remodip/Debug/../src/hwinit/hwinit.c:82: undefined reference to `HAL_RCC_OscConfig’
/home/fritz/workspace/remodip/Debug/../src/hwinit/hwinit.c:94: undefined reference to `HAL_RCC_ClockConfig’
collect2: error: ld returned 1 exit status

hwinit is a little function to export from the lib.
Again the lib and the project alone i can build without any error. Togeter i have the error befor :-(

What do i wrong?

Thanks

Fritz

France

Hi Fritz,

Just create your project selecting the proper firmware library and selecting (in the Project Firmware configuration tab) As static external libraries and it should do the job automatically.

In your case, I suspect the generated library is incomplete; How did you create the library?

The library may build without any error, but some functions may be nevertheless be missing as final link edition phase, where undefined symbols became errors, is only done when building an executable.

Hope this helps

Bernard (Ac6)


Hi Bernard,
thank you for your reply.
Yor suggestion to create the project with firmware lib is running well. I had tryed it.

What i need is another lib with all the hardware inits and so on and one application without the firmware libs.
I have created the lib with eclipse -> new project -> static lib -> AC6 then the target config for nucleo F302R8 with firmware lib and hal driver
The app project is created with eclipse -> new project -> executable -> AC6 -> target config for F302R8 without any firmware.

I had a app project with Firmware there i can use my own lib. Only if i create the app project without firmwar i have this error.

Thats very strange :-)

Because you have any other suggestion?

Fritz


 

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