Compare commits

..

No commits in common. "842b204d36843e09d9699f0cce80bddb6017fdbd" and "fbeaa916b9490d50b183b705786a6472acfc3b89" have entirely different histories.

11 changed files with 13 additions and 154 deletions

8
software/CMakeLists.txt Normal file
View File

@ -0,0 +1,8 @@
# Top-level CMakeLists.txt for the irrigation system project
cmake_minimum_required(VERSION 3.20)
# Add the subdirectories for the applications and libraries
add_subdirectory(apps/gateway)
add_subdirectory(apps/slave_node)
add_subdirectory(lib)

View File

@ -1,8 +1,5 @@
cmake_minimum_required(VERSION 3.20)
# Include the main 'software' directory as a module to find boards, libs, etc.
list(APPEND ZEPHYR_EXTRA_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/../..)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(gateway)

View File

@ -1,2 +1,3 @@
# Gateway Configuration
# Zephyr configuration for the Gateway
CONFIG_NETWORKING=y
CONFIG_NET_TCP=y

View File

@ -1,9 +1,5 @@
cmake_minimum_required(VERSION 3.20)
# Point BOARD_ROOT and DTS_ROOT to the 'software' directory, which contains 'boards'.
list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
list(APPEND DTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(slave_node)

View File

@ -1,7 +1,2 @@
# --- Base Slave Node Config ---
# Zephyr configuration for the Slave Node
CONFIG_GPIO=y
# Use RTT for console output instead of UART
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n

View File

@ -8,9 +8,6 @@
int main(void)
{
while (1) {
printk("Hello from Slave Node!\n");
k_msleep(1000);
}
printk("Hello from Slave Node!\n");
return 0;
}

View File

@ -1,5 +0,0 @@
# Copyright (c) 2025 Eduard Iten
# SPDX-License-Identifier: Apache-2.0
config BOARD_BLUEPILL_F103RB
select SOC_STM32F103XB

View File

@ -1,106 +0,0 @@
/*
* Copyright (c) 2025 Eduard Iten
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <st/f1/stm32f1.dtsi>
#include <st/f1/stm32f103Xb.dtsi>
#include <st/f1/stm32f103r(8-b)tx-pinctrl.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "Blue-Pill STM32F103RB";
compatible = "iten,bluepill-f103rb";
chosen {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
led_status: led_status {
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
label = "User LED";
};
};
aliases {
led0 = &led_status;
watchdog0 = &iwdg;
};
};
&clk_lsi {
status = "okay";
};
&clk_hse {
clock-frequency = <DT_FREQ_M(8)>;
status = "okay";
};
&pll {
mul = <9>;
clocks = <&clk_hse>;
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(72)>;
ahb-prescaler = <1>;
apb1-prescaler = <2>;
apb2-prescaler = <1>;
adc-prescaler = <6>;
};
&usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&iwdg {
status = "okay";
};
&clk_lsi {
status = "okay";
};
&clk_hse {
clock-frequency = <DT_FREQ_M(8)>;
status = "okay";
};
&pll {
mul = <9>;
clocks = <&clk_hse>;
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(72)>;
ahb-prescaler = <1>;
apb1-prescaler = <2>;
apb2-prescaler = <1>;
adc-prescaler = <6>;
};
&exti {
status = "okay";
};
&dma1 {
status = "okay";
};

View File

@ -1,4 +0,0 @@
# Copyright (c) 2025 Eduard Iten
# SPDX-License-Identifier: Apache-2.0
CONFIG_SERIAL=y
CONFIG_GPIO=y

View File

@ -1,12 +0,0 @@
# Copyright (c) 2025 Eduard Iten
# SPDX-License-Identifier: Apache-2.0
# keep first
board_runner_args(jlink "--device=STM32F103RB" "--speed=4000")
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
# keep first
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-stm32.board.cmake)
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)

View File

@ -1,8 +0,0 @@
# Copyright (c) 2025 Eduard Iten
# SPDX-License-Identifier: Apache-2.0
board:
name: bluepill_f103rb
vendor: iten
socs:
- name: stm32f103xb