Skip to content

andrew-canaday/avr128dx-avr-gcc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barebones AVR128Dx avr-gcc Project

This is a basic skeleton for programming the AVR128Dx series MCUs using avr-gcc. (If you use Arduino, see the comprehensive DxCore, instead).

  1. Install prerequisites
  2. Download the appropriate Microchip "ATPACK" for your MCU
  3. make help ; make vars

ℹ️ Don't have a programmer? Neither did I! If you have a spare mcu with USB serial facilities, you can make your own with a single passive component and a handful of jumper wires in minutes! See doc/PROGRAMMER.md for more info.

I tossed this together in a rush. If you run into issues, feel free to create an issue or PR a fix. Thanks!

Prerequisites

Instructions

  1. Install the prerequisites (Mac: brew install avr-gcc make ; pip3 install pymcuprog)
  2. Download the appropriate Microchip "ATPACK" for your MCU.
  3. Extract the atpack (it's a zip file), e.g. unzip /path/to/Atmel.AVR-Dx_DFP.2.2.253.atpack -d /path/to/Atmel.AVR-Dx_DFP.2.2.253_atpack

Then:

ATPACK="/path/to/Atmel.AVR-Dx_DFP.2.2.253_atpack" \
USBDEVICE="/dev/tty.usb<whatever>" \
make upload

Usage

The ATPACK and USBDEVICE environment variables are required. The default architecture is avr128da28 (because that's what I have on hand). You can change this using the DEVICE environment variable.

  • make help for target information.
  • make vars for env variables.

Wait.."atpack"?

⚠️ If your avr-gcc is built with avr128dx support, skip the atpack stuff and delete any lines that contain ATPACK from the Makefile.

See Supporting "unsupported" Devices in the avr-gcc Wiki for more info.

About

Basic make + avr-gcc project skeleton for AVR128Dx MCU's

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published