Reduce flash footprint by tshcherban · Pull Request #91 · stm32duino/STM32LowPower · GitHub
Skip to content

Reduce flash footprint#91

Merged
fpistm merged 1 commit into
stm32duino:mainfrom
tshcherban:main-shcherban
May 17, 2023
Merged

Reduce flash footprint#91
fpistm merged 1 commit into
stm32duino:mainfrom
tshcherban:main-shcherban

Conversation

@tshcherban

@tshcherban tshcherban commented Mar 28, 2023

Copy link
Copy Markdown
Contributor

Replace gmtime and mktime calls within programRtcWakeUp function with a custom timeshift calculation.
Saves ~15k flash and reduces alarm time calculation duration ~twice.

Fixes #90
FYI: #13, #73

@fpistm fpistm added the enhancement New feature or request label Mar 28, 2023
@fpistm fpistm added this to the 1.2.4 milestone Mar 28, 2023
@fpistm fpistm self-requested a review March 28, 2023 12:10
@fpistm

fpistm commented Mar 28, 2023

Copy link
Copy Markdown
Member

@tshcherban

tshcherban commented Mar 28, 2023

Copy link
Copy Markdown
Contributor Author

Replace calls within programRtcWakeUp() function with a custom
timeshift calculation to reduce flash size.

Signed-off-by: tshcherban <shcherban91@gmail.com>
Co-Authored-By: Frederic Pillon <frederic.pillon@st.com>

@fpistm fpistm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @tshcherban
I've fixed the astyle issue and also made some code formatting.
I've tested and it works as expected.
I guess to go further the epoch method from RTC could be optimized to not use those API.
Thanks for this improvement.

@fpistm fpistm mentioned this pull request May 17, 2023
@fpistm fpistm merged commit e3c3999 into stm32duino:main May 17, 2023
@fpistm fpistm linked an issue May 17, 2023 that may be closed by this pull request
@tshcherban tshcherban deleted the main-shcherban branch August 3, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support for stm32c031c6t6 Memory consumption

2 participants