Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to the ARM mbed Platform– A Hands-on Course

Similar presentations


Presentation on theme: "Introduction to the ARM mbed Platform– A Hands-on Course"— Presentation transcript:

1 Introduction to the ARM mbed Platform– A Hands-on Course
Class 5: Porting mbed January 13, 2017 Charles J. Lord, PE President, Consultant, Trainer Blue Ridge Advanced Design and Automation

2 This Week’s Agenda 1/9 Peeking Under the mbed Hood 1/10 CMSIS, Hands-On 1/11 mbed Communications and Multitasking 1/12 The mbed Developer Network 1/13 Porting mbed

3 This Week’s Agenda 1/9 Peeking Under the mbed Hood 1/10 CMSIS, Hands-On 1/11 mbed Communications and Multitasking 1/12 The mbed Developer Network 1/13 Porting mbed

4 Putting mbed on Your Hardware
As we have seen, once we pick our chosen Cortex-based development board from the mbed ‘catalog’, all of the necessary HAL and define files are automatically loaded BUT – what about putting mbed 5.2 on our OWN hardware design?

5 Four Basic Porting Paths
Incorporate an existing demo or development board into your board (the CAD files are often provided for this purpose) Modify I/O pin definitions as needed Using the HAL and class files from a similar board, manually change each definition from the demo board to your hardware. ** NOT recommended **

6 Four Basic Porting Paths
Use the yotta scripting tool to load in an existing board (“target”) and use the Targets “inherits” and “similarTo” functions to define the new properties. Use the new mbed HDK (hardware development kit) to create the HAL layer from the schematic.

7 Our Challenge An industrial controller (vending machine) that is based on the K64 chip For simplicity, we will use the same variant and package as used on the FRDM board The circuit has many I/O to read sensors and control motors and solenoids We don’t use the accelerometer or other features of the FRDM board

8 Other Factors Our client / customer has specified a form factor for the product that precludes us using the FRDM board with shields (or other daughter boards) We will also have a remote character LCD and buttons for user interface (no GUI) We wish to use the features of mbed 5.2

9 Path 1 - Incorporation We are fortunate to have access to the hardware design of the FRDM-K64 board from the NXP website A search at nxp.com for “FRDM-K64F schematic” turned up many PDF files and one zip…

10 Design Files

11 Unzip

12 Readme – the files are OrCad

13 Next Steps Depending on our in-house EDA program, we may need to convert the files or just work in OrCad / Allegro to design our hardware We need to manually document every pin use change We will then modify the classes that affect those pins (search tool in IDE can be very helpful!)

14 Path 2 – Write From Scratch
Start with the closest existing board and begin the project Referring to the mbed manual(s), modify the HAL and CORE modules, plus all classes that are needed for each pin. This is the most time consuming and error-prone approach – but works

15 Path 3 - yotta yotta is a tool for building either modules or executables and is used extensively in the mbed community Yotta is command-line driven and is written in python. It works best on a native linux (or OS X) system but can run in a shell on Windows.

16

17 There is a Win Installer

18 Targets

19 Yotto and Targets There are a number of examples on GitHub showing the process Yotto works directly with your GitHub repositories, both public and private Yotto is a powerful tool, but there is a definite learning curve Possible future class

20 Path 4 – mbed HDK Originally an internal project at ARM, the HDK is being rolled out to users Only minimal documentation, again on GitHub Makes use of EAGLE EDA program to design the hardware then compiles the HAL data from the design

21 https://developer.mbed.org/handbook/mbed-HDK

22 https://github.com/ARMmbed/mbed-HDK

23 HDK The HDK actually resides on the GitHub repository on the previous slide Documentation is very spartan Requires the hardware to be laid out in EAGLE – or exported to EAGLE from your regular EDA software This is the easiest and best approach once you are familiar with the process and familiar with EAGLE…

24 Looking to the Future Yotta has some nice applications, but runs better in linux Could use better tutorials – hoping to have a YouTube in the mbed channel soon The HDK will become more mature over time Currently planning a CEC class on EAGLE the week of 11/30/17 which will include a day on the HDK

25 This Week’s Agenda 1/9 Peeking Under the mbed Hood 1/10 CMSIS, Hands-On 1/11 mbed Communications and Multitasking 1/12 The mbed Developer Network 1/13 Porting mbed

26 Please stick around as I answer your questions!
Please give me a moment to scroll back through the chat window to find your questions I will stay on chat as long as it takes to answer! I am available to answer simple questions or to consult (or offer in-house training for your company)


Download ppt "Introduction to the ARM mbed Platform– A Hands-on Course"

Similar presentations


Ads by Google