Skip to content

Commit

Permalink
Add verbose logs for rp2040
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurizio Branca committed Oct 27, 2021
1 parent 6044ad9 commit 441f6b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utility/ota/OTA-nano-rp2040.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ int rp2040_connect_onOTARequest(char const * ota_url)

watchdog_reset();

DEBUG_VERBOSE("%s downloading: %s", __FUNCTION__, ota_url);

URI url(ota_url);
Client * client = nullptr;
int port = 0;
Expand Down Expand Up @@ -233,6 +235,7 @@ int rp2040_connect_onOTARequest(char const * ota_url)

DEBUG_INFO("%s: %d bytes received", __FUNCTION__, ftell(file));
fclose(file);
DEBUG_VERBOSE("%s download successful", __FUNCTION__);

/* Unmount the filesystem. */
if ((err = fs.unmount()) != 0)
Expand All @@ -241,6 +244,8 @@ int rp2040_connect_onOTARequest(char const * ota_url)
return static_cast<int>(OTAError::RP2040_ErrorUnmount);
}

DEBUG_VERBOSE("%s performing reset to reboot", __FUNCTION__);

/* Perform the reset to reboot to SFU. */
mbed_watchdog_trigger_reset();
/* If watchdog is enabled we should not reach this point */
Expand Down

0 comments on commit 441f6b8

Please sign in to comment.