Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbruhns/arduino-avr-as-template
Template project for getting started with bare metal GNU Assembler development on arduino uno
https://github.com/sbruhns/arduino-avr-as-template
arduino arduino-uno avr-assembly avr-programming gnu-assembler
Last synced: 6 days ago
JSON representation
Template project for getting started with bare metal GNU Assembler development on arduino uno
- Host: GitHub
- URL: https://github.com/sbruhns/arduino-avr-as-template
- Owner: sbruhns
- License: mit
- Created: 2022-02-09T20:14:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-09T20:44:01.000Z (almost 3 years ago)
- Last Synced: 2024-02-23T16:26:31.382Z (9 months ago)
- Topics: arduino, arduino-uno, avr-assembly, avr-programming, gnu-assembler
- Language: Assembly
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf)
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
```