Hey,
New to this forum.
I'm interested in looking into the native code generated by function marked as @micropython.viper or @micropython.native
as Damien examined here
https://www.kickstarter.com/projects/21 ... sts/665145
any head start on how to do this?
because the code is compiled on the board itself.
thank you
Examine generated native code
Re: Examine generated native code
I think the way to do this is to add debugging output to the code generator into your firmware such that when the compiler runs on the device it prints out what you need.
So for example you can enable DEBUG_printf in the top of emitnative.c and also you can dump out the generated code in asm_<arch>_end_pass in asm<arch>.c (take a look at asm_xtensa_end_pass in asmxtensa.c for an example of dumping out the generated code). You'll have to decode that into a format that you can pass to <arch>-objdump to view the disassembly.