Closed marnovandermaas closed 2 months ago
The last force push squashes the changes to the load software script and the TCL because they are very related.
Well doesn't work first time for me, I think it's the general JTAG flakiness we've been seeing rather than anything specific to do with this PR. I'll hopefully have some time to try again with the olimex JTAG adapter instead see if that works.
Well works fine with the Olimex which is good. Maybe we're messing up the FTDI config somehow? I did just copy/paste the ftdi_layout_init
from elsewhere without working out what it actually did, other than noting it seemed to work at the time!
Oh and one more question, what's happening when the new program is being written to memory? There's nothing explicit to halt the CPU core so presumably it's running as we rewrite the instruction memory and then issue a reset? That could be pretty unreliable, especially if one binary allocates something as data it's actively reading and writing to and the new binary allocates the same space as code.
Oh and one more question, what's happening when the new program is being written to memory? There's nothing explicit to halt the CPU core so presumably it's running as we rewrite the instruction memory and then issue a reset? That could be pretty unreliable, especially if one binary allocates something as data it's actively reading and writing to and the new binary allocates the same space as code.
Yep, the CPU core is reset with every word written from JTAG at the moment :nauseated_face: :
But we will probably be fine, because the CPU will likely never get past the first few lines of boot/setup-code before the next write.
This is a pretty big pull request, but it was quite complex to put together so I would rather not peal it apart too much. Apologies if this makes reviewing more difficult.
You can of course do a code review, but please also test this PR. You can do so with the following commands:
The first four commits are just lint cleanups I found along the way, which you can ignore during the review process.