-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
OTA single bank firmware swapping #2420
Conversation
@@ -0,0 +1,3 @@ | |||
# Baremetal web device dashboard on NUCLEO-H743ZI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
723ZG
mg_log_set(MG_LL_DEBUG); // Set log level | ||
mg_ota_bootloader(); | ||
|
||
MG_INFO(("Chip revision: %c, max cpu clock: %u MHz", chiprev(), | ||
(chiprev() == 'V') ? 480 : 400)); | ||
MG_INFO(("Starting, CPU freq %g MHz", (double) SystemCoreClock / 1000000)); | ||
|
||
struct mg_mgr mgr; // Initialise | ||
mg_mgr_init(&mgr); // Mongoose event manager | ||
mg_log_set(MG_LL_DEBUG); // Set log level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mg_log_set is called twice with the same argument
Maybe first one is not needed ?
src/config.h
Outdated
#ifndef MG_ENABLE_CUSTOM_LOG | ||
#define MG_ENABLE_CUSTOM_LOG 0 // Let user define their own MG_LOG | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git rebase master
#define FLASH_CCR 0x14 | ||
#define FLASH_OPTSR_CUR 0x1c | ||
#define FLASH_OPTSR_PRG 0x20 | ||
#define FLASH_SIZE_REG 0x1FF1E880 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still prefer FLASH->CCR and so, though I understand it complicates things...
src/log.c
Outdated
#if MG_ENABLE_CUSTOM_LOG | ||
// Let user define their own mg_log_prefix() and mg_log() | ||
#else | ||
bool mg_log_prefix(int level, const char *file, int line, const char *fname) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rebase
src/ota.h
Outdated
#if defined(__GNUC__) && !defined(__APPLE__) | ||
#undef MG_IRAM | ||
#define MG_IRAM __attribute__((section(".iram"))) | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see all ota functions (most ?) are prefixed with this.
Do all of them need to run in RAM ? Maybe not the case for dual bank devices, or are those not called/used with dual bank devices ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if the device is single bank do they need to run in RAM. Perhaps we could add a condition on line 17 to also check if the device is single bank?
a05eed9
to
27b6397
Compare
27b6397
to
153553a
Compare
No description provided.