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

PB Pro Mini

No, it isn't Lead, nor is it Peanut Butter.  It is the 'B' version of the prolific ATmega328P microcontroller which started all this maker craziness off! Top view of PB Pro Mini Description This is a minimal microcontroller board with only a voltage reg, crystal, I2C pull-ups, LEDs and the chip itself.  The goal here is to reduce costs while hosting the beefy 328PB! This is based on, and pin compatible with, the Arduino Pro Mini 5v/16MHz from  Sparkfun . Notable, not-so-minor improvements for the 'B' version: 2 UARTs 2 I2Cs (TWI) 2 SPI Qtouch 5 Timers (with OC, IC, and PWM) Everything else is about the same.  You should be aware the clock driver on the chip is a low-power version, but this board and crystal operate at 16MHz just fine at 5V.  The Arduino library I've been using for the PB has been working without a problem! Getting Started You'll need a FTDI Friend  or FTDI Cable  to program this as there is no seconda...

Geode LX800 cash-in

I discovered an AMD Geode processor lurking in a slim client SBC (single board computer) originally for a printer kiosk.  I wonder if I could fit a TinyGentoo  onto its 128MB compact flash card??? Introduction and overview I will utilize crossdev, and avoid any chrooting problems and mismatching CHOST/CFLAGS... Customize the target systems make.conf generated by crossdev. Compile and install packages into runtime tree. [picture of slim client and screen] >>>I'm writing this while my Gentoo system cross-compiles a i486-pc-linux-uclibc toolchain into /usr/i486-pc-linux-uclibc. There are many resources that I had to pull together to get this working: http://en.gentoo-wiki.com/wiki/Tiny_Gentoo  HOWTO guide to install a 5MB system on a USB flashdrive or similar http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml?full=1  Gentoo Embedded Handbook details cross-compiling for various dev boards http://judepereira.com/blog/going-...