Skip to content

Make library configurable using defines #22

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

Merged
merged 1 commit into from
Mar 8, 2022
Merged

Make library configurable using defines #22

merged 1 commit into from
Mar 8, 2022

Conversation

pennam
Copy link
Contributor

@pennam pennam commented Mar 8, 2022

Since the library will support other platforms i've added a configuration file where is possible to change:

  • OTA_MAGIC
  • enable/disable SDMMC support
  • enable/disable QSPI support

In the future core releses we can add specific defines to configure the library removing board name ARDUINO_PORTENTA_H7_M7 dependency.

By now the library name will remain the same, but we should think about renaming or deprecating this library and create a new one.

@pennam pennam requested review from aentinger and facchinm March 8, 2022 08:15
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Mar 8, 2022
@@ -179,7 +179,7 @@ int Arduino_Portenta_OTA::decompress()

feedWatchdog();

if (ota_header.header.magic_number != 0x2341025b) /* 0x2341:025b = VID/PID Portenta H7 */
if (ota_header.header.magic_number != ARDUINO_PORTENTA_OTA_MAGIC)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there also a ARDUINO_PORTENTA_OTA_MAGIC for non H7 boards? This is confusing me 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @aentinger my intention should be more clear now -> #23

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

Memory usage change @ ad3d370

Board flash % RAM for global variables %
arduino:mbed:envie_m7 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_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
Click for full report CSV
Board,examples/OTA_Qspi_Flash<br>flash,%,examples/OTA_Qspi_Flash<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

@pennam pennam merged commit 4fede42 into arduino-libraries:main Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants