Skip to content

OTA on M4 #40

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

OTA on M4 #40

wants to merge 1 commit into from

Conversation

pennam
Copy link
Contributor

@pennam pennam commented May 15, 2023

Constraints:

  • only 1MB M7 + 1MB M4 flash split is supported (👀)

Notes:

  • run ./bin2ota.py PORTENTA_H7_M7 SKETCH.lzss SKETCH.ota even if you are creating an OTA file for the M4

@github-actions
Copy link

Memory usage change @ 3fd0d32

Board flash % RAM for global variables %
arduino:mbed:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nicla:nicla_vision 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/OTA_Qspi_Flash
flash
% examples/OTA_Qspi_Flash
RAM for global variables
% examples/OTA_Qspi_Flash_Ethernet
flash
% examples/OTA_Qspi_Flash_Ethernet
RAM for global variables
% examples/OTA_SD_Portenta
flash
% examples/OTA_SD_Portenta
RAM for global variables
% examples/OTA_Usage_Portenta
flash
% examples/OTA_Usage_Portenta
RAM for global variables
%
arduino:mbed:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_giga:giga 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_nicla:nicla_vision 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_opta:opta 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/OTA_Qspi_Flash<br>flash,%,examples/OTA_Qspi_Flash<br>RAM for global variables,%,examples/OTA_Qspi_Flash_Ethernet<br>flash,%,examples/OTA_Qspi_Flash_Ethernet<br>RAM for global variables,%,examples/OTA_SD_Portenta<br>flash,%,examples/OTA_SD_Portenta<br>RAM for global variables,%,examples/OTA_Usage_Portenta<br>flash,%,examples/OTA_Usage_Portenta<br>RAM for global variables,%
arduino:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_giga:giga,0,0.0,0,0.0,,,,,,,,,0,0.0,0,0.0
arduino:mbed_nicla:nicla_vision,0,0.0,0,0.0,,,,,,,,,0,0.0,0,0.0
arduino:mbed_opta:opta,0,0.0,0,0.0,0,0.0,0,0.0,,,,,0,0.0,0,0.0

@github-actions
Copy link

Memory usage change @ 3eac365

Board flash % RAM for global variables %
arduino:mbed:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nicla:nicla_vision 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/OTA_Qspi_Flash
flash
% examples/OTA_Qspi_Flash
RAM for global variables
% examples/OTA_Qspi_Flash_Ethernet
flash
% examples/OTA_Qspi_Flash_Ethernet
RAM for global variables
% examples/OTA_SD_Portenta
flash
% examples/OTA_SD_Portenta
RAM for global variables
% examples/OTA_Usage_Portenta
flash
% examples/OTA_Usage_Portenta
RAM for global variables
%
arduino:mbed:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_giga:giga 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_nicla:nicla_vision 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_opta:opta 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/OTA_Qspi_Flash<br>flash,%,examples/OTA_Qspi_Flash<br>RAM for global variables,%,examples/OTA_Qspi_Flash_Ethernet<br>flash,%,examples/OTA_Qspi_Flash_Ethernet<br>RAM for global variables,%,examples/OTA_SD_Portenta<br>flash,%,examples/OTA_SD_Portenta<br>RAM for global variables,%,examples/OTA_Usage_Portenta<br>flash,%,examples/OTA_Usage_Portenta<br>RAM for global variables,%
arduino:mbed:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_giga:giga,0,0.0,0,0.0,,,,,,,,,0,0.0,0,0.0
arduino:mbed_nicla:nicla_vision,0,0.0,0,0.0,,,,,,,,,0,0.0,0,0.0
arduino:mbed_opta:opta,0,0.0,0,0.0,0,0.0,0,0.0,,,,,0,0.0,0,0.0

* This example demonstrates how to update the firmware of the Arduino Portenta H7 M4 core
* using a firmware image stored on the QSPI.
*
* WARNING: Only 1MB M7 + 1MB M4 flash split is supported
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this flash split maybe creating a compiler define that can be checked in code using the preprocessor, i.e.

#ifndef FLASH_SPLIT_1_1
# error "Only a flash split of 1MB M7 + 1MB M4 is allowed"
#endif

?

Copy link
Contributor

@aentinger aentinger May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just thinking a compilation error is the simplest way to prevent foot-shooting 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! Thanks for the suggestion 🥇 i think we can use something like

#if CM4_BINARY_START != 0x08100000
# error "Only a flash split of 1MB M7 + 1MB M4 is allowed"
#endif

I'll test it later

@per1234 per1234 linked an issue Nov 22, 2023 that may be closed by this pull request
@per1234 per1234 added topic: documentation Related to documentation for the project type: enhancement Proposed improvement labels Nov 22, 2023
@pennam pennam marked this pull request as draft March 4, 2024 07:42
@pennam pennam mentioned this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trouble trying to OTA update M4 core
3 participants