mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-23 17:13:38 +00:00
WM1110 SDK kit enter serial DFU and add deployment packages (#4266)
* Switch default upload protocol to nrfutil so that pio generates zip deploy packages * Enter serial DFU on SDK board * Remove guard for DFU zip from SDK build * NRF_USE_SERIAL_DFU macro instead
This commit is contained in:
parent
974fc31856
commit
df194ca0f0
@ -25,13 +25,9 @@ pio run --environment $1 # -v
|
|||||||
SRCELF=.pio/build/$1/firmware.elf
|
SRCELF=.pio/build/$1/firmware.elf
|
||||||
cp $SRCELF $OUTDIR/$basename.elf
|
cp $SRCELF $OUTDIR/$basename.elf
|
||||||
|
|
||||||
if (echo $1 | grep -q "wio-sdk-wm1110"); then
|
echo "Generating NRF52 dfu file"
|
||||||
echo "Skipping dfu file"
|
DFUPKG=.pio/build/$1/firmware.zip
|
||||||
else
|
cp $DFUPKG $OUTDIR/$basename-ota.zip
|
||||||
echo "Generating NRF52 dfu file"
|
|
||||||
DFUPKG=.pio/build/$1/firmware.zip
|
|
||||||
cp $DFUPKG $OUTDIR/$basename-ota.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Generating NRF52 uf2 file"
|
echo "Generating NRF52 uf2 file"
|
||||||
SRCHEX=.pio/build/$1/firmware.hex
|
SRCHEX=.pio/build/$1/firmware.hex
|
||||||
|
@ -286,5 +286,10 @@ void clearBonds()
|
|||||||
|
|
||||||
void enterDfuMode()
|
void enterDfuMode()
|
||||||
{
|
{
|
||||||
|
// SDK kit does not have native USB like almost all other NRF52 boards
|
||||||
|
#ifdef NRF_USE_SERIAL_DFU
|
||||||
|
enterSerialDfu();
|
||||||
|
#else
|
||||||
enterUf2Dfu();
|
enterUf2Dfu();
|
||||||
|
#endif
|
||||||
}
|
}
|
@ -20,7 +20,7 @@ debug_tool = jlink
|
|||||||
; No need to reflash if the binary hasn't changed
|
; No need to reflash if the binary hasn't changed
|
||||||
debug_load_mode = modified
|
debug_load_mode = modified
|
||||||
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
|
; 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
|
;upload_protocol = stlink
|
||||||
; we prefer to stop in setup() because we are an 'ardiuno' app
|
; we prefer to stop in setup() because we are an 'ardiuno' app
|
||||||
debug_init_break = tbreak setup
|
debug_init_break = tbreak setup
|
||||||
|
@ -107,6 +107,8 @@ extern "C" {
|
|||||||
|
|
||||||
#define LR1110_GNSS_ANT_PIN (32 + 5) // P1.05 37
|
#define LR1110_GNSS_ANT_PIN (32 + 5) // P1.05 37
|
||||||
|
|
||||||
|
#define NRF_USE_SERIAL_DFU
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user