Skip to content

Latest commit

 

History

History
204 lines (107 loc) · 6.12 KB

File metadata and controls

204 lines (107 loc) · 6.12 KB

NM180100 Development Platform Setup Guide for Arduino IDE

This guide will walk you through how to get up and running with the NM180100 Boards in the Arduino IDE.

Requirements

Hardware

  • NM180100EVB or NM180410
  • A USB to micro-USB cable to connect the board
  • A Linux or Windows machine

Software

  • Arduino IDE
  • ARM GNU Toolchain
  • Segger J-Link
  • Python
Expand for the detailed software installation instructions

Install Arduino IDE

The Arduino IDE is where you will write the code that will run on the NM180100.

Download Arduino IDE

Installation Instructions


Install ARM GNU Toolchain

The ARM GNU Toolchain is used for compiling and building.

Download ARM GNU Toolchain

Windows
  1. Download and install the Windows hosted cross toolchains.

arm-gnu-toolchain-11.3.rel1-mingw-w64-i686-arm-none-eabi.exe

  1. Add the compiler to your PATH using the Add path to environment variable checkbox.

Arm Compiler Path

Linux
  1. Download the Linux hosted cross toolchains

arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz

  1. Extract the toolchain files to the directory where it will be stored. For example, to install the toolchain to /opt type the following

sudo tar -xvf arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz -C /opt

  1. Add the compiler to your PATH.

Install SEGGER J-Link

SEGGER J-Link is used to program and debug the NM180100.

Download J-Link Software and Documentation Pack

Details
  1. Download the official J-Link Software and Documentation pack. The exact version will depend on your operating system. Download the version that applies to your operating system.

  2. Add J-Link to your PATH.


Install Python

Windows
  1. Download the latest version of Python 3 from the Downloads page.

  2. Use the Installation Wizard to add Python 3 to your PATH.

Python Installer

  1. Verify that the installation was successful by running the following command in a command prompt:

python --version

Linux

Python is usually pre-installed in Linux. If not, you can run the following command in a terminal to install Python

sudo apt-get install python3


Install pyOCD

Windows/Linux
  1. To install the latest version, execute the following in a command prompt:

python -mpip install --pre -U git+https://github.com/pyocd/pyOCD.git

  1. This will install pyOCD under the Python Scripts directory. Ensure that this directory is added to your PATH.

Install the NM180100 Arduino Core

To get your code to run on the NM180100, you need to install the corresponding Arduino Core.

  1. Open the Releases Section of the NM180100 Arduino Core github page.

  2. Find the most recent release, which will be at the top, and open the Assets dropdown.

  3. Right click on the .json file, and copy the link address.

Copy the JSON link

  1. Open the Arduino IDE.

  2. Open the Preferences menu under File > Preferences.

  3. Paste the link address in the Additional boards manager URLs box.

Paste the JSON link in the boards manager box

  1. Click OK

  2. In the sidebar, open the Boards Manager by clicking the second icon from the top. Alternatively, you can click on Tools > Board > Boards Manager.

Board select icon location

  1. In the search bar, type in NM180100, and the board should appear.

Board search results

  1. Click INSTALL

  2. Now, select your board. For example, if you have an NM180100EVB, click the Tools menu > Board > Northern Mechatronics NM180100 Boards > NM180100 Evaluation Board.

Board select menu traversal


You're All Set!

And that's it! You are now ready to start writing code and running it on your NM180100 board.


Blinking Light Example

Setup

If you are new to this, and want a small example to use as a stepping stone to begin your journey, try this one!

Arduino provides some built in examples to help get you off the ground. Go open the Blink example in File > Examples > 01.Basics > Blink.

Menu traversal for blink example

In order to run the Blink code on the board, ensure your board is plugged in and turned on. The power switch is located next to the micro-USB port on the board, and the on position is when the switch is flipped away from the micro-USB port. When the board is plugged in and turned on, one blue light and five orange lights should be lit up.


How To Run Code

In the top left, the Check Mark icon compiles the code and checks for errors. The Arrow icon compiles the code and loads it onto the board.

Click the Arrow button to load and run the Blink code on your board. Once the load completes, you should see one of the orange lights on the board start to blink. If nothing is happening, try pressing the Reset button situated next to the blue light.


Further Reading

The Arduino Getting Started Guide provides more content on what Arduino is, and how it works.

The Arduino Programming Language Reference provides useful information that will help you write code for your board.