I wrote some code with microblaze magic cell in Jupyter notebook. It is good for implement and debug microblaze code. However when code is final done. It takes time to compile on fly every time when I run the notebook. One way to speed up is rewrote in a normal microblaze device code. So the code need to modify into a main() with big mailbox loop. I wonder why we can’t get the result of microblaze magic and reuse it? Why we need to do thing twice?
Since microblaze magic compile our magic cell code into elf and convert it to binary in pynq.lib.pynqmicroblaze.compile. Create python class mapping to those C function in pynq.lib.pynqmicroblaze.rpc. I found that the C code was saved in /tmp/last.c then make a /tmp/last.elf there. That is mean I can convert it by mb-objcopy. Then I need to know how to load the binary into microblaze soft core. Then how to drive pynq.lib.pynqmicroblaze.rpc to write down python class into a text file. Put these step together, we could build microblaze code in pynq board with less effort.
May be rewrite in a big mailbox loop is more easy way in this stage?