Arduino Setup for Explore M3
In this tutorial we will look at the basic setups of setting up the ExploreM3 on Arduino and installing DFU and Vcom drivers on Windows, Linux and MAC. Finally we will flash a simple led-blink example.
The Explore M3 Parts
The figure shows location of various parts on the board, which will be using during the setup. Look at the switches, the RGB led and the led on pin 13 in particular.
Using Board Manager
(This Step is common for all operating systems)
- Download and install the Arduino IDE (1.6.12 ). Older versions of the Arduino IDE are not supported.
- Open the Arduino IDE and go to File-->Preferences and paste the below json URL into the Additional Board Manager URLs text box and hit OK.
- Open the Board Manager from Tools-->Board-->Boards Manager. Scroll down and look for Explore-M3(32-bits ARM Cortex-M3) board. Click on the board entry and hit install.
- This will install the Explore-M3 board and the arm-none-eabi-gcc tool chain. Installation may take few minutes depending on the internet speed. Once the installation has completed, an Arduino-blue INSTALLED will appear next to the entry.
- If you encounter CRC mismatch Error, delete Explore M3 Arduino installation files from below mentioned paths and retry installation.
- Now the Explore-M3 board will appear in the board list.
- Install Virtual COM driver ; This driver makes the same USB interface appear as virtual com port. The virtual COM code on the Arduino resides with every sketch that uses the Serial Class.
- Connect the board to system, the COM port will appear as shown.
- Go to run window (Windows+R), type %appdata% and click ok.
- Go to AppData\Local\Arduino15\packages\ExploreM3\hardware\Explore-M3\1.0.0\tools\win and run the Zadig utility.
- Install the CDC driver using the Zidag utility this time.
- Verify successful installation in the device manager.
- Installing the Device Firmware Upgrade(DFU) Driver. This driver is used for programming the Explore M3.
- To upload a new program to Explore M3, put the board in programming mode by holding down the USB Boot switch, press and release the reset switch and then release the USB Boot switch. The RGB LED turns green indicating USB Boot mode.
- The board shows up as unknown device in device manager.
- Click on Options and select List All Devices
- Select the device as Explore M3 and assign WinUSB driver as shown
- Click on Install driver
- Verify in the device Manager that the driver is successfully installed.
This setup has been tested on Ubuntu 64 bit. If you should have any errors other linux flavours, do post in the comments. One good thing I noticed, drivers are not required but only the device needs to be enabled. So lets get started.
- Create a file named install.sh under /.arduino15/packages/ExploreM3/hardware/Explore-M3/1.0.0/tools/linux$
with the following content
#!/bin/sh if sudo [ -w /etc/udev/rules.d ]; then echo "Copying Explore M3-specific udev rules..." sudo cp -v 90-explore-m3.rules /etc/udev/rules.d/90-explore-m3.rules sudo chown root:root /etc/udev/rules.d/90-explore-m3.rules sudo chmod 644 /etc/udev/rules.d/90-explore-m3.rules sudo chmod 777 exploreM3_upload sudo chmod 777 upload_reset sudo chmod 777 dfu echo "Reloading udev rules" sudo udevadm control --reload-rules echo "Adding current user to dialout group" sudo adduser $USER dialout else echo "Couldn't copy to /etc/udev/rules.d/; you probably have to run this script as root? Or your distribution of Linux doesn't include udev; try running the IDE itself as root." fi
- Run ./install.h (change the file permission if required).
- Give appropriate permissions when running the install.sh and other files.
- You may be required to give permissions to use virtual com port.
- Note that Explore M3 acts as Device Firmware Upgrade (DFU) and virtual COM port with the same USB interface.
This setup has been tested on macOS High Sierra. Run the following commands in terminal and provide password whenever prompted for.
This will install libusb and set required file permissions.
Running First Example on M3
After setting up the board and indtalling the drivers it's time to run the first example on Explore-M3 board.
Have a opinion, suggestion , question or feedback about the article let it out here!