You are on page 1of 10

iTracker Arduino environment

1. Pin definition

1 DNCX1510101021
iTracker Arduino environment

2. PC Software install

2.1 JTAG drivers


Before we proceed make sure that our system has the necessary JTAG JLink drivers for us to use the
JLink module to program the nrf52 device via the Arduino IDE. The driver is available for free and is
downloadable at the link below:
https://www.segger.com/downloads/jlink

2.2 Getting your Arduino IDE ready for development


In this first tutorials we will see how we can use the Arduino IDE with the iTracker module. Since the
iTracker's core chipset is the nrf52832 from Nordic semi-conductor, we can program the nrf52 chipset
right from withing the Arduino IDE
1. Download the Arduino IDE from the arduino.cc website
https://www.arduino.cc/en/main/software
2. Run the executable on the desktop and proceed to File -> Preferences menu
3. Add https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json as an
"Additional Board Manager URL"
4. Open the Boards Manager from the Tools -> Board menu and install "Nordic Semiconductor nRF5
Boards"
5. Select your nRF5 board from the Tools -> Board menu

NOTE: During installation it takes the Arduino IDE a few minutes to extract the tools after they have been
downloaded, please be patient.

2.3 OS Specific Setup

OS X
No additional setup required.

Linux
For 64-bit Linux users, libc6:i386, libstdc++6:i386, libncurses5:i386 and libudev1:i386 need to be
installed :
1. sudo dpkg --add-architecture i386
2. sudo apt-get update
3. sudo apt-get install libc6:i386 libstdc++6:i386 libncurses5:i386 libudev1:i386

2 DNCX1510101021
iTracker Arduino environment

Windows

Driver Setup for mbed devices


Download mbed Windows Serial driver

Driver Setup for Segger J-Link


1. Download Zadig
2. Plugin Segger J-Link or DK board
3. Start Zadig,Select Options -> List All Devices

4. Plug and unplug your device to find what changes, and select the Interface 2 from the device
dropdown

5. Click Replace Driver

After above done, the device manager will display the BULK interface like below.

3 DNCX1510101021
iTracker Arduino environment

NOTE: To roll back to the original driver go to: Device Manager -> Right click on device -> Check box for
"Delete the driver software for this device" and click Uninstall

Now your iTracker Board is ready to accept sketches from the arduino IDE. another step to make our
development a little bit more easier is to add the iTracker module in the IDE as a board. Let’s do that next:

4 DNCX1510101021
iTracker Arduino environment

3. Add a iTracker board in nRF5 Boards


Modify …\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.4.0\boards.txt
Add below information at the end (port from nRF52DK.name=Nordic Semiconductor nRF52 DK)

iTracker.name=iTracker

iTracker.upload.tool=sandeepmistry:openocd

iTracker.upload.protocol=jlink

iTracker.upload.target=nrf52

iTracker.upload.maximum_size=524288

iTracker.upload.setup_command=transport select swd;

iTracker.upload.use_1200bps_touch=false

iTracker.upload.wait_for_upload_port=false

iTracker.upload.native_usb=false

iTracker.bootloader.tool=sandeepmistry:openocd

iTracker.build.mcu=cortex-m4

iTracker.build.f_cpu=16000000

iTracker.build.board=iTracker

iTracker.build.core=nRF5

iTracker.build.variant=iTracker

iTracker.build.variant_system_lib=

iTracker.build.extra_flags=-DNRF52

iTracker.build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16

iTracker.build.ldscript=nrf52_xxaa.ld

iTracker.build.lfclk_flags=-DUSE_LFXO

iTracker.menu.softdevice.none=None

iTracker.menu.softdevice.none.softdevice=none

iTracker.menu.softdevice.s132=S132

iTracker.menu.softdevice.s132.softdevice=s132

iTracker.menu.softdevice.s132.softdeviceversion=2.0.1 iTracker.menu.softdevice.s132.upload.maximum_size=409600

iTracker.menu.softdevice.s132.build.extra_flags=-DNRF52 -DS132 -DNRF51_S132

iTracker.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld

below is the effect for Arduino ide.

5 DNCX1510101021
iTracker Arduino environment

in…\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.4.0\variants folder,
copy nRF52DK folder and rename as iTracker.

Modify …\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.4.0\variants\iTracker\va
riant.h like below to change the UART mapping.

6 DNCX1510101021
iTracker Arduino environment

4. Test iTracker’s Bluetooth function

4.1 install the BLEPeripheral library.

4.2 Select a BLE example

7 DNCX1510101021
iTracker Arduino environment

4.3 Set the board and burn softdevice.


 Board select iTracker
 Softdevice select S132
 Programmer select J-link
 Click nRF5 Flash SoftDevice

4.4 Verify and upload led_switch example

When burn success, the UART assistant will show below:

8 DNCX1510101021
iTracker Arduino environment

9 DNCX1510101021
iTracker Arduino environment

5. Test using Phone APP

10 DNCX1510101021

You might also like