FreeBSD is a UNIX-like operating system that is similar to Linux, but has a different aim in terms of licensing and documentation.
The Arduino software can be built on FreeBSD as a port.
To install the port, log in as
root or use
su(1) to switch to the root user. Then cd to the Arduino port directory, build, and install the port:
# cd /usr/ports/devel/arduino # make install clean
Any additional ports that are needed by the Arduino port will be automatically downloaded and installed. You may have to answer some configuration option screens during this process. The best way to do that is by accepting the defaults.
For more information, see the FreeBSD Handbook.
After the port has been installed, an entry will be added to the desktop Development menu. Start the Arduino software from there, or run
arduino from the shell.
I would like to add my ten cents' worth, based on my own experiences using FreeBSD 7.3 and 8.1 and the Arduino Uno.
With the Uno it has an additional ATMel 8u2 microcontroller doing the USB in lieu of an FTDI chip. As such, it more closely follows the ACM spec (normally used by USB modems) but is not always compatible with any of FreeBSD's USB serial drivers. Fortunately I have written one that appears to work properly, which is now a part of the ports collection as 'comms/uarduno'.
A link to a web site with the driver and information is here: http://mrp3.com/uarduno.html
Additional information is also available for some of the newer USB identifiers, and I'll add more (and update the port) as they are made available to me.
As of the January 2012 ports collection, it appears that earlier IDE and configuration issues that I had reported here are now resolved, and I have been using the 1.0 IDE for Arduino development environment under FreeBSD 8.3 (stable) with unmodified versions of rxtx and avrdude, so it's all working well (thanks to developers and port maintainers for assistance in getting issues resolved). Additionally, starting with version 8.2, it appears that the ACM driver may also work with the newer Arduino and MEGA2560 boards (R3), although your mileage may vary. But if your board isn't recognized, or the serial interface doesn't function, you can always install comms/uarduno .
bobf at mrp3 dot com
(additional notes, Nov 2013, regarding use of the AVRISPmkII programmer on FreeBSD)
I recently purchased an AVRISPmkII ISP programmer (made by ATmel) so that I could work with AVR devices (and others) that use an IDP interface (rather than SPI) for the ISP header. I initially discovered that avrdude was having trouble working with it on IDP devices (such as an 'xmega'), though it seemed to be working fine with an Arduino compatible device, which uses SPI for in circuit programming. The problem was that the firmware was too old on the 'new' AVRISP programmer. I installed the latest AVR Studio on a Windows laptop and was THEN able to upgrade the firmware on the AVRISP by several revisions (which was a 1-button operation). Afterwards, avrdude worked fine and I was able to read fuses on an 'xmega' using IDP protocol. OK 'IDP' isn't directly Arduino relevant, but is VERY relevant for anyone using an AVRISPmkII to program their arduinos when it comes to needing to upgrade the firmware on the programmer.
I did not need to install any kind of driver for the AVRISPmkII since avrdude was built with libusb support. I would expect that under linux this would be very similar. The avrdude program arguments specific to using the AVRISPmkII are:
And of course the REST of the arguments should be the same as you would normally use for ISP programming. Apparently avrdude is intelligent enough to query for the AVRISPmkII device as "somewhere in usb space" so you don't have to bother with the specifics.
There are a couple of issues with respect to using avrdude with an AVRISPmkII under FreeBSD. It's worth noting that you may have to mess with some of the configuration files (or run avrdude as 'root') since libusb won't be able to access the USB device without some permission changes. However, a simple configuration change can be made to /etc/devfs.rules to correct this, by adding the following line:
add path 'usb/*' mode 660 group operator
This gives read/write access to the operator group on generic usb devices. Normally /dev/usb entries are mode 600 with root:operator ownership. Then you add whatever user you log in as (for programming arduinos) to the 'operator' group and restart your system [to make sure it all 'takes']. If you want you can run the devfs application instead, to manually add this rule to a running system, but that sort of thing is a bit beyond the scope of a small article like this. It is worth pointing out that there are always security issues when you alter permissions on devices, and giving any 'operator' read/write access to all USB devices (which includes hard drives and cameras) might pose a security threat, so practice 'safe surfing' and avoid using 'operator' group level access while surfing the internet.