mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-24 17:32:18 +00:00
Fix execution halt in nrf devices on assert and add --reboot support on nrf (#1397)
* Fix execution halt in nrf devices on assert * Peg espressif platform to 3.5.0 * Add reboot to nrf52 devices
This commit is contained in:
parent
58d91f0a4b
commit
2a76a5527a
@ -121,7 +121,7 @@ lib_deps =
|
|||||||
; Common settings for ESP targes, mixin with extends = esp32_base
|
; Common settings for ESP targes, mixin with extends = esp32_base
|
||||||
[esp32_base]
|
[esp32_base]
|
||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform = espressif32
|
platform = espressif32@3.5.0
|
||||||
src_filter =
|
src_filter =
|
||||||
${arduino_base.src_filter} -<nrf52/>
|
${arduino_base.src_filter} -<nrf52/>
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
|
@ -714,6 +714,8 @@ void powerCommandsCheck()
|
|||||||
#ifndef NO_ESP32
|
#ifndef NO_ESP32
|
||||||
DEBUG_MSG("Rebooting for update\n");
|
DEBUG_MSG("Rebooting for update\n");
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
|
#elif NRF52_SERIES
|
||||||
|
NVIC_SystemReset();
|
||||||
#else
|
#else
|
||||||
DEBUG_MSG("FIXME implement reboot for this platform");
|
DEBUG_MSG("FIXME implement reboot for this platform");
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,8 +32,8 @@ void __attribute__((noreturn)) __assert_func(const char *file, int line, const c
|
|||||||
{
|
{
|
||||||
DEBUG_MSG("assert failed %s: %d, %s, test=%s\n", file, line, func, failedexpr);
|
DEBUG_MSG("assert failed %s: %d, %s, test=%s\n", file, line, func, failedexpr);
|
||||||
// debugger_break(); FIXME doesn't work, possibly not for segger
|
// debugger_break(); FIXME doesn't work, possibly not for segger
|
||||||
while (1)
|
// Reboot cpu
|
||||||
; // FIXME, reboot!
|
NVIC_SystemReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getMacAddr(uint8_t *dmac)
|
void getMacAddr(uint8_t *dmac)
|
||||||
@ -193,4 +193,4 @@ void clearBonds() {
|
|||||||
nrf52Bluetooth->setup();
|
nrf52Bluetooth->setup();
|
||||||
}
|
}
|
||||||
nrf52Bluetooth->clearBonds();
|
nrf52Bluetooth->clearBonds();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user