Basic board setup

This commit is contained in:
2025-09-26 17:43:57 +02:00
commit 60ecea6f39
11 changed files with 156 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
config BOARD_PICO_STM32
select SOC_STM32F103X8

View File

@@ -0,0 +1,4 @@
board_runner_args(pyocd "--target=stm32f103c8")
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-stm32.board.cmake)

View File

@@ -0,0 +1,7 @@
board:
name: pico_stm32
full_name: Pico STM32
vendor: other
# stm32f103c8t6
socs:
- name: stm32f103xb

View File

@@ -0,0 +1,76 @@
/dts-v1/;
#include <st/f1/stm32f103X8.dtsi>
#include <st/f1/stm32f103c(8-b)tx-pinctrl.dtsi>
/ {
model = "Pico STM32 board";
compatible = "other,pico-stm32";
chosen {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds: leds {
compatible = "gpio-leds";
green_led: led_2 {
gpios = <&gpioa 8 GPIO_ACTIVE_HIGH>;
label = "PA8";
};
};
aliases {
led0 = &green_led;
die-temp0 = &die_temp;
};
};
&clk_lsi {
status = "okay";
};
&clk_hse {
clock-frequency = <DT_FREQ_M(16)>; /* 16 MHz quartz */
status = "okay";
};
&pll {
mul = <9>;
clocks = <&clk_hse>;
xtpre;
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(72)>;
ahb-prescaler = <1>;
apb1-prescaler = <2>;
apb2-prescaler = <1>;
adc-prescaler = <2>;
};
&usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&die_temp {
status = "okay";
};
/* zephyr_udc0: &usb { */
/* pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; */
/* pinctrl-names = "default"; */
/* status = "okay"; */
/* cdc_acm_uart0: cdc_acm_uart0 { */
/* compatible = "zephyr,cdc-acm-uart"; */
/* }; */
/* }; */

View File

@@ -0,0 +1,19 @@
identifier: pico_stm32
name: Pico STM32
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
ram: 20
flash: 128
supported:
- gpio
- spi
- pwm
- watchdog
- adc
- dma
- nvs
- counter
vendor: other

View File

@@ -0,0 +1,13 @@
# enable uart driver
CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# enable GPIO
CONFIG_GPIO=y
# USB console
#CONFIG_USB_DEVICE_STACK=y
#CONFIG_USB_CDC_ACM=y
#CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y

View File

@@ -0,0 +1,4 @@
source [find interface/cmsis-dap.cfg]
transport select swd
source [find target/stm32f1x.cfg]