Basic board setup
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
*~
|
||||||
1
CMakeLists.txt
Normal file
1
CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
2
boards/other/pico_stm32/Kconfig.pico_stm32
Normal file
2
boards/other/pico_stm32/Kconfig.pico_stm32
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
config BOARD_PICO_STM32
|
||||||
|
select SOC_STM32F103X8
|
||||||
4
boards/other/pico_stm32/board.cmake
Normal file
4
boards/other/pico_stm32/board.cmake
Normal 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)
|
||||||
7
boards/other/pico_stm32/board.yml
Normal file
7
boards/other/pico_stm32/board.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
board:
|
||||||
|
name: pico_stm32
|
||||||
|
full_name: Pico STM32
|
||||||
|
vendor: other
|
||||||
|
# stm32f103c8t6
|
||||||
|
socs:
|
||||||
|
- name: stm32f103xb
|
||||||
76
boards/other/pico_stm32/pico_stm32.dts
Normal file
76
boards/other/pico_stm32/pico_stm32.dts
Normal 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"; */
|
||||||
|
/* }; */
|
||||||
|
/* }; */
|
||||||
19
boards/other/pico_stm32/pico_stm32.yaml
Normal file
19
boards/other/pico_stm32/pico_stm32.yaml
Normal 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
|
||||||
13
boards/other/pico_stm32/pico_stm32_defconfig
Normal file
13
boards/other/pico_stm32/pico_stm32_defconfig
Normal 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
|
||||||
4
boards/other/pico_stm32/support/openocd.cfg
Normal file
4
boards/other/pico_stm32/support/openocd.cfg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
source [find interface/cmsis-dap.cfg]
|
||||||
|
transport select swd
|
||||||
|
|
||||||
|
source [find target/stm32f1x.cfg]
|
||||||
19
west.yml
Normal file
19
west.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
manifest:
|
||||||
|
remotes:
|
||||||
|
# Define the remote for the main Zephyr repository
|
||||||
|
- name: zephyrproject-rtos
|
||||||
|
url-base: https://github.com/zephyrproject-rtos
|
||||||
|
|
||||||
|
projects:
|
||||||
|
# 1. Main Zephyr repository (required)
|
||||||
|
- name: zephyr
|
||||||
|
remote: zephyrproject-rtos
|
||||||
|
revision: v4.2.0
|
||||||
|
|
||||||
|
# This section instructs west to only pull in the modules
|
||||||
|
# required for the stm32 HAL, significantly reducing the clone size.
|
||||||
|
import:
|
||||||
|
name-allowlist:
|
||||||
|
- cmsis_6
|
||||||
|
- hal_stm32
|
||||||
9
zephyr/module.yml
Normal file
9
zephyr/module.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
build:
|
||||||
|
# Path to the folder that contains the CMakeLists.txt file to be included by
|
||||||
|
# Zephyr build system. The `.` is the root of this repository.
|
||||||
|
cmake: .
|
||||||
|
settings:
|
||||||
|
# Additional roots for boards and DTS files. Zephyr will use the
|
||||||
|
# `<board_root>/boards` for additional boards. The `.` is the root of this
|
||||||
|
# repository.
|
||||||
|
board_root: .
|
||||||
Reference in New Issue
Block a user