Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ jobs:
cd ${{ matrix.sample.path }}
echo 'CONFIG_BLYNK_TEMPLATE_ID="TMPLxxxxxxxxx"' >> prj.conf
echo 'CONFIG_BLYNK_TEMPLATE_NAME="Test Device"' >> prj.conf
./build.sh ${{ matrix.sample.board }}
./build.sh ${{ matrix.sample.board }} ${{ matrix.zephyr_ver }}

4 changes: 2 additions & 2 deletions docs/samples/basic/Raspberry_Pi_Pico_with_ESP8266_Shield.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Wrote 56320 bytes to zephyr.uf2

> [!NOTE]
> You will need an external programmer like `Segger JLink` or `PicoProbe`.
> We were unable to flash the board properly using miltiple `UF2` files (one for MCUboot and one for the main firmware).
> We were unable to flash the board properly using multiple `UF2` files (one for MCUboot and one for the main firmware).
> Read more about [flashing the Pi Pico with Zephyr](https://docs.zephyrproject.org/latest/boards/arm/rpi_pico/doc/index.html#flashing)

```sh
Expand All @@ -95,7 +95,7 @@ west flash --runner jlink
> [!WARNING]
> When assembling the board, ensure that all USB ports are disconnected from any components, and that there is no power supply connected.

1. Connect Pico-ESP8266 shield to the Raspberry Pi Pico.
1. Connect Pico-ESP8266 shield to the Raspberry Pi Pico.
**Important**: The silkscreened USB port representation on the shield should be properly aligned with the actual USB port on the Raspberry Pi Pico.
2. Connect your device using USB. The device will appear as a `CDC-ACM` serial.
3. Use your favourite serial terminal software (`PuTTY`, `minicom`, `screen`) to access the serial console (`115200 8N1`).
Expand Down
Empty file added samples/basic/multiple
Empty file.
1 change: 0 additions & 1 deletion samples/basic/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ CONFIG_IMG_MANAGER=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_HEAP_MEM_POOL_SIZE=2048


2 changes: 2 additions & 0 deletions samples/without_ota/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ExternalProject_Add(
INSTALL_COMMAND "" # This particular build system has no install command
BUILD_BYPRODUCTS ${BLYNK_NCP_DIR}/libblynkncp.a
DEPENDS zephyr_interface
DEPENDS offsets_h
)

# Create a wrapper CMake library that our app can link with
Expand All @@ -69,3 +70,4 @@ set_target_properties(blynk_ncp_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${

target_link_libraries(app PUBLIC blynk_ncp_lib)
target_link_libraries(blynk_ncp_lib INTERFACE kernel)

1 change: 1 addition & 0 deletions samples/without_ota/boards/stm32f030_demo.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Copyright (c) 2024 Blynk Technologies Inc.
# SPDX-License-Identifier: Apache-2.0

Expand Down
75 changes: 62 additions & 13 deletions samples/without_ota/build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,67 @@
#!/bin/sh
set -e
BOARD=$1
ZEPHYR_VERSION=$2
if [ -z "$BOARD" ]; then
echo "Usage: $0 <BOARD> [ZEPHYR_VERSION]"
exit 1
fi
# Fallback to default version
if [ -z "$ZEPHYR_VERSION" ]; then
ZEPHYR_VERSION="v0.0.0"
shift 1
else
shift 2
fi
echo "Building for board: $BOARD"
echo "Zephyr version: $ZEPHYR_VERSION"
version_gte() {
[ "$(printf '%s\n%s' "$1" "$2" | sort -V | head -n1)" = "$2" ]
}

export BOARD=$1
shift

CONF_FILE=""
case $BOARD in
adafruit_feather_m0_basic_proto|arduino_uno_r4_minima)
west build -p -b ${BOARD} -- \
-DEXTRA_CONF_FILE=$(pwd)/boards/adafruit_airlift.conf ${@}
;;
stm32f030_demo)
west build -p -b ${BOARD}
;;
*) # Invalid option
echo "Error: Invalid option"
exit 1
adafruit_feather_m0_basic_proto|arduino_uno_r4_minima)
CONF_FILE="$(pwd)/boards/adafruit_airlift.conf"
;;
stm32f030_demo)
CONF_FILE="$(pwd)/boards/stm32f030_demo.conf"

# Backup original stm32f030_demo.conf if it doesn't exist
if [ ! -f "boards/stm32f030_demo.conf.backup" ]; then
cp boards/stm32f030_demo.conf boards/stm32f030_demo.conf.backup
fi

# Restore original stm32f030_demo.conf
cp boards/stm32f030_demo.conf.backup boards/stm32f030_demo.conf

# Add legacy configs for versions before 3.5.0
if ! version_gte "$ZEPHYR_VERSION" "v3.5.0"; then
echo "Adding legacy configuration options to stm32f030_demo.conf for Zephyr version < 3.5.0"
echo "" >> boards/stm32f030_demo.conf
echo "# Legacy configs for Zephyr < 3.5.0" >> boards/stm32f030_demo.conf
echo "CONFIG_ISR_TABLES_LOCAL_DECLARATION=y" >> boards/stm32f030_demo.conf
echo "CONFIG_LTO=y" >> boards/stm32f030_demo.conf
else
echo "Using clean stm32f030_demo.conf for Zephyr version >= 3.5.0 (no legacy configs)"
fi
;;
esac

# Single build command with appropriate configuration
if [ -n "$CONF_FILE" ]; then
echo "Using CONF_FILE: $CONF_FILE"
west build -p -b "$BOARD" -- -DEXTRA_CONF_FILE="$CONF_FILE" -DKCONFIG_WARN_UNDEF_ASSIGN=n "$@"
else
echo "No extra CONF_FILE used."
west build -p -b "$BOARD" -- -DKCONFIG_WARN_UNDEF_ASSIGN=n "$@"
fi

# Restore original stm32f030_demo.conf after build (only if it was modified)
if [ "$BOARD" = "stm32f030_demo" ]; then
echo "Restoring original stm32f030_demo.conf"
cp boards/stm32f030_demo.conf.backup boards/stm32f030_demo.conf
echo "Removing backup file"
rm boards/stm32f030_demo.conf.backup
fi

4 changes: 4 additions & 0 deletions tests/west_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ manifest:
import:
name-allowlist:
- cmsis
- cmsis-dsp
- cmsis-nn
- cmsis_6
- hal_stm32
- hal_rpi_pico
- hal_atmel
- hal_renesas
- mcuboot
- mbedtls