IMX is a simple assembler and disassembler designed for the SDMA RISC CPU of the i.MX6 series. This tool allows developers to convert assembly code into machine code and vice versa, facilitating low-level programming and analysis for the i.MX6's SDMA engine.
It is not intended to be production-ready. The main goal was to understand the SDMA instruction set and how to build simple scripts for DMA transfers.
- Assembler: Converts SDMA assembly code into machine code.
- Disassembler: Translates machine code back into human-readable assembly.
- Custom Instruction Set Support: Tailored for the specific instruction set of the SDMA RISC CPU.
- Command-Line Interface: Easily integrate into scripts and development workflows.
- Flex: For lexical analysis.
- Bison: For parsing.
- GCC: C compiler.
- Make: Build automation tool.
Ensure these tools are installed on your system before proceeding.
Clone the repository and build the project using the provided Makefile:
git clone https://github.com/yairgd/imx.git
cd imx
makeThis will generate the assembler and disassembler binaries.
To assemble an SDMA assembly file:
./asm input.asm -o output.bininput.asm: Your assembly source file.output.bin: The resulting machine code output.
To disassemble a machine code file:
./disasm input.bin -o output.asminput.bin: Machine code input file.output.asm: The resulting assembly code output.
asm.lex: Lexical analyzer definitions for tokenizing assembly code.asm.yacc: Grammar rules for parsing assembly code.instructions.c&instructions.h: Definitions and implementations of the SDMA instruction set.Makefile: Build instructions for compiling the assembler and disassembler.README.md: Project documentation.info.txt: Additional information about the project.
Contributions are welcome! Please fork the repository and submit a pull request with your enhancements.
This project is licensed under the MIT License.