vavr
avr mcu vlang 

所属分类:单片机开发
开发工具:V
文件大小:0KB
下载次数:0
上传日期:2022-06-14 21:57:45
上 传 者sh-1993
说明:  MCU的实验PoC裸金属V编程,
(Experimental PoC baremetal V programming for MCUs,)

文件列表:
Dockerfile (234, 2022-06-12)
LICENSE (1070, 2022-06-12)
Makefile (616, 2022-06-12)
src/ (0, 2022-06-12)
src/entrypoint.v (374, 2022-06-12)
src/firmware.v (305, 2022-06-12)
src/uart.v (655, 2022-06-12)

# vAVR Experimental Arduino firmware made in V. This is a proof of concept for making an AVR firmware using V. This repo contains a simple example of a led blinking using an Arduino Uno as a base platform (based on Atmel AT368p) with the Atmel/Microchip avr libs. ## Build Dependencies: ``` gcc-avr binutils-avr avr-libc avrdude v ``` Using Docker with the provided Dockerfile (contains GCC AVR and V): ```bash docker build -f Dockerfile -t vavr:latest . # Spawn a shell docker run -it --volume=$(pwd):/opt/vavr --workdir=/opt/vavr --rm vavr # Build the firmware make ``` You can then upload the program to a real Arduino Uno using AVR dude: ``` avrdude -F -V -c arduino -p ATMEGA328P -P THE/PATH/OF/ARDUINO -b 115200 -U flash:w:firmware.hex ``` ## Further improvements As this demo is a proof of concept, it may or may not be turned into a viable alternative to make firmware for MCUs. Nonetheless, it can be improved for example: - Find a more generic way to handle MCUs - A static (malloc removed) core library - Make a wrapper for more popular libc such as Newlib - Make a safe V interface for doing tasks on the MCU (Serial/I2C/SPI) ## Licence This work is licensed under the MIT License. See `LICENSE`for more details

近期下载者

相关文件


收藏者