This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
Can't find room for painting the stack when stack isn't in RAM region #323
Labels
difficulty: medium
Somewhat difficult to solve
status: needs design
This feature needs design work to move forward
topic: memory
type: bug
Something isn't working
Describe the bug
I fell over a bug in the stack painting stuff working on Neotron. I don't think
probe-run
can cope when the stack isn't in the RAM region. In my case I have a RAM region for .data/.bss, and two separate stacks, in regions calledCORE0_STACK
andCORE1_STACK
. It tries to fit the painting code into RAM and gets sad when it doesn't fit, whenCORE0_STACK
is right there empty.It's annoying because the failure mode isn't "I didn't paint your stack", it's "I exited and refused to take your chip out of reset".
To Reproduce
Steps to reproduce the behavior:
Make a project where stack isn't in the RAM region, but is in another region (like
STACK
). Set__stack_start = ORIGIN(STACK) + LEN(STACK)
so cortex-m-rt does the right thing.Expected and observed behavior
I expected
probe-run
to flash my chip and start my code.What it actually says it that it couldn't find the space for the painting code, and exited.
config.toml
See https://github.com/Neotron-Compute/Neotron-Pico-BIOS/tree/12f735402400b421d4e0fb3a3bd717b34fe84a40, but you'll want to make the RAM region smaller to trigger the bug (it has a bunch of padding in it currently).
Probe details
It's an
RP2040
with the DapperMime firmware.Operating System:
Arch Linux.
ELF file (attachment)
Can attach later, or you can build it from above repo.
Additional context
N/A
The text was updated successfully, but these errors were encountered: