-
Notifications
You must be signed in to change notification settings - Fork 910
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 RP2040 memory.x #2139
Update RP2040 memory.x #2139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks! Could you update these too?
boot/bootloader/rp/memory.x
boot/application/rp/memory.x
Above 0x20040000, the 8 KB of SRAM are not striped ! So I am not sure it is a good idea to mix non striped SRAM with striped SRAM. |
@Athorus that's fair! on one hand: using unstriped ram primarily for the core might be good, if it is uncontended with DMA access. On the other hand: we have no control over that for user code, and if we only give 4K of stack for each core, that might not reasonably be enough. |
With 256K, at the end of the program I got as expected : But with 264K I got this strange message ! In both cases, the program seems to work fine |
ping @jamesmunns :) |
examples are supposed to be simple, and "the default memory.x allows me to use all RAM" makes a lot of sense for examples. The datasheet specifically says the ram is laid out like that so you can pretend it's a contiguous 264k block. for the majority of applications it's likely to increase perf (moves core activity to sram4-5, while dma is most likely to use sram0-3). and only for very particular circumstances (several DMAs adding up more than 1 word/cycle out of stack) it might reduce perf. So IMO it's worth doing this change.
This is knurling-rs/probe-run#415 (the regions are separate in the probe-rs target definition). it's a bit moot now that probe-run is deprecated though. |
The RP2040 has 264KiB of memory, not 256KiB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
Shoud I use probe-rs instead of probe-run ? |
The RP2040 has 264KiB of memory, not 256KiB.
Citation: https://www.raspberrypi.com/documentation/microcontrollers/rp2040.html#technical-specification