initial commit

This commit is contained in:
xlemmingx 2025-05-22 12:46:26 +02:00
commit bbedb8d0fd
19 changed files with 770 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch

10
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

View File

@ -0,0 +1,43 @@
{
"build": {
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32WL -DSTM32WLxx -DSTM32WLE5xx",
"f_cpu": "48000000L",
"framework_extra_flags": {
"arduino": "-DUSE_CM4_STARTUP_FILE"
},
"mcu": "stm32wl55jc",
"product_line": "STM32WL55xx",
"variant": "STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I"
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32WL55JC",
"onboard_tools": [
"stlink"
],
"openocd_target": "stm32wlx",
"svd_path": "STM32WL5x_CM4.svd"
},
"frameworks": [
"arduino",
"zephyr"
],
"name": "G2H LoraWAN Heat Control",
"upload": {
"maximum_ram_size": 65536,
"maximum_size": 262144,
"protocol": "stlink",
"protocols": [
"jlink",
"cmsis-dap",
"stlink",
"mbed"
]
},
"url": "https://www.st.com/en/evaluation-tools/nucleo-wl55jc.html",
"vendor": "ST"
}

37
include/README Normal file
View File

@ -0,0 +1,37 @@
This directory is intended for project header files.
A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.
```src/main.c
#include "header.h"
int main (void)
{
...
}
```
Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.
In C, the convention is to give header files names that end with `.h'.
Read more about using header files in official GCC documentation:
* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html

46
lib/README Normal file
View File

@ -0,0 +1,46 @@
This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into the executable file.
The source code of each library should be placed in a separate directory
("lib/your_library_name/[Code]").
For example, see the structure of the following example libraries `Foo` and `Bar`:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
Example contents of `src/main.c` using Foo and Bar:
```
#include <Foo.h>
#include <Bar.h>
int main (void)
{
...
}
```
The PlatformIO Library Dependency Finder will find automatically dependent
libraries by scanning project source files.
More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html

14
platformio.ini Normal file
View File

@ -0,0 +1,14 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:g2h_lorawan_heat_control]
platform = ststm32
board = g2h_lorawan_heat_control
framework = zephyr

203
src/main.c Normal file
View File

@ -0,0 +1,203 @@
/*
* Class A LoRaWAN sample application
*
* Copyright (c) 2020 Manivannan Sadhasivam <mani@kernel.org>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/lorawan/lorawan.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/sensor/sht4x.h>
/* Customize based on network configuration */
#define LORAWAN_DEV_EUI { 0x2D, 0xBF, 0xF6, 0xC2, 0xA1, 0x20,\
0x01, 0x4A }
#define LORAWAN_JOIN_EUI { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
0x00, 0x00 }
/* #define LORAWAN_APP_KEY { 0x71, 0x5A, 0x39, 0xB2, 0x86, 0xC3,\
0x37, 0xA3, 0xC4, 0xF0, 0x78, 0xF9,\
0x0F, 0x33, 0x07, 0x7D } */
#define LORAWAN_APP_KEY { 0x71, 0x5A, 0x39, 0xB2, 0x86, 0xC3,\
0x37, 0xA3, 0xC4, 0xF0, 0x78, 0xF9,\
0x0F, 0x33, 0x07, 0x7D }
#define DELAY K_MSEC(10000)
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(lorawan_class_a);
char data[] = {'h', 'e', 'l', 'l', 'o', 'w', 'o', 'r', 'l', 'd'};
static void dl_callback(uint8_t port, uint8_t flags, int16_t rssi, int8_t snr, uint8_t len,
const uint8_t *hex_data)
{
LOG_INF("Port %d, Pending %d, RSSI %ddB, SNR %ddBm, Time %d", port,
flags & LORAWAN_DATA_PENDING, rssi, snr, !!(flags & LORAWAN_TIME_UPDATED));
if (hex_data) {
LOG_HEXDUMP_INF(hex_data, len, "Payload: ");
}
}
static void lorwan_datarate_changed(enum lorawan_datarate dr)
{
uint8_t unused, max_size;
lorawan_get_payload_sizes(&unused, &max_size);
LOG_INF("New Datarate: DR_%d, Max Payload %d", dr, max_size);
}
/* MAIN */
int main(void)
{
// MLX90614 Example Fetch
const struct device *i2c_dev = DEVICE_DT_GET(DT_NODELABEL(i2c1));
uint8_t reg_addr;
uint8_t read_data[3];
if (!i2c_dev) {
printk("I2C device not found\n");
return;
}
reg_addr = 0x06;
if (i2c_write_read(i2c_dev, 0x5A, &reg_addr, sizeof(reg_addr), &read_data, sizeof(read_data)) < 0)
{
printk("Failed to write to I2C device\n");
}
int16_t temperature = (read_data[1] << 8) | read_data[0]; // Temperaturwert aus den empfangenen Daten
float temp_celsius = temperature * 0.02 - 273.15; // Umrechnung in Celsius
printf("Temperatur Sensor: %.2f °C\n", temp_celsius);
reg_addr = 0x07;
if (i2c_write_read(i2c_dev, 0x5A, &reg_addr, sizeof(reg_addr), &read_data, sizeof(read_data)) < 0)
{
printk("Failed to write to I2C device\n");
}
// Temperaturdaten verarbeiten
temperature = (read_data[1] << 8) | read_data[0]; // Temperaturwert aus den empfangenen Daten
temp_celsius = temperature * 0.02 - 273.15; // Umrechnung in Celsius
printf("Temperatur IR: %.2f °C\n", temp_celsius);
return 0;
/*
// SHT4X Example Fetch
if(!DT_HAS_COMPAT_STATUS_OKAY(sensirion_sht4x)) {
printf("No sensirion,sht4x compatible node found in the device tree");
}
const struct device *const sht = DEVICE_DT_GET_ANY(sensirion_sht4x);
struct sensor_value temp, hum;
if (!device_is_ready(sht)) {
printf("SHT4X-Device %s is not ready.\n", sht->name);
return 0;
}
while (true) {
if (sensor_sample_fetch(sht)) {
printf("Failed to fetch sample from SHT4X device\n");
return 0;
}
sensor_channel_get(sht, SENSOR_CHAN_AMBIENT_TEMP, &temp);
sensor_channel_get(sht, SENSOR_CHAN_HUMIDITY, &hum);
printf("SHT4X: %.2f Temp. [C] ; %0.2f RH [%%]\n",
sensor_value_to_double(&temp),
sensor_value_to_double(&hum));
k_sleep(K_MSEC(5000));
}
*/
const struct device *lora_dev;
struct lorawan_join_config join_cfg;
uint8_t dev_eui[] = LORAWAN_DEV_EUI;
uint8_t join_eui[] = LORAWAN_JOIN_EUI;
uint8_t app_key[] = LORAWAN_APP_KEY;
int ret;
struct lorawan_downlink_cb downlink_cb = {
.port = LW_RECV_PORT_ANY,
.cb = dl_callback
};
lora_dev = DEVICE_DT_GET(DT_ALIAS(lora0));
if (!device_is_ready(lora_dev)) {
LOG_ERR("%s: device not ready.", lora_dev->name);
return 0;
}
ret = lorawan_start();
if (ret < 0) {
LOG_ERR("lorawan_start failed: %d", ret);
return 0;
} else {
LOG_INF("LoraWan started successfully");
}
lorawan_register_downlink_callback(&downlink_cb);
lorawan_register_dr_changed_callback(lorwan_datarate_changed);
join_cfg.mode = LORAWAN_ACT_OTAA;
join_cfg.dev_eui = dev_eui;
join_cfg.otaa.join_eui = join_eui;
join_cfg.otaa.app_key = app_key;
join_cfg.otaa.nwk_key = app_key;
join_cfg.otaa.dev_nonce = 14u;
// TODO: Repeat until success
LOG_INF("Joining network over OTAA");
ret = lorawan_join(&join_cfg);
if (ret < 0) {
LOG_ERR("lorawan_join_network failed: %d", ret);
return 0;
}
LOG_INF("Sending data...");
while (1) {
ret = lorawan_send(2, data, sizeof(data),
LORAWAN_MSG_CONFIRMED);
/*
* Note: The stack may return -EAGAIN if the provided data
* length exceeds the maximum possible one for the region and
* datarate. But since we are just sending the same data here,
* we'll just continue.
*/
if (ret == -EAGAIN) {
LOG_ERR("lorawan_send failed: %d. Continuing...", ret);
k_sleep(DELAY);
continue;
}
if (ret < 0) {
LOG_ERR("lorawan_send failed: %d", ret);
k_sleep(DELAY);
continue;
} else {
LOG_INF("Data sent!");
}
k_sleep(DELAY);
}
}

11
test/README Normal file
View File

@ -0,0 +1,11 @@
This directory is intended for PlatformIO Test Runner and project tests.
Unit Testing is a software testing method by which individual units of
source code, sets of one or more MCU program modules together with associated
control data, usage procedures, and operating procedures, are tested to
determine whether they are fit for use. Unit testing finds problems early
in the development cycle.
More information about PlatformIO Unit Testing:
- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html

9
zephyr/CMakeLists.txt Normal file
View File

@ -0,0 +1,9 @@
# Path to out-of-tree boards definitions
set (BOARD_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(embedded_raumsenor_lorawan)
FILE(GLOB app_sources ../src/*.c*)
target_sources(app PRIVATE ${app_sources})

View File

@ -0,0 +1,5 @@
# Copyright (c) 2020 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0
config BOARD_G2H_LORAWAN_HEAT_CONTROL
select SOC_STM32WL55XX

View File

@ -0,0 +1,40 @@
/*
* Copyright (c) 2020 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
arduino_header: connector {
compatible = "arduino-header-r3";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpiob 1 0>, /* A0 */
<1 0 &gpiob 2 0>, /* A1 */
<2 0 &gpioa 10 0>, /* A2 */
<3 0 &gpiob 4 0>, /* A3 */
<4 0 &gpiob 14 0>, /* A4 */
<5 0 &gpiob 13 0>, /* A5 */
<6 0 &gpiob 7 0>, /* D0 */
<7 0 &gpiob 6 0>, /* D1 */
<8 0 &gpiob 12 0>, /* D2 */
<9 0 &gpiob 3 0>, /* D3 */
<10 0 &gpiob 5 0>, /* D4 */
<11 0 &gpiob 8 0>, /* D5 */
<12 0 &gpiob 10 0>, /* D6 */
<13 0 &gpioc 1 0>, /* D7 */
<14 0 &gpioc 2 0>, /* D8 */
<15 0 &gpioa 9 0>, /* D9 */
<16 0 &gpioa 4 0>, /* D10 */
<17 0 &gpioa 7 0>, /* D11 */
<18 0 &gpioa 6 0>, /* D12 */
<19 0 &gpioa 5 0>, /* D13 */
<20 0 &gpiob 11 0>, /* D14 */
<21 0 &gpiob 12 0>; /* D15 */
};
};
arduino_serial: &usart1 {};
arduino_i2c: &i2c2 {};
arduino_spi: &spi1 {};

View File

@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
# keep first
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
# keep first
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

View File

@ -0,0 +1,6 @@
board:
name: g2h_lorawan_heat_control
full_name: G2H LoraWAN Heat Control
vendor: st
socs:
- name: stm32wl55xx

View File

@ -0,0 +1,211 @@
/*
* Copyright (c) 2020-2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <st/wl/stm32wl55Xc.dtsi>
#include <st/wl/stm32wl55jcix-pinctrl.dtsi>
#include "arduino_r3_connector.dtsi"
#include "st_morpho_connector.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "G2H LoraWAN Heat control based on STM32WL55JC-NUCLEO";
compatible = "st,stm32wl55-nucleo,g2h_lorawan_heat_control";
chosen {
zephyr,console = &lpuart1;
zephyr,shell-uart = &lpuart1;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
aliases {
lora0 = &lora;
watchdog0 = &iwdg;
die-temp0 = &die_temp;
};
};
&clk_lsi {
status = "okay";
};
stm32_lp_tick_source: &lptim1 {
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>,
<&rcc STM32_SRC_LSI LPTIM1_SEL(1)>;
status = "okay";
};
&clk_hsi {
status = "okay";
};
&clk_lse {
status = "okay";
};
&pll {
div-m = <1>;
mul-n = <6>;
div-r = <2>;
div-q = <2>;
clocks = <&clk_hsi>;
status = "okay";
};
&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(48)>;
cpu1-prescaler = <1>;
cpu2-prescaler = <1>;
ahb3-prescaler = <1>;
apb1-prescaler = <1>;
apb2-prescaler = <1>;
};
&lpuart1 {
pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
&i2c1 {
status = "okay";
pinctrl-0 = <&i2c1_scl_pa9 &i2c1_sda_pa10>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
sht4x: sht4x@44 {
status = "okay";
compatible = "sensirion,sht4x";
label = "SHT4X Integrated Temp Sensor";
reg = <0x44>;
repeatability = <2>;
};
mlx90614: mlx90614@5A {
status = "okay";
compatible = "melexis,mlx90614";
label = "MLX90614 Infrared Temp Sensor";
reg = <0x5A>;
};
};
&spi1 {
pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5
&spi1_miso_pa6 &spi1_mosi_pa7>;
pinctrl-names = "default";
status = "okay";
};
&dac1 {
pinctrl-0 = <&dac_out1_pa10>;
pinctrl-names = "default";
status = "okay";
};
&timers2 {
status = "okay";
pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch4_pb11>;
pinctrl-names = "default";
};
};
&adc1 {
pinctrl-0 = <&adc_in5_pb1 &adc_in0_pb13>;
pinctrl-names = "default";
st,adc-clock-source = "SYNC";
st,adc-prescaler = <4>;
status = "okay";
};
&die_temp {
status = "okay";
};
&aes {
status = "okay";
};
&rng {
status = "okay";
};
&iwdg {
status = "okay";
};
&subghzspi {
status = "okay";
lora: radio@0 {
status = "okay";
tx-enable-gpios = <&gpioc 4 GPIO_ACTIVE_LOW>; /* FE_CTRL1 */
rx-enable-gpios = <&gpioc 5 GPIO_ACTIVE_LOW>; /* FE_CTRL2 */
dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V7>;
tcxo-power-startup-delay-ms = <5>;
/* High-power output is selected as a consequence of using
* tx/rx-enable-gpio to control FE_CTRL1 and FE_CTRL2. Low-power
* output would require both FE_CTRL1 and FE_CTRL2 to be high,
* which is not currently supported by the driver.
*/
power-amplifier-output = "rfo-hp";
rfo-lp-max-power = <15>;
rfo-hp-max-power = <22>;
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(32)>;
read-only;
};
slot0_partition: partition@8000 {
label = "image-0";
reg = <0x00008000 DT_SIZE_K(104)>;
};
slot1_partition: partition@22000 {
label = "image-1";
reg = <0x00022000 DT_SIZE_K(104)>;
};
/*
* Set 16kB of storage (8x2kB pages) at the end of the 256kB of
* flash.
*/
storage_partition: partition@3c000 {
label = "storage";
reg = <0x0003c000 DT_SIZE_K(16)>;
};
};
};
&rtc {
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00000400>,
<&rcc STM32_SRC_LSE RTC_SEL(1)>;
status = "okay";
};
&vref {
status = "okay";
};
&vbat {
status = "okay";
};

View File

@ -0,0 +1,26 @@
identifier: g2h_lorawan_heat_control
name: G2H LoraWAN Heat Control
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
ram: 64
flash: 256
supported:
- gpio
- i2c
- spi
- arduino_gpio
- arduino_i2c
- arduino_spi
- adc
- dac
- pwm
- counter
- dma
- watchdog
- nvs
- lora
- rtc
vendor: st

View File

@ -0,0 +1,15 @@
# enable uart driver
CONFIG_SERIAL=y
# enable GPIO
CONFIG_GPIO=y
# console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# Enable MPU
CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

View File

@ -0,0 +1,58 @@
/*
* Copyright (c) 2023 Marcin Niestroj
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/gpio/st-morpho-header.h>
/ {
st_morpho_header: st-morpho-header {
compatible = "st-morpho-header";
#gpio-cells = <2>;
gpio-map-mask = <ST_MORPHO_PIN_MASK 0x0>;
gpio-map-pass-thru = <0x0 GPIO_DT_FLAGS_MASK>;
gpio-map = <ST_MORPHO_L_7 0 &gpioh 3 0>,
<ST_MORPHO_L_13 0 &gpioa 13 0>, /* shared with SWD connected to STLINK */
<ST_MORPHO_L_15 0 &gpioa 14 0>, /* shared with SWD connected to STLINK */
<ST_MORPHO_L_17 0 &gpioa 15 0>,
<ST_MORPHO_L_23 0 &gpioc 13 0>,
<ST_MORPHO_L_25 0 &gpioc 14 0>,
<ST_MORPHO_L_27 0 &gpioc 15 0>,
<ST_MORPHO_L_28 0 &gpiob 1 0>,
<ST_MORPHO_L_30 0 &gpiob 2 0>,
<ST_MORPHO_L_32 0 &gpioa 10 0>,
<ST_MORPHO_L_34 0 &gpiob 4 0>,
<ST_MORPHO_L_36 0 &gpiob 14 0>,
<ST_MORPHO_L_38 0 &gpiob 13 0>,
<ST_MORPHO_R_1 0 &gpioa 0 0>,
<ST_MORPHO_R_2 0 &gpioc 4 0>,
<ST_MORPHO_R_3 0 &gpioa 12 0>,
<ST_MORPHO_R_4 0 &gpioc 5 0>,
<ST_MORPHO_R_5 0 &gpioa 11 0>,
<ST_MORPHO_R_11 0 &gpioa 5 0>,
<ST_MORPHO_R_12 0 &gpioc 6 0>,
<ST_MORPHO_R_13 0 &gpioa 6 0>,
<ST_MORPHO_R_14 0 &gpioc 0 0>,
<ST_MORPHO_R_15 0 &gpioa 7 0>,
<ST_MORPHO_R_16 0 &gpioa 8 0>,
<ST_MORPHO_R_17 0 &gpioa 4 0>,
<ST_MORPHO_R_19 0 &gpioa 9 0>,
<ST_MORPHO_R_21 0 &gpioc 2 0>,
<ST_MORPHO_R_22 0 &gpiob 0 0>,
<ST_MORPHO_R_23 0 &gpioc 1 0>,
<ST_MORPHO_R_25 0 &gpiob 10 0>,
<ST_MORPHO_R_26 0 &gpiob 9 0>,
<ST_MORPHO_R_27 0 &gpiob 8 0>,
<ST_MORPHO_R_28 0 &gpiob 15 0>,
<ST_MORPHO_R_29 0 &gpiob 5 0>,
<ST_MORPHO_R_30 0 &gpiob 11 0>,
<ST_MORPHO_R_31 0 &gpiob 3 0>,
<ST_MORPHO_R_33 0 &gpiob 12 0>,
<ST_MORPHO_R_35 0 &gpiob 6 0>, /* SB7=ON, SB2=OFF, SB6=OFF */
<ST_MORPHO_R_36 0 &gpioa 1 0>,
<ST_MORPHO_R_37 0 &gpiob 7 0>, /* SB9=ON, SB4=OFF, SB10=OFF */
<ST_MORPHO_R_38 0 &gpioc 3 0>;
};
};

View File

@ -0,0 +1,11 @@
source [find interface/stlink.cfg]
transport select hla_swd
source [find target/stm32wlx.cfg]
# Debug compatible reset configuration (default)
reset_config srst_only srst_nogate
# Sleep mode compatible reset configuration (stock firmware compatible)
# reset_config srst_only srst_nogate connect_assert_srst

12
zephyr/prj.conf Normal file
View File

@ -0,0 +1,12 @@
CONFIG_LOG=y
CONFIG_SENSOR=y
CONFIG_I2C=y
CONFIG_SHT4X=y
CONFIG_LORA=y
CONFIG_LORAWAN=y
CONFIG_LORAMAC_REGION_EU868=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y