Compare commits
2 Commits
2a2890b675
...
5208f1370d
| Author | SHA1 | Date |
|---|---|---|
|
|
5208f1370d | |
|
|
a59e8518cc |
|
|
@ -5,4 +5,4 @@ project(software)
|
|||
add_subdirectory(modules/modbus_server)
|
||||
add_subdirectory(modules/valve)
|
||||
add_subdirectory(modules/fwu)
|
||||
add_subdirectory(apps/hello_world)
|
||||
add_subdirectory(apps/stm32g431_tests)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# Disable UART console
|
||||
CONFIG_UART_CONSOLE=n
|
||||
|
||||
# Enable RTT console
|
||||
CONFIG_RTT_CONSOLE=y
|
||||
CONFIG_USE_SEGGER_RTT=y
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
&usart1 {
|
||||
modbus0 {
|
||||
compatible = "zephyr,modbus-serial";
|
||||
status = "okay";
|
||||
};
|
||||
status = "okay";
|
||||
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
|
@ -2,13 +2,6 @@
|
|||
CONFIG_CONSOLE=y
|
||||
CONFIG_LOG=y
|
||||
|
||||
# Disable UART console
|
||||
CONFIG_UART_CONSOLE=n
|
||||
|
||||
# Enable RTT console
|
||||
CONFIG_RTT_CONSOLE=y
|
||||
CONFIG_USE_SEGGER_RTT=y
|
||||
|
||||
# Enable Shell
|
||||
CONFIG_SHELL=y
|
||||
CONFIG_SHELL_BACKEND_RTT=y
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(stm32g431_tests)
|
||||
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_LOG=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/sys/printk.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printk("Hello World! %s\n", CONFIG_BOARD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue