David Harrison, CEO/Design Engineer for Model Sounds Inc. 1
What is ARM? ARM is a family of instruction set architectures for computer processors based on a Reduced Instruction Set Computing (RISC) architecture developed by British company ARM Holdings arm.com ARM Holdings develops the instruction set and architecture for ARM-based products, but does not manufacture products it licenses its ARM core designs to semiconductor manufacturers such as TI, ST, Atmel, NXP, Freescale, Cypress, Renesas etc. ARM IP is in 32-bit and 64-bit RISC microprocessors and microcontrollers, graphics processors, enabling software, cell libraries, embedded memories, high-speed connectivity products, peripherals and development tools. ARM chips are ubiquitous used in everything from cell phones, tablets, cable boxes, smart meters, hard drives, routers, etc. 2
What is ARM? - continued In the early 'pre-arm' days, ARM stood for Acorn RISC Machines. Then when ARM became a separate company, ARM became Advanced RISC Machines and the modern name is just ARM. VLSI Technology produced the first ARM silicon on 26 April 1985. It worked the first time, and was known as ARM1. Three main ARM series A, M, R 3
ARM Cortex-A Series The ARM Cortex -A series of application processors provide a range of solutions for devices undertaking complex compute tasks, such as hosting a rich Operating System (OS) platform, executing a user interface and supporting software applications. Cortex-A series processors can be found in a range of the highest performing consumer devices, including a spectrum of smartphones from ultra-low-cost to high-end flagship devices, mobile computing platforms, digital TVs, and set-top boxes, but can also be found in enterprise networking, printers and server solutions. 4
ARM Cortex-R Series The ARM Cortex -R real-time processors offer high-performance computing solutions for embedded systems where reliability, high availability, fault tolerance, maintainability and real-time responses are required. There are many applications requiring the key Cortex-R series attributes of : High performance: Fast processing combined with a high clock frequency Real-time: Processing meets hard real-time constraints on all occasions Safe: Dependable, reliable systems with high error resistance Cost effective: Features for optimal performance, power and area. 5
ARM Cortex-M Series The Cortex-M family is optimized for embedded MCU use in cost and power sensitive MCU and mixed-signal devices for applications such as Internet of Things, connectivity, smart metering, human interface devices, automotive and industrial control systems, domestic household appliances, consumer products and medical instrumentation. And the Hobbyist s favourite series! However, ARM microcontroller chips are not the cheapest e.g. Microchip PIC32 (MIPS M4K architecture) chips with equivalent functionality/memory are less expensive. 6
ARM Technology Partners ARM Holdings has over 175 technology partners. A few are shown below. 7
ARM Microcontroller IDE s/compilers Is very difficult for hobbyists to get decent ARM development tools. Atmel provides Atmel Studio 6 IDE with C/C++ compiler suite free of charge fully functional, not crippled. Is based on MS Visual Studio Windows only. Microchip provides MPLABX IDE free of charge. Is based on NetBeans IDE. Compilers are separate free ones do not support code optimization. Licensed version costs USD$900. None of the ARM microcontroller manufacturers provide any free tools. They simply refer you to third part IDE/compiler vendors such as : IAR, Atollic TrueStudio, Keil MDK etc. These vendors do not publish prices you have to apply for a quote on-line! - E.G. Attollic TrueStudio USD$2795!! 8
Available Free Open Source IDE s Eclipse http://eclipse.org. Java based, originally intended for Java development but has extensions for C/C++ and other languages, e.g. PHP for Web development. Eclipse is a generic modern IDE only it has to be integrated with a C/C++ compiler toolset. NetBeans https://netbeans.org. Also Java based, originally intended for Java development but has extensions for C/C++ development. NetBeans IDE is the official IDE for Java 8. NetBeans is a generic modern IDE only it has to be integrated with a C/C++ compiler toolset. 9
Almost Free Open Source IDE s Atollic TrueSTUDIO for ARM Lite v5.2.1 Stripped down version of their TrueSTUDIO Professional. Has a 32KByte firmware size limit. Keil MDK ARM Lite Stripped down version of their MDK ARM Professional. Has a 32KByte firmware size limit. Microsoft Visual Studio Community Edition 2013 http://go.microsoft.com/fwlink/?linkid=517284 then add VisualGDB from Sysprogs VisualGDB embedded edition is USD$89.00 MicroElektronika (Belgrade, Serbia) ARM Integrated IDE/C Compiler USD$299, MikroProg ARM programmer USD$49 10
ARM Development Tools Setup Process Since both Eclipse and NetBeans are Java based you must have Java installed FIRST - suggest you get the latest version from java.com. NOTE : You need the JDK (Java Development Kit, not just the JRE) Install the IDE of your choice. Install the GNU Compiler toolchain for ARM Embedded. Integrate the IDE with the Compiler toolchain and possibly GDB for live debugging capability. 11
Installing Java Development Kit (JDK NOT JRE) Get latest Java build from Oracle's official JDK Web site: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp- 138363.html#javasejdk 12
Installing Eclipse CDT for C/C++ Download Eclipse CDT package for C/C++ (NOT Eclipse Standard Edition) http://eclipse.org/downloads/packages/eclipse-ide-cc-developers/lunasr1 13
Getting GNU Tools for ARM Embedded http://gnuarmeclipse.livius.net/blog/tag/gnu-tools-for-embedded/ 14
Getting GNU Tools for ARM Embedded https://launchpad.net/gcc-arm-embedded 15
Installing GNU Tools for ARM Embedded For Windows : gcc-arm-none-eabi-4_9-2014q4-20141203-win32.exe For Linux : gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.tar For MAC OS : gcc-arm-none-eabi-4_9-2014q4-20141203-mac.tar.tar Install for your own OS 16
Eclipse Welcome Page 17
Your First Eclipse ARM C Project - 1 18
Your First Eclipse ARM C Project - 2 19
Your First Eclipse ARM C Project - 3 Cortex Microcontroller Software Interface Standard (CMSIS) 20
Your First Eclipse ARM C Project - 4 21
Your First Eclipse ARM C Project - 5 22
Setting Eclipse ARM Internal Builder 23
Building the ARM Project-1 24
Building the ARM Project-2 25
Obtaining ST-LINK Utility to Program the ST STM32F3Discovery Kit http://www.st.com/web/en/catalog/tools/fm147/sc1887/pf258168?s_searchtype=k eyword# 26
Install ST-LINK Utility to Program the Kit ST-LINK Utility is Windows only GUI for ST s ST-LINK programming tool STM32 ST-LINK Utility_v3.5.exe 27
Connect ST-LINK Utility to the Kit 28
ST-LINK Utility Connected to the Kit 29
Opening the Hex Firmware file to Program 30
Programming the Hex Firmware File to Target Kit 31