This repository contains ATtiny13A microcontroller emulator source code. It is capable of executing programs prepared by avra and avr-gcc compilers. For detailed info on emulator installation and usage see the end of this page
ADD, ADC, ADW, SUB, SUBI, SBC, SBCI, SBIW, AND, ANDI, OR, ORI, EOR, COM, NEG, SBR, CBR, INC, DEC, TST, CLR, SER, MUL, MULS, MULSU, RJMP, IJMP, JMP, RCALL, ICALL, CALL, RET, RETI, CPSE, CP, CPC, CPI, SBRC, SBRS, SBIC, SBIS, BRBS, BRBC, BREQ, BRNE, BRCS, BRCC, BRSH, BRLO, BRMI, BRPL, BRGE, BRLT, BRHS, BRHC, BRTS, BRTC, BRVS, BRVC, BRIE, BRID, MOV, MOVW, LDI, LDS, LD (all variants), LDD, STS, ST (all variants), STD, LPM, IN, OUT, PUSH, POP, XCH, LAS, LAC, LAT, LSL, LSR, ROL, ROR, ASR, SWAP, BSET, BCLR, SBI, CBI, BST, BLD, SEC, CLC, SEN, CLN, SEZ, CLZ, SEI, CLI, SES, CLS, SEV, CLV, SET, CLT, SEH, CLH, NOP, SLEEP
Note that several instructions may appear by a different name in log due to the same opcode of some instructions
- Emulator is able to execute arithmetic and control instructions
- avra compliled programs are supported
- Contents of EEPROM can be read
- Contents of EEPROM can be modified
- Make sure cmake 3.0 or higher is installed on your computer
- Download the source code and open the bin folder in terminal
- cmake ../
- make
- Copy emulator to prefered location
To get futher instructions you can use ./bin/emulator --help
Usage: emulator [options] flash_file...
Options:
--help Display this information
-lifetime N Stop emulator after N ms. Default is 10
-eeprom_in Initialize EEPROM with content of
-eeprom_out Specify as file to save EEPROM in
-in Specify in CSV format as input
-out Specify in CSV format as output
-logfile Print log to , not to stdout
-logio Enable i/o log
-logint Enable interrupt log
-logall Enable log of every instruction
Please note that i/o and any logs are disabled by default
./bin/emulator ./test/1.hex -lifetime 1 -logall -logfile log.txt