IDA Pro processor module and ELF loader for JieLi pi32v2 CPUs (AC63x, AC69x, AC79x, …), written in Python. Tested with IDA Pro 9.4.
Copy these files into your IDA user directory (or run python install.py, which does the same):
| File | Copy to (Windows) | Copy to (Linux / macOS) |
|---|---|---|
procs/pi32v2.py, procs/pi32v2.json |
%APPDATA%\Hex-Rays\IDA Pro\procs\ |
~/.idapro/procs/ |
loaders/pi32v2_elf.py |
%APPDATA%\Hex-Rays\IDA Pro\loaders\ |
~/.idapro/loaders/ |
Restart IDA.
-
ELF files (
e_machine0xF1 / 241, objects or linked images): just open them. Choose ELF for JieLi pi32v2 in the load dialog. Sections, symbols, externs and relocations are applied. -
Raw firmware images: open the file, set Processor type to JieLi pi32v2 [pi32v2] and set the loading address. From the command line:
ida -ppi32v2 -b1E0012 app.bin # load at 0x1E00120 (-b is in 16-byte paragraphs)
Wait for the auto-analysis to finish; it runs a few rounds of function discovery after the first pass.
- All 1165 instruction forms: 16/32/48-bit, FPU, DSP and parallel (
#) pairs, printed in JieLi's objdump syntax (r1 = [r2+4],if (r0 == 0) goto loc_…,[--sp] = {rets, r7-r4}), with a one-line description of each instruction as an auto-comment. - Code flow: calls, branches, returns, indirect jumps;
tbb/tbhjump tables become switches. if (…) { … } else { … }predication blocks andrephardware loops shown indented with their braces.- Stack pointer tracking and stack variables.
- Constants that point into the image become references;
[npc + n]literal loads are resolved. - Function discovery in code that is only reached indirectly.
- No decompiler support, calling convention or type information.
- Calls into the chip's mask ROM show as plain addresses unless you add a segment and names for the ROM.
- Register-indexed
[npc + rN]loads are not resolved.
Bug reports with a sample (or the instruction bytes) are welcome. For rebuilding the module and running the tests, see docs/DEVELOPMENT.md.
- jvitkauskas/pi32v2-isa by Julius Vitkauskas – the pi32v2
instruction set reference. The decoder's table
procs/pi32v2.jsonis generated from its machine-readable instruction table (isa/pi32v2.toml, CC0-1.0) using its Python loader (MIT-0), and the relocation types in the ELF loader follow itsdocs/ELF.md. - kagaimiq/jielie – documentation on JieLi chips and firmware formats.
MIT, see LICENSE.