Go Down

Topic: An Assembly Simulator for Arduino's AVR Core (Read 447 times) previous topic - next topic

Milo-D

Hey Guys,

I just wanted to share with you a project in order to get some constructive feedback.

MDX is an Assembly Simulator for 8-bit AVRs. It has an integrated Disassembler, which reconstructs labels and comments in order to increase readability.

Some pictures are attached to this Post. Note that the comment for ret is wrong and is already fixed.

This tool might help people to better understand what really goes on in the Arduino/AVR or just find some Bugs in your program, or reverse/fuzz firmware.

Today I will add the ATMEGA328P Architecture to the Project. So it can be compiled against the Arduino.

What's different ?
- Backstepping is supported
- Headless Mode
- Redefine constants or even mnemonics on Source level
- Open up to 4 files and switch fast between them

Currently there are 3 different modes:

(i) Interactive Simulation
MDX accepts Hex Files as input, then decodes them into readable Assembly Source Code. Now you may step through your Code.

(ii) Headless Mode
MDX accepts a single hex file as input. This file will be silently simulated and the end state of the MCU will be printed out directly in form of a JSON File. This may be interesting for fuzzing and testing.

(iii) Disassembler
MDX will disassemble Hex Files, while reconstructing Labels, new lines and comments. The output will be printed out directly.

In the future:
- I will be working on an interactive Graph to show off relations between code segments.
- Watchpoints, Step in/out, etc.
- Adding more MCUs with different architecture
- many more...

Reason of this post:
MDX is still in development, although it is possible to simulate more complex algorithms like a recursive DFS in a Graph, some instructions are still missing (over 60 instructions are supported).

And now I am asking for some feedback. What's wrong/good, what should be added/removed, etc.

I would be happy to hear your opinion:D

Written in: C++
OS: Linux/Unix
Github: https://github.com/Milo-D/MDX-Assembly-Debugger/

Budvar10

#1
Jan 30, 2020, 09:09 pm Last Edit: Jan 30, 2020, 09:10 pm by Budvar10
Nice. However, I do not want to be cruel, but the practical use of this project will not be great in compare with AVR Studio
Still impressed! Karma for you.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Milo-D

Hey thanks.

Yeah I know that Atmel has its own Simulator but thats why I am adding unique Features.

For example:

- Atmel Studio can not backstep as far as I know.
- Headless Mode so you can See only the end State of the Controller.
- It can be combined with other tools

And for me, the biggest point, it works on the Commandline. And I prefer efficiency over graphical beauty :D

And I guess there are more people who prefer working directly on the Commandline and not having to install gigabytes of data just to simulate some small program.

Even if there is only one user who would use it, the work would have been worth it.

So it is ok for me that it wont be the first pick for everyone.

Again thanks for your reply :D

Budvar10

I have another one: The menu as other stuff should be in English.
Arduino clone with ATmega1284P   http://forum.arduino.cc/index.php?topic=277260.0

Milo-D

It is all in english. That's just my terminal haha.

Go Up