error: 'USART_CR1_OVER8' undeclared Topic is solved
Posted: Sat Jun 09, 2018 5:45 am
by Spider
Hello!
Today I'am hase added ChibiOS as submodule to my project git. Aftre trying to rebuild from "clean" state i received error:
error: 'USART_CR1_OVER8' undeclared ► Show Spoiler
Code: Select all
Compiling board.c
../ChibiOS/os/hal/ports/STM32/LLD/USARTv1/hal_serial_lld.c: In function 'usart_init':
../ChibiOS/os/hal/ports/STM32/LLD/USARTv1/hal_serial_lld.c:118:21: error: 'USART_CR1_OVER8' undeclared (first use in this function)
if (config->cr1 & USART_CR1_OVER8)
^~~~~~~~~~~~~~~
../ChibiOS/os/hal/ports/STM32/LLD/USARTv1/hal_serial_lld.c:118:21: note: each undeclared identifier is reported only once for each function it appears in
make: *** [build/obj/hal_serial_lld.o] Error 1
make: *** Waiting for unfinished jobs....
../ChibiOS/os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c: In function 'usart_start':
../ChibiOS/os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c:219:28: error: 'USART_CR1_OVER8' undeclared (first use in this function)
if (uartp->config->cr1 & USART_CR1_OVER8)
^~~~~~~~~~~~~~~
../ChibiOS/os/hal/ports/STM32/LLD/USARTv1/hal_uart_lld.c:219:28: note: each undeclared identifier is reported only once for each function it appears in
make: *** [build/obj/hal_uart_lld.o] Error 1
this error received when trying to build any Demo project for STM32F103 cpu. with ChibiOS branch
stable_17.6.x
Re: error: 'USART_CR1_OVER8' undeclared
Posted: Sat Jun 09, 2018 6:26 pm
by Giovanni
Hi,
I added a check on the presence of that definition, should be fine now.
Giovanni