Using ChunkySpy to disassemble eLua compiled code
Posted: Mon May 04, 2015 6:52 am
For those interested in what the nodeMCU compiler generates, you will need to copy the .lc file onto your dev PC and use this utility: ChunkySpy. The latest version has 5.1 and 5.2 variants. You will need to use the 5.1 version (0.9.8). Note that because the eLua system has added extra constant types (rotables, light functions and light user data), you will need to apply the following patch, and use the --elua option to disassemble the nodeMCU complied code files:
Happy dissassembly!
Code: Select all
--- a/ChunkSpy-0.9.8/5.1/ChunkSpy.lua 2015-05-04 12:39:01.267975498 +0100
+++ b/ChunkSpy-0.9.8/5.1/ChunkSpy.lua 2015-05-04 12:35:59.623983095 +0100
@@ -2193,6 +2193,9 @@
config.AUTO_DETECT = true
elseif a == "--brief" then
config.DISPLAY_BRIEF = true
+ elseif a == "--elua" then
+ config.LUA_TNUMBER = 5
+ config.LUA_TSTRING = 6
elseif a == "--interact" then
perform = ChunkSpy_Interact
Happy dissassembly!