Close

Emulator/Debugger now working with LLVM-produced *.elf files

A project log for Project Ember

Homebrew Retro-Inspired 32-bit CPU And Video Game System

TomTom 12/23/2021 at 22:400 Comments

With a few days off for the holidays, I finally had some time to get the debugger working again. It now supports the common DWARF debugging standard segment that is contained in the ELF file written by LLVM-MC and LLD.

I originally coded it for the simple assembler that I wrote for the CPU, but the system quickly outgrew that and I decided to implement a "real" assembler. I ended up going with LLVM-MC over a separate assembler like VASM so I could more easily implement higher-level languages at some point. That was painfully complex, but it is now working, at least for a small subset of the Ember instruction set.

I can now set breakpoints, step through the code in the emulator, as well as view and edit registers and memory, directly in the emulator window. 

Next, I need to finish up the instruction set ISA, add all the remaining instructions to the LLVM TableGen scripts, then update the emulator for the new instructions and I should be able to get working on some firmware/OS code. 

Discussions