# FreeRTOS newbie - STM32F103 + libopenCM3 + build errors

**URL:** <https://forums.freertos.org/t/freertos-newbie-stm32f103-libopencm3-build-errors/12848>\
**Category:** Kernel\
**Created:** [June 14, 2021, 9:21pm UTC](https://forums.freertos.org/t/freertos-newbie-stm32f103-libopencm3-build-errors/12848 "2021-06-14T21:21:11Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![jefftenney](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/jefftenney/32/1314_2.png) [@jefftenney](https://forums.freertos.org/u/jefftenney)\
**Post date:** [June 16, 2021, 2:34am UTC](https://forums.freertos.org/t/freertos-newbie-stm32f103-libopencm3-build-errors/12848/7 "2021-06-16T02:34:21Z")

</div>

Thanks for reporting back. In your case, the definition of `configSYSTICK_CLOCK_HZ` is optional, so I can’t understand how defining it fixed the issues you were having. When you define that symbol, FreeRTOS configures the SysTick [a little differently](https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/9e85006fc95726948f0a45a4339553c5ec0f3a01/portable/GCC/ARM_CM3/port.c#L44), but that shouldn’t have impacted anything of any consequence in your case.

Also it’s best to avoid that file you mentioned, [opencm3.c](https://github.com/Apress/Beg-STM32-Devel-FreeRTOS-libopencm3-GCC/blob/e6f6e5b2f2813bf3e48d68a601ce439b126df256/rtos/src/opencm3.c). The PendSV handler is intended to _be_ the ISR, not to be called from the ISR. If the PendSV handler is called from the ISR, and if the ISR uses stack, the PendSV handler can’t do its job properly. The proper alternative to opencm3.c is the three #define statements you mentioned earlier that put the FreeRTOS handlers directly into the vector table.

---

_[View the full topic](https://forums.freertos.org/t/freertos-newbie-stm32f103-libopencm3-build-errors/12848)._
