AVR CLI Assembly Debugger Project

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

This Thread is outdated.

 

New Thread: https://www.avrfreaks.net/forum/...

Attachment(s): 

Last Edited: Mon. Sep 28, 2020 - 07:05 PM
  • 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

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 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!

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 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: 2

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 good for fuzzing, test writing, etc.

Last Edited: Sun. Aug 23, 2020 - 01:23 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.