stef / pyrsp

python implementation of the GDB Remote Serial Protocol
83 stars 20 forks source link

Library assumes all flash starts at 0x08000000 #19

Closed GMMan closed 2 years ago

GMMan commented 2 years ago

In my use case, I am hacking a product with a SoC that has some audio codec ROM code that's too cumbersome to reimplement for PC, so I'm using QEMU to emulate the code. I'm using the LM3S6965 EVB machine for emulation, and it has flash starting at 0x00000000. I was a bit confused why the library would raise an error when just initializing it, and it turned out to be trying to get the fault handler at 0x0800000c, which doesn't exist on this emulated SoC. The flash base address should taken in as an optional argument when initializing.

stef commented 2 years ago

hey, yeah, the nvic gets mapped anyway to 0x0, so i think this fix should be the correct one. no need to parametrize the nvic mapping thus...