No. Sorry. Without a working system we are stuffed.
Well, I finally gave in and bought a Renesas E8a debug probe, built a custom debug cable for the connectors I had added to the Fit LTO BMS, and installed the R8C development tools on an old Windows 7 laptop...No. Sorry. Without a working system we are stuffed.
1) Not familiar with the RL78 at all. (Just starting to get a familiar with R8c 36W/36Y. At least I believe I am looking at the correct docs now. ;-)Perhaps it is time I started getting serious about my LTO conversion.
@Fishybob - I see that someone has created an RL78 plug-in for Ghidra in 2020... but there were a lot of parts in that family, so YMMV. But it might be good enough to bring Ghidra online for analysis of the binary.
I wonder how hard it is to create a symbol table for that manually? It may eliminate the need to manually annotate the assembly. I presume that you are using the disassembler that's part of the Renesas toolchain.
@anyone - What is the range of CAN bus IDs? Is it hex 201 though 20C (12 blocks, or six packs)? Did the Fit have three groups of these? (1.1 kWh * 18 = 19.8 kWh)?
Nice progress.Looking at the CAN registers I see the "CAN0 FIFO Received ID Compare Registers" are set to listen for ID 0x503. (This might be a broadcast ID the "CMU" is expecting from the "BMU".)
Taking a break from CAN controller/debugger frustration. Here is my take on the CAN controller init which gives a feel for code complexity based on resources initialized:If I don't make some progress on the CAN init issue soon I may switch back to the non-CAN controller for a while.
Thanks for the info/ideas (and the spare boards!) I will reread your CR-Z BMS comments for before I do any CAN spamming.... In the CR-Z the $501 packet is sent every 500ms, so pretty slow.
Found someone actively working on M16c support for Ghidra (silverchris/m16c) and have it decompiling difficult to understand assembly into much more condensed but still difficult to understand "C". Thanks again for mentioning Ghidra, I had never used it before.