OpenMRN on Ubuntu 16.04LTS, 64-bit for Tiva TM4C123GXL

•2016/07/22 • Comments Off on OpenMRN on Ubuntu 16.04LTS, 64-bit for Tiva TM4C123GXL

So you just installed Ubuntu 16.04 LTS, 64-bit desktop on a computer and received your Tiva TM4C123GXL ($12.99) in the mail. When you plug your Tiva in, you’ll get a device at /dev/ttyACM0 (and lsusb might show: Bus 00x Device 00x: ID 1cbe:00fd Luminary Micro Inc. In-Circuit Debug Interface)

Back to the OS:

sudo apt-get update
sudo apt-get upgrade

(I also like to use emacs and ssh, so:

sudo apt-get install emacs openssh-server)

(usually a good idea to restart, press Ctrl-Alt-F1 and login to notice the “*** System restart required ***”, or ssh in and get the same notice. )

(and you could also install JMRI and Java, but I’ll do that in a bit, Tiva first)

sudo apt-get install git

(now we create a folder in place we like, like /home/me/prj/LCC)

mkdir -p ~/prj/LCC

(and go there)

cd ~/prj/LCC

(then clone the repository)

git clone

(to see what I got, I change over to the openmrn folder and typed make, just making sure git got something!)

cd ~/prj/LCC/openmrn

(and things will compile using g++ ending with some error like:

* Unable to build for freertos.armv7m, missing dependencies: HAVE_MBED FREERTOSPATH TOOLPATH

~/prj/LCC/openmrn/bin$ sudo ./

(This will download and might install tools like:







SW-TM4C-   <– oops, wait, you need to log into the Ti website and agree to the expert restrictions to get this file! See the instructions following this.

etc., etc.)

cd /opt/gmock/default
 sudo ./configure
 sudo make

(Ti needs to make sure you won’t use the software for bad things, so head over to the Tiva software page at and agree and download the “Full Release” TivaWare for TM4C Series. Today it was version SW-TM4C-! Once you have the 170MB file in your Downloads folder, do:  )

cd ~/Downloads/
export INSTALL_DIR="/opt"
sudo mkdir -p  $INSTALL_DIR/ti/TivaWaresudo unzip -d 
cd $INSTALL_DIR/ti/TivaWare
sudo rm -f default
sudo ln -s SW-TM4C- default

(and while we are installing things related to hardware, get at least the version 0.9.0 of openocd, some notes here🙂

me@M:~$ sudo apt-get install openocd

me@M:~$ openocd --version
Open On-Chip Debugger 0.9.0 (2015-09-02-10:42)
Licensed under GNU GPL v2

(now, clean up a bit)

sudo apt-get autoremove

(then install some more, might not need everything here, but I am trying from a year ago…)

sudo apt-get install autoconf texinfo gksu 
sudo apt-get install python-software-properties
sudo apt-get install lib32ncurses5 lib32z1 
sudo apt-get install libncurses5-dev
sudo apt-get install libncurses5:i386
sudo apt-get install libgmp3-dev libmpfr-dev zlib1g-dev libtool libmpc-dev
sudo apt-get install build-essential flex bison 
sudo apt-get install python-yaml
sudo apt-get install libftdi-dev libftdi1 libusb-dev

(and set the path (don’t use a ‘~’, put the real folder in there))

export OPENMRNPATH=”/home/you/prj/LCC/openmrn” (the following compiles and runs, but it is a local app:)


Listening on port 12021, fd 3

( With the Tivaware installed from Ti manually, you would see the following at end of a make in the ~/prj/LCC/openmrn/applications/blink_raw/targets/freertos.armv7m.ti-launchpad-lm4f120xl folder:)

/opt/armgcc/default/bin/arm-none-eabi-size blink_raw.elf
 text data bss dec hex filename
 39248 240 2084 41572 a264 blink_raw.elf
 /opt/armgcc/default/bin/arm-none-eabi-objdump -C -d -h blink_raw.elf > blink_raw.lst
  freertos.armv7m.ti-launchpad-lm4f120xl$ ls -l
 total 2184
 -rwxrwxr-x 1 me me 894020 Jul 22 07:46 blink_raw.elf

(similar success in the Clinic application folder:)

 text data bss dec hex filename
 39552 240 2132 41924 a3c4 clinic_app.elf
/opt/armgcc/default/bin/arm-none-eabi-objdump -C -d 
  -h clinic_app.elf > clinic_app.lst

(and now you should also be able to “flash” it using openocd:)

  make -j flash

(if you get an error like this, make sure the ‘default’ link points to something valid, like in “/opt/ti/TivaWare/” default -> SW-TM4C-

* Unable to build for freertos.armv7m, missing 
dependencies: TIVAWAREPATH *

(or you set the TIVAWAREPATH manually (don’t):)

 /freertos.armv7m.ek-tm4c123gxl/HwInit.cxx:37:26: fatal error: inc/hw_types.h: No such file or directory  #include "inc/hw_types.h"  ^ compilation terminated. /home/gert/prj/LCC/openmrn/etc/ recipe for target 'HwInit.o' failed make: *** [HwInit.o] Error 1

(if you get an error like this, take the ‘~’ from the OPENMRNPATH:)

~/prj/LCC/openmrn/applications/blink_raw/main.cxx:38:19: fatal error: os/os.h: No such file or directory  #include "os/os.h"  ^ compilation terminated.

Now for some Serial port interaction:

sudo apt-get install minicom wvdial

Pi Zero time…

•2016/07/03 • Comments Off on Pi Zero time…

Well, when you load NOOBS Lite, you don’t have Ethernet to continue…and when you try to move the real NOOBS over back in Windows, your partition tables are all wacko…so follow this to unconfuze Windoze:

More to follow, need to get a mouse or keyboard connected first.

Note to others, it uses an HDMI Mini (cable $7 at Walmart and the power micro USB cable goes to J1, furthest away from the HDMI connector. )

Another note, no LEDs turn on if there is not an SD Card in the slot!

AWESOME, we are editing this from the Pi Zero!

Note, when you load the full NOOB on the SDCARD, you can use an OTG USB cable with a keyboard connected to get Raspbian to install, but after it boots, no more OTG USB action UNTIL you put a powered USB hub inbetween. Not even a tiny dongle to make a RT-MWK01 (wireless keyboard and touchpad) to work.

But, once you have a power hub in the way, you can simply pop a Linksys WUSB54GSC in, and then you have WiFi too!

Here is the cpuinfo:

pi@raspberrypi:~ $ cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 997.08
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2708
Revision : 900093
Serial : 00000000xxxxyyyy

And then for the ALWAYS the HARDEST part, what to do with this new gadget?!?

Maybe a hidden camera somewhere on a model railroad, or a “how full is the lake” sensor 10 km away on the ranch?

Ubuntu gets Chrome, the Google one

•2015/10/16 • Comments Off on Ubuntu gets Chrome, the Google one

sudo dpkg -i google-chrome-stable_current_amd64.deb
apt-get install -f

Useful tools around 2015!

•2015/07/28 • Comments Off on Useful tools around 2015!

Windows 7, 64-bit:

The beginning of the Railroad Arduino Clinic …

•2015/05/25 • Comments Off on The beginning of the Railroad Arduino Clinic …

A collection of things to show people in the railroad community…or, just a place to gather cool Arduino links…

2010 Video

Arduino Gate not in a .ino Sketch format, but we converted that into one. Little Bits version.

Traffic light

Train control

OpenDCCDCC et al, DCC monitor, RailStars, Controller (Cmd Station and Booster), use the Arduino Mini

LCC (NMRAnet, OpenLCB): RailStars’ Io:duino


My favorite EE parts…

•2015/01/07 • Comments Off on My favorite EE parts…

SSL-LX3059IGW    Common Cathode, LED 3MM RED/GRN WHT DIFF BICOLOR. datasheet

1 0.57000 0.57
10 0.41200 4.12
100 0.26880 26.88

Or Mouser has the Common Anode version, SSL-LX3059IGW-CA for $0.18! datasheet


SML-LX0603SYW-TR Yellow



Conductive Epoxy: Silver, Chemtroncis CW2400

FTDI and Windows…

•2015/01/06 • Comments Off on FTDI and Windows…

Well, well, well…

Who do we blame, Windows, FTDI or the guys who made all the fake chips. FTDI got its drivers to modify the PIDs of fake chips to 0000 and Windows got to install these drivers by special decree?

I was happily programming my Arduino boards until the Windows Update came along, and no, I am not re-installing Windows 7, ever again, it will accidentally look a lot like Ubuntu when that happens!!!

So a few screenshots to get the 2.12 driver to work in Windows 7, but note that your USB chip still has a PID of 0x0000 now. There could be some other tool on the web to fix that.

Update the driver from Right Click “My Computer”, Manage, Device Manager and Right Click the Yellow Exclamation Device, then Update Driver:


Browse my computer for driver software:


And don’t use the Browse part at the top, but the “Let me pick from a list” at the bottom:008

Have Disk… and point to the .inf file (first for the converter and then the serial port if needed):

[I simply renamed the downloaded .exe from FTDI to a .zip and dragged the folders into another folder]


But remember, you still have wacky PID_0000 in your device, so you might want to fix that too:005


So, the correct thing to do, would be to buy a product containing a real FTDI chip next time (but how would you know, the packaging on the Arduino programmer at Microcenter did not say “might contain…”, and it was working fine for 11 months, they only have a 30 day return policy) and then plug it into your Ubuntu computer!