I am working on porting the MicroPython to the STM32G0B1 Nucleo64 board (now that we finally have a 512 KB flash ROM).
After several days, I have gotten stuck in the UART/USART module
Code: Select all
...
CC uart.c
arm-none-eabi-gcc -I. -I../.. -Ibuild-NUCLEO_G0B1RE -I../../lib/cmsis/inc -I../../lib/stm32lib/CMSIS/STM32G0xx/Include/ -I../../lib/stm32lib/STM32G0xx_HAL_Driver/Inc -Iusbdev/core/inc -Iusbdev/class/inc -Ilwip_inc -Wall -Wpointer-arith -Werror -Wdouble-promotion -Wfloat-conversion -std=gnu99 -nostdlib -DFFCONF_H=\"lib/oofatfs/ffconf.h\" -DMICROPY_VFS_FAT=1 -DSTM32G0B1xx -DUSE_FULL_LL_DRIVER -mthumb -msoft-float -mtune=cortex-m0plus -mcpu=cortex-m0plus -Os -DNDEBUG -Iboards/NUCLEO_G0B1RE -DSTM32_HAL_H='<stm32g0xx_hal.h>' -DMBOOT_VTOR=0x08000000 -DMICROPY_HW_VTOR=0x08000000 -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT -fsingle-precision-constant -fdata-sections -ffunction-sections -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool -DMICROPY_MODULE_FROZEN_MPY -DMICROPY_MODULE_FROZEN_STR -DMICROPY_ROM_TEXT_COMPRESSION=1 -c -MD -o build-NUCLEO_G0B1RE/uart.o uart.c
uart.c: In function 'uart_get_baudrate':
uart.c:895:16: error: implicit declaration of function 'LL_LPUART_GetBaudRate' [-Werror=implicit-function-declaration]
895 | return LL_LPUART_GetBaudRate(self->uartx, uart_get_source_freq(self)
| ^~~~~~~~~~~~~~~~~~~~~
uart.c:902:12: error: implicit declaration of function 'LL_USART_GetBaudRate'; did you mean 'HAL_USART_GetState'? [-Werror=implicit-function-declaration]
902 | return LL_USART_GetBaudRate(self->uartx, uart_get_source_freq(self),
| ^~~~~~~~~~~~~~~~~~~~
| HAL_USART_GetState
uart.c:906:9: error: 'LL_USART_OVERSAMPLING_16' undeclared (first use in this function); did you mean 'UART_OVERSAMPLING_16'?
906 | LL_USART_OVERSAMPLING_16);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| UART_OVERSAMPLING_16
...
I'm not sure I understand how these libraries are normally imported nor why it is failing for STM32 G0.
How can I get help?