Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WM1110 SDK kit enter serial DFU and add deployment packages #4266

Merged
merged 4 commits into from
Jul 11, 2024
Merged
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
10 changes: 3 additions & 7 deletions bin/build-nrf52.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ pio run --environment $1 # -v
SRCELF=.pio/build/$1/firmware.elf
cp $SRCELF $OUTDIR/$basename.elf

if (echo $1 | grep -q "wio-sdk-wm1110"); then
echo "Skipping dfu file"
else
echo "Generating NRF52 dfu file"
DFUPKG=.pio/build/$1/firmware.zip
cp $DFUPKG $OUTDIR/$basename-ota.zip
fi
echo "Generating NRF52 dfu file"
DFUPKG=.pio/build/$1/firmware.zip
cp $DFUPKG $OUTDIR/$basename-ota.zip

echo "Generating NRF52 uf2 file"
SRCHEX=.pio/build/$1/firmware.hex
Expand Down
5 changes: 5 additions & 0 deletions src/platform/nrf52/main-nrf52.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,10 @@ void clearBonds()

void enterDfuMode()
{
// SDK kit does not have native USB like almost all other NRF52 boards
#ifdef NRF_USE_SERIAL_DFU
enterSerialDfu();
#else
enterUf2Dfu();
#endif
}
2 changes: 1 addition & 1 deletion variants/wio-sdk-wm1110/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ debug_tool = jlink
; No need to reflash if the binary hasn't changed
debug_load_mode = modified
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
upload_protocol = jlink
upload_protocol = nrfutil
;upload_protocol = stlink
; we prefer to stop in setup() because we are an 'ardiuno' app
debug_init_break = tbreak setup
Expand Down
2 changes: 2 additions & 0 deletions variants/wio-sdk-wm1110/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ extern "C" {

#define LR1110_GNSS_ANT_PIN (32 + 5) // P1.05 37

#define NRF_USE_SERIAL_DFU

#ifdef __cplusplus
}
#endif
Expand Down
Loading