I am designing a board with a STM32F412CE processor. The code compiles and links fine when targeted for a ZG version (which has NUCLEO support), but it fails to link when targeting the smaller package type.
The linker error is:
c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/…/lib/gcc/arm-none-eabi/8.3.1/…/…/…/…/arm-none-eabi/bin/ld.exe: BUILD/MYBOARD/GCC_ARM-DEBUG-BUILD/mbed-os/targets/TARGET_STM/serial_api.o: in function
_serial_init_direct': mbed-os\targets\TARGET_STM/serial_api.c:79: undefined reference to __HAL_RCC_USART3_CLK_ENABLE’
collect2.exe: error: ld returned 1 exit status
This error originates in ‘stm32f4xx_hal_rcc_ex.h’ where USART3 is only included for the Z, V and R package variants of the F412 although the datasheet says that the C package does support USART3 (if only for Tx).