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

Update py32f07x example #262

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

decaday
Copy link
Contributor

@decaday decaday commented Feb 19, 2025

Hello! I’ve updated the py32f07x example’s dependency on py32-hal to version 0.3.0.

Due to limited RAM and some odd stack memory issues, I’ve split this PR into two commits for easier testing.

  • The first commit does not add storage support but works fine.
  • The second commit adds storage support but causes a stack overflow.

Enabling storage support required us to disable defmt.

It also caused the stack pointer (SP) to drop to 0x2000668 when entering the main function, which is already within the .bss section (and will cause the program to fail to run if using flip-link). It increased stack memory usage by 9KB, which is abnormal.

More info about it can be find in examples/use_rust/py32f07x/README.md

Note: defmt is not completely disabled in the current commit, and can be used in the current main.rs to get the current stack position. (ROM is not overflow under this condition but RAM is still overflow)

If the issue cannot be resolved, it may be best to merge only the first commit (I’ll remove the second commit).

@HaoboGu
Copy link
Owner

HaoboGu commented Feb 19, 2025

cooool! I'll test it soon

@decaday decaday force-pushed the update-py32-example branch from 0a5b66d to 38c7405 Compare February 19, 2025 15:58
@decaday decaday marked this pull request as draft February 20, 2025 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants