資料介紹
軟件簡介
simavr - a lean and mean Atmel AVR simulator for linux
simavr is a new AVR simulator for linux, or any platform that uses avr-gcc. It uses avr-gcc's own register definition to simplify creating new targets for supported AVR devices. The core was made to be small and compact, and hackable so allow quick prototyping of an AVR project. The AVR core is now stable for use with parts with <= 128KB flash, and with preliminary support for the bigger parts. The simulator loads ELF files directly, and there is even a way to specify simulation parameters directly in the emulated code using an .elf section. You can also load multipart HEX files.
Installation
On OSX, we recommend using homebrew:
On Ubuntu, SimAVR is available in the Bionic package source:
apt-get install simavr
(Note that the command is made available under the name simavr
not run_avr
.)
Otherwise, make
is enough to just start using bin/simavr. To install the simavr command system-wide, make install RELEASE=1
.
Supported IOs
- eeprom
- watchdog
- IO ports (including pin interrupts)
- Timers, 8 &16 (Normal, CTC and Fast PWM, the overflow interrupt too)
- The UART, including tx & rx interrupts (there is a loopback/local echo test mode too)
- SPI, master/slave including the interrupt
- i2c Master & Slave
- External Interrupts, INT0 and so on.
- ADC
- Self-programming (ie bootloaders!)
Emulated Cores (very easy to add new ones!)
- ATMega2560
- AT90USB162 (with USB!)
- ATMega1281
- ATMega1280
- ATMega128
- ATMega128rf1
- ATMega16M1
- ATMega169
- ATMega162
- ATMega164/324/644
- ATMega48/88/168/328
- ATMega8/16/32
- ATTiny25/45/85
- ATTIny44/84
- ATTiny2313/2313v
- ATTiny13/13a
Extras:
- fully working gdb support including some pretty cool “passive modes”.
- There is also very easy support for “VCD” (Value Change Dump) that can be visualized graphically as “waveforms” with tools like gtkwave (see below).
- There are a few examples of real life firmwares running on simavr, including OpenGL rendering of the display…
- There is support for Arduino, but no IDE integration
Documentation And Further Information
- Manual / Developer Guide: https://github.com/buserror-uk/simavr/blob/master/doc/manual/manual.pdf?raw=true
- Examples: https://github.com/buserror-uk/simavr/tree/master/examples
- Mailing List: http://groups.google.com/group/simavr
- IRC: #simavr on Freenode
Contributing
Patches are always welcome! Please submit your changes via Github pull requests.
VCD Support -- built in logic analyzer
simavr can output most of its pins, firmware variables, interrupts and a few other things as signals to be dumped into a file that can be plotted using gtkwave for further, precise analysis. A firmware can contain instructions for simavr to know what to trace, and the file is automatically generated. Example:
const struct avr_mmcu_vcd_trace_t _mytrace[] _MMCU_ = {
{ AVR_MCU_VCD_SYMBOL("UDR0"), .what = (void*)&UDR0, },
{ AVR_MCU_VCD_SYMBOL("UDRE0"), .mask = (1 << UDRE0), .what = (void*)&UCSR0A, },
};
Will tell simavr to generate a trace everytime the UDR0 register changes and everytime the interrupt is raised (in UCSR0A). The MMCU tag tells gcc that it needs compiling, but it won't be linked in your program, so it takes literally zero bytes, this is a code section that is private to simavr, it's free! A program running with these instructions and writing to the serial port will generate a file that will display:
$ ./simavr/run_avr tests/atmega88_example.axf
AVR_MMCU_TAG_VCD_TRACE 00c6:00 - UDR0
AVR_MMCU_TAG_VCD_TRACE 00c0:20 - UDRE0
Loaded 1780 .text
Loaded 114 .data
Loaded 4 .eeprom
Starting atmega88 - flashend 1fff ramend 04ff e2end 01ff
atmega88 init
avr_eeprom_ioctl: AVR_IOCTL_EEPROM_SET Loaded 4 at offset 0
Creating VCD trace file 'gtkwave_trace.vcd'
Read from eeprom 0xdeadbeef -- should be 0xdeadbeef..
Read from eeprom 0xcafef00d -- should be 0xcafef00d..
simavr: sleeping with interrupts off, quitting gracefully
And when the file is loaded in gtkwave, you see:
You get a very precise timing breakdown of any change that you add to the trace, down to the AVR cycle.
Example:
simavr is really made to be the center for emulating your own AVR projects, not just a debugger, but also the emulating the peripherals you will use in your firmware, so you can test and develop offline, and now and then try it on the hardware.
You can also use simavr to do test units on your shipping firmware to validate it before you ship a new version, to prevent regressions or mistakes.
simavr has a few 'complete projects/ that demonstrate this, most of them were made using real hardware at some point, and the firmware binary is exactly the one that ran on the hardware. The key here is to emulate the parts or peripherals that are hooked to the AVR. Of course, you don't have to emulate the full hardware, you just need to generate the proper stimulus so that the AVR is fooled.
HD44780 LCD Board Demo
This example board hooks up an Atmega48 to an emulated HD44780 LCD and display a running counter in the 'lcd'. Everything is emulated, the firmware runs exactly like this on a real hardware.
And this is a gtkwave trace of what the firmware is doing. You can zoom in, measure, etc in gtkwave, select trades to see etc.
Quite a few other examples are available!
- Atmel發布AVR XMEGA評測工具套件
- labview軸心軌跡模擬器軸心軌跡分析 33次下載
- AVR教程---模擬比較器和ADC接口
- 基于DSP的電磁脈沖模擬器控制系統設計方案 13次下載
- ADSIM模擬器
- 如何使用MATLAB RTW和Vxworks實現飛行模擬器的實時仿真 6次下載
- Atmel studio 6.2軟件下載 289次下載
- Atmel AVR1923用戶指南 5次下載
- Atmel AVR1935入門指南 3次下載
- Atmel AVR 單片機上網方案 6次下載
- AVR精簡學習板 0次下載
- Atmel愛特梅爾AVR微控制器簡介
- Atmel 90系列AVR單片機燒錄器
- Atmel AVR 單片機上網方案
- 汽車駕駛模擬器新一代實時場景系統的開發
- DC/DC模擬器的特征和使用方法 381次閱讀
- 使用Netropy廣域網模擬器測試簡化SD-WAN測試 396次閱讀
- 華為eNSP模擬器安裝教程 2717次閱讀
- 華為新版模擬器eNSP Lite 5692次閱讀
- 華為新版模擬器eNSP Lite安裝攻略 6675次閱讀
- 如何對PNET 模擬器進行初始化安裝 1755次閱讀
- HarmonyOS本地模擬器的版本演進與使用方法 6017次閱讀
- 微雪電子USB AVR JTAG ICE XPII下載器簡介 4042次閱讀
- 基于步進電機和單片機的航海羅經模擬器方案設計淺析 1010次閱讀
- 基于QEMU系統模擬器Xilinx/QEMU的運行與調試 8886次閱讀
- 基于TL431的電動汽車多節串聯鋰電池模擬器 7262次閱讀
- 一種基于FPGA嵌入式系統的雷達信號模擬器的實現 2601次閱讀
- AVR單片機的主要特性 895次閱讀
- AVR單片機有什么優點_為什么要選擇AVR單片機 2420次閱讀
- 基于FPGA的飛行模擬器通信接口設計 2598次閱讀
下載排行
本周
- 1山景DSP芯片AP8248A2數據手冊
- 1.06 MB | 532次下載 | 免費
- 2RK3399完整板原理圖(支持平板,盒子VR)
- 3.28 MB | 339次下載 | 免費
- 3TC358743XBG評估板參考手冊
- 1.36 MB | 330次下載 | 免費
- 4DFM軟件使用教程
- 0.84 MB | 295次下載 | 免費
- 5元宇宙深度解析—未來的未來-風口還是泡沫
- 6.40 MB | 227次下載 | 免費
- 6迪文DGUS開發指南
- 31.67 MB | 194次下載 | 免費
- 7元宇宙底層硬件系列報告
- 13.42 MB | 182次下載 | 免費
- 8FP5207XR-G1中文應用手冊
- 1.09 MB | 178次下載 | 免費
本月
- 1OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234315次下載 | 免費
- 2555集成電路應用800例(新編版)
- 0.00 MB | 33566次下載 | 免費
- 3接口電路圖大全
- 未知 | 30323次下載 | 免費
- 4開關電源設計實例指南
- 未知 | 21549次下載 | 免費
- 5電氣工程師手冊免費下載(新編第二版pdf電子書)
- 0.00 MB | 15349次下載 | 免費
- 6數字電路基礎pdf(下載)
- 未知 | 13750次下載 | 免費
- 7電子制作實例集錦 下載
- 未知 | 8113次下載 | 免費
- 8《LED驅動電路設計》 溫德爾著
- 0.00 MB | 6656次下載 | 免費
總榜
- 1matlab軟件下載入口
- 未知 | 935054次下載 | 免費
- 2protel99se軟件下載(可英文版轉中文版)
- 78.1 MB | 537798次下載 | 免費
- 3MATLAB 7.1 下載 (含軟件介紹)
- 未知 | 420027次下載 | 免費
- 4OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234315次下載 | 免費
- 5Altium DXP2002下載入口
- 未知 | 233046次下載 | 免費
- 6電路仿真軟件multisim 10.0免費下載
- 340992 | 191187次下載 | 免費
- 7十天學會AVR單片機與C語言視頻教程 下載
- 158M | 183279次下載 | 免費
- 8proe5.0野火版下載(中文版免費下載)
- 未知 | 138040次下載 | 免費
評論
查看更多