Re: Using printk on an STM32F103C8 board


Adam Podogrocki
 

Hi Scott,

if you are using board configuration file purposed for Nucleo F103RB, then the default UART configuration refers to UART2, pins TX=A2, RX=PA3. Pins configuration can be found in drivers/pinmux/stm32/pinmux_board_nucleo_f103rb.c.

If you would like to use UART1, then in menuconfig you have to modify settings for Serial drivers & Console drivers to match the desired UART port and baud rate.

Compile errors point out that the UART1 configuration is missing.

Please also take a look at e.g "dts/arm/nucleo_l476rg.fixup" file and do appropriate amendments in nucleo f103rb corresponding file.

Cheers,
Adam

On 21 May 2017 at 23:54, Scott Nelson <scott@...> wrote:
I’m trying to get Zephyr running on an STM32F103C8 "blue pill" board by using the similar nucleo_f103rb board config (with which I can successfully get an LED to blink).  I’m trying to setup printk by enabling CONFIG_UART_STM32_PORT_1=y (TX=PA9, RX=PA10) but I get the following compile errors: https://pastebin.com/raaww0a8

Am I missing additional config?

I was also planning on setting CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_1" and CONFIG_PRINTK=y in hopes of being able to read printk messages via a USB-to-serial adapter.

-Scott
_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users

Join users@lists.zephyrproject.org to automatically receive all group messages.