Category Archives: ARM

STM32F4Discovery

ARM
STM32
STM32F4-Discovery

Getting started with the STM32F4Discovery
STM32F4Discovery: Up and running with the ARM Cortex M4
An Ethernet PHY for the STM32F107 and STM32F4
stm32plus::net, a C++ TCP/IP stack for the STM32
GitHub: andysworkshop/stm32plus

Ethernet on STM32F4DISCOVERY using external PHY

GCC

Getting Started with the STM32F4 and GCC

$ git clone git://github.com/jeremyherbert/stm32-templates.git
$ cp -r stm32-templates/stm32f4-discovery blinky

nRF24L01

Libraries:

Network Layer for RF24 Radios
maniacbug/RF24Network

ST32F4 discovery – Freetos 1.6 – HC-SR04 – DHT11
nRF24L01 library for PIC microcontrollers
AVR-Lib nRF24L01
Arduino nRF24L01
Arduino driver for nRF24L01

Tutorials:

nRF24L01 2.4GHz Radio/Wireless Transceivers How-To
RF24 library revisited
Setup Nordic nRF24L01 RF modules to both Arduino UNO and Raspberry Pi

2.4GHz RF Radio Transceivers and Library
Low-Power Wireless Sensor Node
Getting Started with nRF24L01+ on Arduino
nRF24L01+ Running on Maple
Nordic FOB and nRF24L01+
Getting Started with nRF24L01+ using a Protoshield

nRF24L01 in a star network configuration
nRF24L01+ as MultiCeiver without ACK, is it possible?

TI Stellaris LaunchPad EK-LM4F120XL

Getting Started with the Stellaris EK-LM4F120XL LaunchPad Workshop
Stellaris Cortex-M microcontrollers
Texas Instruments LaunchPad site
Third-party LaunchPad BoosterPack development site
Stellaris microcontroller forum on TI E2E
Make the Switch to TI MCUs

Connected LaunchPad Tiva C Series TM4C129
Energia

GCC Flags

mikrocontroller.net: ARM GCC
GCC ARM Options
What does it mean the d16 in fpu option of fpv4-sp-d16?
how to link GCC options to the arm MCU FPU datasheet?
GCC: unbenutzte Funktionen entfernen
Options That Control Optimization, ex. -ffunction-sections -fdata-sections to remove unused functions
Options Controlling the Preprocessor, ex. -MD to generate a dependency output file
What is the purpose of using -pedantic in GCC/G++ compiler?
Options to Request or Suppress Warnings, ex. -pedantic Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extension
What is TARGET_IS_BLIZZARD_RA1?, Blizzard is the internal TI product name for the LM4F series. This symbol will give the libraries access to the API’s in ROM.

Linker Flags

TM4C123G.ld
ARM compilation error, VPF registered used by executable, not object file

Software

Stellaris/Tiva MCUs PinMux Utility
LM Flash Programmer, GUI and Command Line
Uniflash
TivaWare
Stellaris ICDI Drivers

Mikrocontroller

CC3200, for CC3200-LAUNCHXL
TM4C123GH6PM, for EK-TM4C123GXL
TM4C1294NCPDT, for EK-TM4C1294XL

I-PEX / U.FL

Wikipedia: Hirose U.FL / IPEX
Pigtail cable, I-PEX to SMA female reverse connector
Was ist ein U.FL – Stecker/Buchse

Debug How-To (JTAG/SWD)

Stellaris LM4F120 LaunchPad Debug How To
Stellaris LaunchPad with external debugger (Pictures)
JTAG and the Stellaris Launchpad
CC31xx & CC32xx Debug Support (attach J-Link)

Black Magic Probe

Black Magic Probe for Stellaris Launchpad
Black Magic Probe

Tutorials

Regnerischer Nachmittag
Getting Started with the TI Stellaris LaunchPad on Linux
Stellaris LaunchPad Code Examples: How To Use The RGB LED For Digital Output
TI Stellaris Launchpad Test Run
Embedded Systems – Shape The World

Locked out MCU

TM4C123G Development board unable to initialize and program
Fault on TM4C123G processor
Locked out Evalbot Stellaris lm3s9b92
Tiva TM4C123G LaunchPad Blink the RGB
CLP Unbox
TM4C Error connecting to the target: (Error -1063 @ 0x0), Unresponsive Processor

Kernel Hacks – Ready, Set, Hack!

The complete tutorial for Stellaris LaunchPad development with GNU/Linux (I), 21.11.2012
The complete tutorial for Stellaris Launchpad development with GNU/Linux (II), 23.11.2012
The complete tutorial for Stellaris LaunchPad development with GNU/Linux (III), 25.11.2012

readthedocs.org

Getting Started with C/C++ Development Tools for ARMstrap Boards, Eclipse Edition

wiki.ti.com

Stellaris Launchpad with OpenOCD and Linux, 09.02.2014

openocd.sourceforge.net

GDB and OpenOCD

tincantools.com

OpenOCD Troubleshooting: Can’t Find File.cfg

$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi
$ sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
$ sudo apt-get update
$ sudo apt-get install gcc-arm-none-eabi=4-8-2014q2-0trusty10

StellarisWare Complete (all boards, all components)
Stellaris LM4F120 LaunchPad Evaluation Board Software

$ unzip SW-LM3S-9453.exe

lm4tools

$ cd ~/src/lm4tools/lm4flash
$ make
Package libusb-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusb-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusb-1.0' found
Package libusb-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusb-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusb-1.0' found
gcc -Wall  -O2 lm4flash.c  -o lm4flash
lm4flash.c:30:20: fatal error: libusb.h: No such file or directory
 #include <libusb.h>
                    ^
compilation terminated.
make: *** [lm4flash] Error 1

$ dpkg -l | grep libusb
ii  libgusb2:i386                              0.1.6-5                                     i386         GLib wrapper around libusb1
ii  libusb-0.1-4:i386                          2:0.1.12-23.3ubuntu1                        i386         userspace USB programming library
ii  libusb-1.0-0:i386                          2:1.0.17-1ubuntu2                           i386         userspace USB programming library
ii  libusb-dev                                 2:0.1.12-23.3ubuntu1                        i386         userspace USB programming library development files
ii  libusbmuxd2                                1.0.8-2ubuntu1                              i386         USB multiplexor daemon for iPhone and iPod Touch devices - library

$ grep '\.h$' /var/lib/dpkg/info/libusb-dev.list
/usr/include/usb.h

$ sudo apt-get install libusb-1.0-0-dev

Compiling against libusb-dev on Ubuntu

[167201.448216] usb 3-1: new full-speed USB device number 2 using uhci_hcd
[167201.606478] usb 3-1: New USB device found, idVendor=1cbe, idProduct=00fd
[167201.606490] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[167201.606497] usb 3-1: Product: In-Circuit Debug Interface
[167201.606503] usb 3-1: Manufacturer: Texas Instruments
[167201.606509] usb 3-1: SerialNumber: 0E1057CF
[167202.712884] cdc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
[167202.712944] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[167202.715631] usbcore: registered new interface driver cdc_acm
[167202.715635] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
$ groups
andreas adm dialout cdrom sudo dip plugdev lpadmin sambashare wireshark

$ echo 'ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", GROUP="andreas", MODE="0660"' | \
  sudo tee /etc/udev/rules.d/99-stellaris-launchpad.rules

$ sudo service udev restart
udev stop/waiting
udev start/running, process 32686

$ cd ~/src/stellaris/boards/ek-lm4f120xl/blinky/gcc
$ lm4flash blinky.bin 
Found ICDI device with serial: 0E1057CF
ICDI version: 9270

Libftdi vs FTD2XX

$ sudo apt-get install libhidapi-dev
The following NEW packages will be installed:
  libhidapi-dev libhidapi-hidraw0 libhidapi-libusb0

$ ./configure --enable-maintainer-mode --enable-ftdi --enable-stlink --enable-ti-icdi --enable-ulink --enable-usb-blaster-2 --enable-vsllink --enable-jlink --enable-osbdm --enable-opendous --enable-aice --enable-usbprog --enable-rlink --enable-armjtagew --enable-cmsis-dap --enable-jtag_vpi --enable-usb_blaster_libftdi --enable-amtjtagaccel --enable-ep93xx --enable-at91rm9200 --enable-bcm2835gpio --enable-gw16012 --enable-presto_libftdi --enable-openjtag_ftdi --enable-oocd_trace
[...]
checking whether to build a release... no
checking whether to build Doxygen as HTML... yes
checking whether to build Doxygen as PDF... no
checking whether to enable verbose JTAG I/O messages... no
checking whether to enable verbose USB I/O messages... no
checking whether to enable verbose USB communication messages... no
checking whether to enable malloc free space logging... no
checking whether to enable ZY1000 minidriver... no
checking whether to enable dummy minidriver... no
checking whether standard drivers can be built... yes
checking for LIBFTDI... no
checking for LIBFTDI... yes
checking Build & Link with libftdi...... Success
checking for libftdi highspeed device support... yes
checking for libftdi FT232H device support... yes
checking for LIBUSB1... yes
configure: libusb-1.0 header bug workaround: LIBUSB1_CFLAGS changed to "-isystem /usr/include/libusb-1.0"
checking for LIBUSB0... yes
checking for HIDAPI... no
checking for HIDAPI... yes
checking for environ in unistd.h and stdlib.h... yes
checking that generated files are newer than configure... done
[...]
OpenOCD configuration summary
--------------------------------------------------
MPSSE mode of FTDI based devices        yes
ST-Link JTAG Programmer                 yes
TI ICDI JTAG Programmer                 yes
Keil ULINK JTAG Programmer              yes
Altera USB-Blaster II Compatible        yes
Versaloon-Link JTAG Programmer          yes
Segger J-Link JTAG Programmer           yes
OSBDM (JTAG only) Programmer            yes
eStick/opendous JTAG Programmer         yes
Andes JTAG Programmer                   yes
USBProg JTAG Programmer                 yes
Raisonance RLink JTAG Programmer        yes
Olimex ARM-JTAG-EW Programmer           yes
CMSIS-DAP Compliant Debugger            yes

$ make
$ make install

$ cp /home/andreas/openocd/share/openocd/contrib/99-openocd.rules /etc/udev/rules.d

UART

UART Interrupt problem
UART Interrupt only works once (LM3S1968)

SSI / SPI

LM4F120: SPI (SSI) – interrupt receiving and transmitting
SPI example for LM4F120
Tiva Launchpad SSI Issue Need Help Please
Descripancies in ROM support for EEPROM functions
TM4C123GXL DFU USB

-DTARGET_IS_BLIZZARD_RA1
-DTARGET_IS_BLIZZARD_RB1
-DTARGET_IS_TM4C123_RB1

-DPART_TM4C123GH6PM
-DPART_LM4F120H5QR

In the latest version of TivaWare, there was a change made: TARGET_IS_BLIZZARD_RB1 is now TARGET_IS_TM4C123_RB1. 

Other Parts

LM3S9B96 (OSA)

Link error: softfp vs. hardfp

ARM compilation error, VPF registered used by executable, not object file
Can’t use hard-float with libc? (VFP register linker error)

[LD   ] bin/debug/rfid_reader.elf
arm-none-eabi-ld -T hello.ld -o bin/debug/rfid_reader.elf obj/debug/rfid_reader/startup_gcc.o obj/debug/rfid_reader/main.o obj/debug/rfid_reader/mfrc522.o obj/debug/rfid_reader/uartstdio.o -g --gc-sections -static /home/andreas/src/TivaWare/driverlib/gcc/libdriver.a /usr/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/libm.a /usr/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/lib/libc.a /usr/bin/../lib/gcc/arm-none-eabi/5.4.1/libgcc.a  
arm-none-eabi-ld: error: /home/andreas/src/TivaWare/driverlib/gcc/libdriver.a(gpio.o) uses VFP register arguments, bin/debug/rfid_reader.elf does not
arm-none-eabi-ld: failed to merge target specific data of file /home/andreas/src/TivaWare/driverlib/gcc/libdriver.a(gpio.o)