AVR CLI Assembly Debugger Project

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Hey Guys,

 

i am pretty new to this forum and wanted to share my current Project with you.

 

It is called MDX, an Assembly Debugger for Atmel's AVRs.
(Scroll down for pictures)

 

It is an easy to use Tool that simulates a Microcontroller based on its Hardware properties.

 

It's completely based on a Commandline Interface and right now only available for Linux.

 

Every Instruction and its impact on the MCU is colorfully and dynamically visualized so you will exactly see what is happening.

 

You are able to open up more than just one .asm file in a single Debug Session, allowing you to switch easily to another file without closing MDX.

 

MDX is still in early Development, so it's not supporting everything yet. But it is already possible to set breakpoints and debug some simple programs like loops, stacks, etc.

 

In the future, I've planned to add a 'backstep', so we might be able to step Back, if we missed something.

 

And that's why I am posting here. I am curious what you guys think. Maybe you have some great suggestions and/or feedback.

 

MDX is written in C++ and will be OpenSource.

 

https://github.com/Milo-D/MDX-Assembly-Debugger

 

Thank you for reading.

 

Attachment(s): 

Last Edited: Fri. Jan 3, 2020 - 05:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks interesting but presumably it's "core only" simulation? Or does it aim to simulate common peripherals (timer, UART, SPI etc) ?

 

Linux has needed a decent simulator for a long time (mainly simulavr so far) but now that Windows AS7 is coming to Linux in the form of Microchip's MPLABX  which will bring the Atmel simulation technology then I wonder if it may be a bit late in the day for this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your respond.

Yeah, I am trying to simulate common peripherals. But first I will need to finish the core of the mcu.

MPLabx is, atleast for me, too heavyweight with its GUI. Thats why I am trying to create a lightweight Terminal Application for those who prefer working on the commandline :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What GUI library?  Windows, Mac, Linux?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's quite true that a lot of people want a command line sim for unit testing so I'd press on with that (reminds me that their is also buserror's AVr sim for this reason too).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually I am not using a GUI library for the Commandline Interface.

It is made for Linux but maybe even for Windows in future.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I embedded the picture where you referenced it but you've edited it out again - wonder why?

 

No one wants to mess about with "attachments" these days. It is 2019 not 1999 !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

I embedded the picture where you referenced it but you've edited it out again - wonder why?

 

No one wants to mess about with "attachments" these days. It is 2019 not 1999 !

Oh sorry. Thought it was a mistake and the picture had a lower quality than the original attachment. I will put it back later.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Milo-D wrote:
Thats why I am trying to create a lightweight Terminal Application for those who prefer working on the commandline :)

That is ssssoooo 20th century! devil

 

Jim

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

ki0bk wrote:

That is ssssoooo 20th century! devil

 

yes

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Bleeding Edge for 19th Century Programmers!

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Milo-D wrote:
MPLabx is, atleast for me, too heavyweight with its GUI.
Weight can be reduced by MPLAB X SDK; MDB is present.

 

MDB: The Microchip Debugger - Developer Help

MPLAB X SDK For MPLAB X IDE | opensource4pic (v5.30 zip is defective)

MPLAB X v5.30, 'Device Support.htm' :

  • AVR CPU and memory simulation is tested for about half of the XMEGA and more than half for megaAVR
  • AVR I/O simulation is unsupported

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

If your interested in simulating AVRs, an even more lightweigth solution is https://github.com/avrsimulator/gdbproxy. This is a small cross-platform tool that can load the simulator models included in the DFPs (both .dll's for Windows and .so's for Linux) and gives you a TCP port where you can connect your favorite gdb debugging tool. avr-gdb gives you command-line, and there are other options out there that can give you a GUI.

DFPs with the simulator models are available here: http://packs.download.atmel.com/

 

The simulator models are cycle accurate, since they are generated from the RTL that is used to make the actual devices, and includes all peripherals. They do lack analog interfaces, but there are ways to work around that, like writing ADC conversion values to the ADC result register which the AVR core will read when the ADC sampling sequence is done.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Short Update for those who are interested:

- Github link is up.

- Ditched avra, now using my disassembler to create a source.
This disassembler also recovers Labels

- Stepping backwards in Debugger is now available

- Symbol redefinition to recover readability of the
disassembled hex file.

- Now supporting around 60 Assembly instructions.

- I have added several new standalone modes:

(i) Disassembler
This mode decodes an ihex file and turns it into a readable assembly file while reconstructing labels.

(ii) Headless
The Headless Mode accepts an ihex file as input and returns
a json file of the system related MCU informations, like GPR, SREG, EEPROM, etc. This mode may be gold for fuzzing, test writing, etc.

Last Edited: Fri. Jan 3, 2020 - 05:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Might have to run it through emscripten so I can run it on something modern - grandpa wanted his c++ compiler back.