Skip to content
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

Mark many functions for storage in external flash #29290

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

@peterbarker peterbarker commented Feb 13, 2025

Added new INITFUNC for marking processes, inferring they can be put into external flash segments.

This walks CubeRedPrimary back from the edge a bit.

Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

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

There's some non-init stuff going on here - would be good to clarify or put in a different PR

@@ -9,7 +9,7 @@ const float AP_Declination::SAMPLING_MAX_LAT = 90;
const float AP_Declination::SAMPLING_MIN_LON = -180;
const float AP_Declination::SAMPLING_MAX_LON = 180;

const float AP_Declination::declination_table[LAT_TABLE_SIZE][LON_TABLE_SIZE] = {
__EXTFLASHFUNC__ const float AP_Declination::declination_table[LAT_TABLE_SIZE][LON_TABLE_SIZE] = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typicall data tables might go in a different area - do we know these are only accessed at startup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These aren't just used at startup.

But I believe they're used at very low rates - of the order of 1 or 2Hz.

And probably quite rapidly while doing mag field calibrations.

libraries/AP_Declination/generate/generate.py Show resolved Hide resolved
... implying they can go into external flash
... implying they can go into external flash
@peterbarker
Copy link
Contributor Author

There's some non-init stuff going on here - would be good to clarify or put in a different PR

Yeah, I was feeling bad about that. But I wasn't feeling bad enough about it to pull the patches out separately. Will do so now :-)

... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
... implying they can go into external flash
@peterbarker peterbarker changed the title Mark many functions as __INITFUNC__ Mark many functions for storage in external flash Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants