Showing posts with label avr. Show all posts
Showing posts with label avr. Show all posts

Tuesday, October 23, 2018

Atmega328pb



# Download DFP from  http://packs.download.atmel.com/
 (e.g. Atmel.ATmega_DFP.1.0.86.atpack)
# Unzip .atpack to packs directory (/home/packs/)
# Invoke avr-gcc with additional option -B to tell gcc where to look for device specific information. Add device header include path using -I option.
e.g. avr-gcc -mmcu=atmega328pb -B /home/packs/Atmel.ATmega_DFP.1.0.86/gcc/dev/atmega328pb/ -I /home/packs/Atmel.ATmega_DFP.1.0.86/include/


add the following to /etc/avrdude.conf

#------------------------------------------------------------
# ATmega328pb
#------------------------------------------------------------

part parent "m328"
    id                  = "m328pb";
    desc                = "ATmega328PB";
    signature           = 0x1e 0x95 0x16;

    ocdrev              = 1;
        
    memory "efuse"
                size = 1;
                min_write_delay = 4500;
                max_write_delay = 4500;
                read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
                           "x x x x x x x x o o o o o o o o";

                write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
                                "x x x x x x x x x x x x i i i i";
    ;
        
;





source:http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.5.4/
http://lists.gnu.org/archive/html/avrdude-dev/2016-06/msg00010.html

Sunday, July 1, 2018

Arduino bootloader

As of arduino-1.8.5 the bootloader used for arduino uno (as specified in boards.txt uno.bootloader.file=optiboot/optiboot_atmega328.hex) is optiboot

The file location is
~/.arduino15/packages/arduino/hardware/avr/1.6.19/bootloaders/optiboot/

The Makefile uses -mshort-calls which is not defined anymore as of avr-gcc 4.8.2.
Use -mrelax instead

Connections:
https://www.arduino.cc/en/Tutorial/ArduinoISP

Sources:

https://www.avrfreaks.net/forum/where-has-mshort-calls-compiler-option-gone