Skip to content

Move to default_instance QSPIF #13

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

Closed

Conversation

manchoz
Copy link

@manchoz manchoz commented Jul 26, 2021

No description provided.

@github-actions
Copy link

Memory usage change @ 439c3e2

Board flash % RAM for global variables %
arduino:mbed:envie_m7 🔺 0 - +64 0.0 - +0.01 🔺 0 - +528 0.0 - +0.1
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 64 0.01 528 0.1 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,64,0.01,528,0.1,0,0.0,0,0.0,0,0.0,0,0.0

@pennam
Copy link
Contributor

pennam commented Oct 6, 2021

@manchoz is this still needed?

@manchoz manchoz force-pushed the qspif_default_instance branch from 439c3e2 to d0f4141 Compare November 12, 2021 09:15
@github-actions
Copy link

Memory usage change @ d0f4141

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

@manchoz
Copy link
Author

manchoz commented Nov 12, 2021

@pennam yes, it is!

It is needed for all the scenarios where OTA needs to be done via media other than WiFi (USB, Ethernet, etc.).

When WiFi.h is not included the QSPIF is not initialized and the begin method and its submethods will fail.

@manchoz manchoz changed the title [WIP] Move to default_instance QSPIF Move to default_instance QSPIF Nov 17, 2021
@manchoz
Copy link
Author

manchoz commented Nov 17, 2021

@pennam please, review.

@aentinger aentinger requested a review from pennam December 15, 2021 11:01
Copy link
Contributor

@pennam pennam left a comment

Choose a reason for hiding this comment

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

@manchoz could you please have a look to this commit pennam@7f37a53 ? Doing like this we are keeping compatibility with older core versions and using get_default_instance() for the new ones. I've also added a call to the init() method.

@@ -47,13 +43,7 @@ Arduino_Portenta_OTA_QSPI::Arduino_Portenta_OTA_QSPI(StorageTypePortenta const s

bool Arduino_Portenta_OTA_QSPI::init()
{
#if !defined (COMPONENT_4343W_FS)
qspi_bd = new QSPIFBlockDevice(PD_11, PD_12, PF_7, PD_13, PF_10, PG_6, QSPIF_POLARITY_MODE_1, 40000000);
Copy link
Contributor

Choose a reason for hiding this comment

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

If we remove completely this line we are dropping compatibility for older core versions ( < 2.3.1 )

return false;
}
#endif
auto qspi_bd = mbed::BlockDevice::get_default_instance();
Copy link
Contributor

@pennam pennam Jan 13, 2022

Choose a reason for hiding this comment

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

In theory we still need to call the init function here, even if we are using get_default_instance()

@pennam
Copy link
Contributor

pennam commented Mar 8, 2022

superseded by #21

@pennam pennam closed this Mar 8, 2022
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Mar 8, 2022
@per1234 per1234 added the topic: code Related to content of the project itself label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants