PANIC on TIM7 IRQ in timer example on armv6-m without FRAME_POINTERS
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
## Summary
I get consistent crashes while testing apps/examples/timer with disabled CONFIG_FRAME_POINTERS.
With them enabled, it works, but .text consumes +4.5KiB flash.
## Impact
armv6-m thumb MCUs using basic timer peripherals.
## Testing
stm32f072b-disco with custom config, Milandr mdr32f1qi with custom config.
## Details
After porting basic timer functionality from stm32f0l0g0 onto mdr32, I tried to launch some userspace demos. It worked from time to time. It crashed when I tried to reduce consumed flash space. I even enabled tmrinfo debug prints, but they didn't help much in case of crashes -- though they showed successfull signal passing when everything worked.
I think I found a single Kconfig option that breaks it: CONFIG_FRAME_POINTERS=n. It changes CFLAGS from `-fno-omit-frame-pointers -fno-optimize-sibling-calls` to `-fomit-frame-pointers` and saves space. I couldn't get anything else to break at runtime.
Stackdumps/backtraces, defconfigs and workdir patches will follow. I used release/10.3 branch.
Contributor guide
Research direction
Start with apps/examples/timer and compare the configuration and compiler flags with CONFIG_FRAME_POINTERS enabled and disabled. Reproduce the TIM7 IRQ crash on the reported armv6-m boards, then use the promised stackdumps, defconfigs, and workdir patches to identify the failing backtrace or interrupt path; done means the timer example runs reliably without the extra frame-pointer flash cost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100