31
Getting Started with ARM Microcontroller Development David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

Embed Size (px)

Citation preview

Page 1: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

1

Getting Started with ARM Microcontroller

Development

David Harrison, CEO/Design Engineer for Model Sounds Inc.

Page 2: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

2

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.

David Harrison – January 21, 2015

Page 3: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

3

What is ARM? - continuedIn 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

David Harrison – January 21, 2015

Page 4: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

4

ARM Cortex-A SeriesThe 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.

David Harrison – January 21, 2015

Page 5: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

5

ARM Cortex-R SeriesThe 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.

David Harrison – January 21, 2015

Page 6: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

6

ARM Cortex-M SeriesThe 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!

David Harrison – January 21, 2015

Page 7: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

7

ARM Technology PartnersARM Holdings has over 175 technology partners.

A few are shown below.

David Harrison – January 21, 2015

Page 8: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

8

ARM Microcontroller IDE’s/CompilersIs 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!!

David Harrison – January 21, 2015

Page 9: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

9

Available Free Open Source IDE’sEclipse – 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.

David Harrison – January 21, 2015

Page 10: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

10

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=517284then 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

David Harrison – January 21, 2015

Page 11: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

11

ARM Development Tools Setup ProcessSince 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.

David Harrison – January 21, 2015

Page 12: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

12

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

Page 13: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

13

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

David Harrison – January 21, 2015

Page 14: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

14

http://gnuarmeclipse.livius.net/blog/tag/gnu-tools-for-embedded/Getting GNU Tools for ARM Embedded …

David Harrison – January 21, 2015

Page 15: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

15

https://launchpad.net/gcc-arm-embeddedGetting GNU Tools for ARM Embedded

David Harrison – January 21, 2015

Page 16: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

16

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

Installing GNU Tools for ARM Embedded

David Harrison – January 21, 2015

Page 17: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

17

Eclipse Welcome Page

David Harrison – January 21, 2015

Page 18: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

18

Your First Eclipse ARM C Project - 1

David Harrison – January 21, 2015

Page 19: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

19

Your First Eclipse ARM C Project - 2

David Harrison – January 21, 2015

Page 20: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

20

Your First Eclipse ARM C Project - 3

David Harrison – January 21, 2015

Cortex Microcontroller Software Interface Standard (CMSIS)

Page 21: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

21

Your First Eclipse ARM C Project - 4

David Harrison – January 21, 2015

Page 22: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

22

Your First Eclipse ARM C Project - 5

David Harrison – January 21, 2015

Page 23: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

23

Setting Eclipse ARM Internal Builder

David Harrison – January 21, 2015

Page 24: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

24

Building the ARM Project-1

David Harrison – January 21, 2015

Page 25: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

25

Building the ARM Project-2

David Harrison – January 21, 2015

Page 27: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

27

Install ST-LINK Utility to Program the Kit

David Harrison – January 21, 2015

ST-LINK Utility is Windows only GUI for ST’s ST-LINK programming toolSTM32 ST-LINK Utility_v3.5.exe

Page 28: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

28

Connect ST-LINK Utility to the Kit

David Harrison – January 21, 2015

Page 29: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

29

ST-LINK Utility Connected to the Kit

David Harrison – January 21, 2015

Page 30: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

30

Opening the Hex Firmware file to Program

David Harrison – January 21, 2015

Page 31: David Harrison, CEO/Design Engineer for Model Sounds Inc. 1

31

Programming the Hex Firmware File to Target Kit

David Harrison – January 21, 2015