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

Run from Ram #1884

Closed
SpinFast opened this issue Nov 16, 2023 · 1 comment
Closed

Run from Ram #1884

SpinFast opened this issue Nov 16, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@SpinFast
Copy link

SpinFast commented Nov 16, 2023

Is your feature request related to a problem? Please describe.
It would be great if probe-rs run supported directly loading an image into sram (or as much of it as possible) for fast testing and debugging. Flashing QSPI flash can be painfully slow, these parts often have plenty of ram to run the entire image out of them. It would be great to have very fast turn around times on running things.

Describe the solution you'd like
probe-rs given an image that loads into ram succeeds, and maybe better yet understands its doing something a bit special

Additional context
Building an image for sram only for imxrt1010 and trying to run it gets me...

probe-rs run --probe 0d28:0204 --chip MIMXRT1010 target/thumbv7em-none-eabihf/debug/examples/hal_clock_out
Error: Error while flashing

Caused by:
    No flash memory contains the entire requested memory range 0x20002000..0x20002400

Instead I wish it would simply load the image

pyocd does seem to at least load it successfully, though likely it gets vanquished on a reset.

pyocd load --format elf target/thumbv7em-none-eabihf/debug/examples/hal_clock_out
0000780 I Loading /home/spinfast/src/imxrt-hal/target/thumbv7em-none-eabihf/debug/examples/hal_clock_out [load_cmd]
[==================================================] 100%
0002659 I Erased 0 bytes (0 sectors), programmed 41228 bytes (0 pages), skipped 0 bytes (0 pages) at 21.56 kB/s [loader]

So I suppose in this case what I'd love to see is maybe a special mode that loads to ram by doing the equivalent of gdb's

monitor reset halt
load
c

This does work using pyocd's gdb server

@SpinFast SpinFast added the enhancement New feature or request label Nov 16, 2023
@Yatekii
Copy link
Member

Yatekii commented Nov 16, 2023

That target does not contain the DTCM memory range that you expect as correctly told by the error message.
We can definitely improve the message to not mention flash and maybe print available ranges.

https://probe.rs/targets/master/MIMXRT1010 shows that there is only one RAM memory range.
IMXRT1010RM.pdf says there is more.
You could try and regenerate the target with https://github.com/probe-rs/probe-rs/tree/master/target-gen. Maybe there is a newer CMSIS-Pack that fixes the issue. Otherwise you can add it manually. Everything needs to land in this file at the end: https://github.com/probe-rs/probe-rs/blob/master/probe-rs/targets/MIMXRT1010.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants