Skip to content

Port to STM32 #101

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

Open
wants to merge 1 commit into
base: v4.1-branch
Choose a base branch
from
Open

Conversation

per42
Copy link

@per42 per42 commented May 28, 2025

Augment flash controllers with their instance on STM32.

This works on current zephyr main - e92677bd3cceb27079d7cb1e3f783d809edea362. It runs the hello world sample on nucleo_wl55jc, but fails with:

panic: panicked at library/alloc/src/alloc.rs:437:13:
memory allocation of 8 bytes failed
*** Booting Zephyr OS build v4.1.0-4886-ge92677bd3cce ***
[00:00:00.000,000] <err> os: CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE is 0
[00:00:00.008,000] <err> os: r0/a1:  0x00000004  r1/a2:  0x0000000a  r2/a3:  0x00000000
[00:00:00.008,000] <err> os: r3/a4:  0x00000004 r12/ip:  0x200022f4 r14/lr:  0x08007f5b
[00:00:00.008,000] <err> os:  xpsr:  0x21000000
[00:00:00.008,000] <err> os: Faulting instruction address (r15/pc): 0x08004e48
[00:00:00.008,000] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:00:00.008,000] <err> os: Current thread: 0x200005e8 (unknown)
[00:00:00.025,000] <err> os: Halting system

This is easily solved with CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=4096 in prj.conf. I can add this to this pull request or separately if you prefer, but I don't know what is suitable for all samples and tests.

[00:00:00.000,000] <inf> rust: rustapp: Hello world from Rust on nucleo_wl55jc

I also tried to add this on main, but DTS parsing fails due to the parser not accepting the origin comments produced by zephyr, it seems. I assume you would like this change introduced there, and then backported.

Augment flash controllers with their instance on STM32
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.

1 participant