Skip to main content

Atmega328PB Dev on Linux x64

The Atmega328PB is the greatest thing to come to the Arduino platform since the UNO.  Who wouldn't want more 16-bit PWMs and double all 3 serial protocols?
The new unofficial Arduino Mini PB Pro!


To get the IDE to support it, follow this guide:
https://github.com/watterott/ATmega328PB-Testing

Since the JSON file is incomplete for Linux, do the manual toolchain replacement.  This was a little tricky, and there isn't much on the internet on where the toolchain resides inside the Arduino base folder.  Here's what I did to make it work.

I downloaded the latest Arduino build, and I will refer to the extracted base directory as "arduino-1.6.9".  Also download the "hardware.zip" and the "Arduino Toolchain (4.9.2)" Linux x64 version from the github links.

1. Replace the toolchain

The builtin toolchain resides in "arduino-1.6.9/hardware/tools/avr/".  Rename the avr folder to "avr.old".  Extract the "Arduino Toolchain (4.9.2)" archive that you downloaded via the github link, into where the IDE is expecting to find it ("arduino-1.6.9/hardware/tools/avr/").  The new directory should look very similar to the old "avr.old" directory.

We need 1 Arduino-specific text file out of that old toolchain folder.  Copy "builtin_tools_versions.txt" out of "avr.old" (old toolchain) into "avr" (new toolchain), and edit the file as follows:
arduino.avrdude=6.3-arduino4
arduino.avr-gcc=4.9.2-arduino4

Or you could have just created a new text file here, with those two lines.  :)  This was my stumbling block for a good hour or two.  You'd get your build system looking for /bin/avr-g++, "fork/exec /bin/avr-g++: no such file or directory", which isn't there of course!

2. Merge in m328pb files and add avrdude-6.3

Extract the "hardware.zip" archive into the hardware directory ("arduino-1.6.9/hardware/"), merging and overwriting as you go.  This will add the atmega328pb stuff, and the updated avrdude.

Restart your IDE and you should see 3 new board definitions!  Do a quick build to test out your new toolchain!  I usually use the "Crystal Clock" at 16MHz, since I have a hardware crystal on my XTAL pins.

Now we blink!
Eagle board files for the Mini PB Pro to be posted soon.  Very much based on the Arduino Pro Mini.  I may be doing a Rev 2...

~JWilly

Comments

Popular posts from this blog

Update to USBmicroISP: 6pin and 10pin headers

Actually using my USBmicroISP with microcontrollers other than Arduino Uno's led me to fix a udev rule issue with my Gentoo Linux laptop.  I was getting Permission Denied when I was trying to use avrdude as a normal user.  Yes, my user is part of the 'uucp' group... Background Some background on the Arduino ISP connector.  It is much different than the 10-pin AVR connector... 6-pin ICSP cable pinout.  NOTE: Numbers refer to ATtiny45/85 pins, not ICSP! Arduino ISP pinout. Notice the vertical line next to pin 1, which appears in silkscreen on the PCBs. Redboard ISP pinout.  Obviously the same as UNO.  Notice pin 1 location on upper-left, with horizontal white silk. My USBmicroISP has the cables coming off the IDC differently, but the key is in the correct orientation to the pinout in the top picture! (Please disregard numbering on first picture for ICSP purposes)  Usually the key and wires are facing inward (left side on 2nd and 3rd ...

Harvey Barnstead SterileMax Retrofit

I recently did up a replacement controller PCB for a customer who was having runtime issues.  The replacement PCB and firmware exactly replaces the old 68k controller system.  It is a drop-in replacement with exactly compatible connectors, power supply, and input and output signalling. The SterileMax was a prolific autoclave, and can economically fulfill your needs. If you have this version or similar, you can use my replacement. The replacement PCB is MUCH smaller than the OEM. Replacement controller for the PC1277X1, top-side. The PCB is about 1/3 the size of the original.  It helps to not use any DIP parts. Schematic for the controller. If you're interested in this design or a slightly modified version for your sterilizer, comment below and I can hook you up. The main issue this solved was over-pressure in the chamber during a run.  The NVSRAM's battery died and it lost all the configuration data.  Once this happened the system w...

squashmount and aufs: Small footprint and high performance

Squashmount and aufs: Gentoo on tiny 4GB root! I came across a post about "squashing" certain directories on a Gentoo install (portage tree, portage db, /usr/src/, etc) much like those minimal-install-cd's use!  AuFS is an improved "union" filesystem.  I don't understand it all, but as a hardware engineer it's kinda like having a dual-port memory (I think).  Given that many of the directories I want to squash also contain many, many tiny files, mashing them all together increases performance on disk reads (supposedly). My Eee PC 901 still functioning... I was intrigued as my little netbook has its SDcard slot occupied for quite some time with a 32GB card for the /usr directory (2GB swap space as well!).  I wanted to change that.  I wanted to see if I could actually use my netbook as an " ultra-portable internet-connected enduring-battery system..." and happen to run a really snappy source distro!   The technique requires a very...