Skip to content

Template project for getting started with bare metal GNU Assembler development on arduino uno

License

Notifications You must be signed in to change notification settings

sbruhns/arduino-avr-as-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arduino-avr-as-template

Basic template for getting started with bare metal GNU Assembler development on arduino uno

Build main.hex from main.s

make build

Flash main.hex to arduino uno

make sure to update the port the arduino uno is attached to your system in the Makefile in that line:

PROGRAMMER = -v -patmega328p -carduino -P/dev/cu.usbmodem142201 -b115200 -D

Run:

make flash

build and flash

make

Accessing Registers

Registers like PORTB, DDRB ... are mapped to the beginning of the memory the adresses can be found in the datasheet

main.s contains some example on accessing the PORTB to make the onboard pin blink

; register memory mapping (check datasheet)
.equiv PORTB, 0x05
.equiv DDRB, 0x04
.equiv PINB, 0x03

...

out PORTB,r16

About

Template project for getting started with bare metal GNU Assembler development on arduino uno

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published