"Bring-up" is the term that is used to describe the process of getting a new board to function. Believe me, they don't all work the first time. Bring-up is how you coax the board into life, figure out what bugs it might have, how you can work around those bugs. Obviously, you want to get as much as you possibly can out of a test board. The worst thing is a problem that stops you dead, requiring a hardware revision or "re-spin" to make more progress. Problems that have workarounds are fine, even if the workarounds are ugly. The workarounds just need to allow you to make forward progress without spending time and money on a re-spin.
Bench Testing, Phase 1
Bench Testing, Phase 2
Because it is impossible for me to leave well-enough alone, I modified my EPROM firmware to add two more features.
First off, the idea of logging the ECU bus activity during bring-up was so useful that I decided to make it permanent. Now, my fake EPROM continuously tracks the most recent 16,384 bus accesses by the ECU processor. If the ECU processor ever has trouble, I can look through that history log and get some insight into why things went bad.
The second feature was based on the fact that the ECU processor only has 512 bytes of RAM. That's not much! My fake EPROM processor has 264K of SRAM, or over 500 times as much! The variables in that tiny 512 byte memory are shared with the ECU processor's stack. The original Aprilia firmware shows evidence of stack paranoia. When a stack gets too big, it can corrupt the memory beside it. Stack corruption problems are extremely hard to debug. To solve that, I had the idea to create an 'MROM', a "Mostly Read-Only Memory". I took a small section of some unused EPROM address space and turned it into RAM. Then, I moved the ECU's stack into that new area of RAM. Now all 512 bytes of ECU RAM can be used for other purposes, and the ECU stack lives out of the way where it can't cause stack corruption issues if things ever get out of hand. Because the whole EPROM memory is just a software construct inside another processor, it was trivial for me to do. I am betting that the original engineers who wrote the ECU code would have really enjoyed the extra memory!
Since then, I have worked on the build system for the fake EPROM. I have it set up so that there is a 14 megabyte partition for holding code images. As of now, I have things set up so that the EPROM can serve any of my collection of stock Aprilia code images for the Gen1 ECU bikes. Of course, it can also serve my own image that does the ECU data streaming. That image is based on the 549USA EPROM, which itself is based on the RP58 EPROM. I need to set up the mechanisms that allow a rider to select a specific EPROM image before going for a ride. That will involve getting the wireless processor running. That's going to take some time...
Next up: Wireless (coming in 2023)