Skip to content

Commit

Permalink
Upgrade to Zephyr v3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjaeger committed Dec 12, 2023
1 parent 9d89036 commit 8268435
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 32 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ jobs:
- name: Run sample build tests
working-directory: thingset-zephyr-sdk
run: |
west build -p -b olimex_lora_stm32wl_devkit samples/counter -- -DOVERLAY_CONFIG=lorawan.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b esp32c3_devkitm samples/counter -- -DOVERLAY_CONFIG=ble.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b esp32c3_devkitm samples/counter -- -DOVERLAY_CONFIG=wifi_websocket.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b olimex_lora_stm32wl_devkit samples/counter -- -DEXTRA_CONF_FILE=lorawan.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b esp32c3_devkitm samples/counter -- -DEXTRA_CONF_FILE=ble.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b esp32c3_devkitm samples/counter -- -DEXTRA_CONF_FILE=wifi_websocket.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b nucleo_l073rz samples/counter -- -DOVERLAY_CONFIG=serial.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b nucleo_l073rz samples/counter -- -DOVERLAY_CONFIG=storage_eeprom.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DOVERLAY_CONFIG=auth.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DOVERLAY_CONFIG=can.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DOVERLAY_CONFIG=log_backend.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DOVERLAY_CONFIG=native_websocket.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b nucleo_l073rz samples/counter -- -DEXTRA_CONF_FILE=serial.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b nucleo_l073rz samples/counter -- -DEXTRA_CONF_FILE=storage_eeprom.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DEXTRA_CONF_FILE=auth.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DEXTRA_CONF_FILE=can.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DEXTRA_CONF_FILE=log_backend.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_posix samples/counter -- -DEXTRA_CONF_FILE=native_websocket.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b xiao_esp32c3 samples/serial_ble_gateway -- -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
- name: Run unit tests
Expand Down
1 change: 1 addition & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ endmenu # General Publication Settings
config THINGSET_GENERATE_NODE_ID
bool "Automatically generate node ID"
select HWINFO
select CRC
default y

config THINGSET_NODE_NAME
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ west build -b native_posix samples/counter -t run
## Testing with LoRaWAN

```
west build -b olimex_lora_stm32wl_devkit samples/counter -- -DOVERLAY_CONFIG=lorawan.conf
west build -b olimex_lora_stm32wl_devkit samples/counter -- -DEXTRA_CONF_FILE=lorawan.conf
```

## Testing with CAN bus

```
west build -b native_posix samples/counter -t run -- -DOVERLAY_CONFIG=can.conf
west build -b native_posix samples/counter -t run -- -DEXTRA_CONF_FILE=can.conf
```

## Testing WebSocket with native_posix
Expand All @@ -41,7 +41,7 @@ sudo iptables -A FORWARD -i zeth -o wifi0 -j ACCEPT
Afterwards run the nativ_posix board with websocket support from another shell:

```
west build -b native_posix samples/counter -- -DOVERLAY_CONFIG="native_websocket.conf storage_flash.conf"
west build -b native_posix samples/counter -- -DEXTRA_CONF_FILE="native_websocket.conf storage_flash.conf"
./build/zephyr/zephyr.exe -flash=samples/counter/virtual-flash.bin
```

Expand Down
4 changes: 0 additions & 4 deletions samples/counter/wifi_websocket.conf
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ CONFIG_NET_L2_ETHERNET=y

CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4=y

# WiFi driver does not seem to work with picolibc and newlib-nano
CONFIG_PICOLIBC=n
CONFIG_NEWLIB_LIBC=y

CONFIG_THINGSET_WIFI=y

# HTTP & Websocket
Expand Down
2 changes: 0 additions & 2 deletions samples/serial_ble_gateway/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ CONFIG_CBPRINTF_FP_SUPPORT=y

CONFIG_LOG=y

CONFIG_PICOLIBC=y

# ThingSet library
CONFIG_THINGSET=y

Expand Down
12 changes: 4 additions & 8 deletions src/can.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/net/buf.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>

#include <thingset.h>
#include <thingset/can.h>
Expand Down Expand Up @@ -671,13 +671,9 @@ int thingset_can_init_inst(struct thingset_can *ts_can, const struct device *can
#endif

#ifndef CONFIG_ISOTP_FAST
ts_can->rx_addr.ide = 1;
ts_can->rx_addr.use_ext_addr = 0; /* Normal ISO-TP addressing (using only CAN ID) */
ts_can->rx_addr.use_fixed_addr = 1; /* enable SAE J1939 compatible addressing */

ts_can->tx_addr.ide = 1;
ts_can->tx_addr.use_ext_addr = 0;
ts_can->tx_addr.use_fixed_addr = 1;
/* ISO-TP fixed addressing with SAE J1939 compatible ID */
ts_can->rx_addr.flags = ISOTP_MSG_IDE | ISOTP_MSG_FIXED_ADDR;
ts_can->tx_addr.flags = ISOTP_MSG_IDE | ISOTP_MSG_FIXED_ADDR;
#endif

struct can_filter addr_discovery_filter = {
Expand Down
2 changes: 1 addition & 1 deletion src/log_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void process(const struct log_backend *const backend, union log_msg_gener
snprintf(log_module, sizeof(log_module), "%s", sname);

/* HEXDUMPs are ignored and the log messages should be extracted w/o line ending */
log_output_process(&log_output_thingset, 0, NULL, NULL, log_level, package, NULL, 0,
log_output_process(&log_output_thingset, 0, NULL, NULL, NULL, log_level, package, NULL, 0,
LOG_OUTPUT_FLAG_CRLF_NONE);

/* ToDo: Implement rate limit to avoid congestion */
Expand Down
2 changes: 1 addition & 1 deletion src/lorawan.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/lorawan/lorawan.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/util.h>

#include <thingset.h>
Expand Down
2 changes: 1 addition & 1 deletion src/sdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <zephyr/drivers/hwinfo.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/sys/crc.h>

#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion src/websocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <zephyr/net/socket.h>
#include <zephyr/net/tls_credentials.h>
#include <zephyr/net/websocket.h>
#include <zephyr/random/rand32.h>
#include <zephyr/random/random.h>
#include <zephyr/shell/shell.h>

#include <thingset.h>
Expand Down
4 changes: 2 additions & 2 deletions west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ manifest:
url-base: https://github.com/LibreSolar
projects:
- name: zephyr
remote: libresolar
revision: v3.4-branch
remote: zephyrproject
revision: v3.5-branch
import:
name-allowlist:
- cmsis
Expand Down

0 comments on commit 8268435

Please sign in to comment.