This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
support pure RAM programs #160
Labels
difficulty: medium
Somewhat difficult to solve
priority: medium
Medium priority for the Knurling team
status: needs PR
Issue just needs a Pull Request implementing the changes
type: enhancement
Enhancement or feature request
Projects
Context: most of the time spent in running a
defmt-test
test suite goes into loading the test images. Program loading can take seconds whereas tests are usually completed in less than one second. If the test suite comprises of several test files the problem is further aggravated. This leads to very slow edit-compile-test cycles.Goal: speed up program loading by at least 2x (because a erase step is not required when writing to RAM)
Implementing this requires several changes
probe-run
won't load programs into RAM at all because it uses aprobe-rs
API that only writes to Flash memory.probe-run
won't properly start pure RAM programs because it uses a 'software reset' to start the program and by default this makes the CPU use the vector table located in Flash. This can be fixed by makingprobe-run
do a reset halt and then having it patch the target's VTOR, SP, PC registers to the values in the RAM vector table.(NOTE: we probably have the logic for these 2 steps in an old version of
probe-run
)cortex-m-rt
doesn't have good support for pure RAM programs. One can make this work by lying about the location ofFLASH
in a linker script but this cumbersome and error prone -- HALs that provide their ownmemory.x
file further complicate things. The most convenient way to solve this would be makingprobe-run
itself modify the ELF file on the fly to remap linker sections from Flash to RAM when some flag is specified (e.g.--ram
) -- this may not be straightforward to implement because all the absolute addresses would need to be fixed up (some of these may be encoded in ARM instructions; others may be in debug info).The text was updated successfully, but these errors were encountered: