Close

Initial drop of (alpha) Arduino core

A project log for Hackable CMWX1ZZABZ (LoRa) Devices

Useful STM32L082-based devices with embedded LoRa radio modem programmable with the Arduino IDE via USB connector, i.e, hackable.

kris-winerKris Winer 01/21/2018 at 02:160 Comments

1/20/2018

Located hereHere is a more or less complete how-to to get going with this STM32L0 Arduino core. Just follow the instructions and choose the Grasshopper-L082CZ board in the board manager instead of the Ladybug-L432.  I have modified Simon's excellent tutorial below to make it specific to the Grasshopper board:

If you haven't already installed the latest version of the Arduino IDE, you should do that now. If you're running Windows, you should choose to top-listed item, Windows installer (instead of the Windows app store). Linux users can follow these instructions, and Mac OS X users can follow these. Whichever OS you're running, please consider donating to the Arduino Project as part of the download!

To get 32-bit Arduino support, go to Tools/Board/Boards Manager ... (top of the Boards menu), and select the box for Arduino SAM Boards (32-bits ARM Cortex M3), and click the Install button. Although the Grasshopper is an ARM Cortex M0 board, this step will install the gnu-arm compiler that will work with Grasshopper and other ARM Cortex boards.

Typically, your Arduino folder is in your Documents folder on Windows and OS X, and in your home folder on Linux. Keeping your hardware support and libraries in this folder, instead of in the Arduino IDE installation folder, will ensure that they persist after you download subsequent versions of the Arduino IDE.  Next, clone  this repository into your Arduino/hardware folder. Create a directory called Arduino/hardware/STM32L0 and extract the core into the STM32L0 folder. Rename the core folder to STM32L0. You should end up with the core in the directory Arduino/hardware/STM32L0/STM32L0. Launch the Arduino IDE and under Tools/Boards you should see several new STM32L0 boards toward the bottom of the menu, including Grasshopper-L082CZ.

Finally, you're going to add some OS-specific support allowing your computer to talk to the Grasshopper:

Linux

  1. Go to Arduino/hardware/grumpyoldpizza/stm32l0/drivers/linux/
  2. sudo cp *.rules /etc/udev/rules.d
  3. reboot

Windows

  1. Download Zadig
  2. Plugin STM32L0 board and toggle the RESET button while holding down the BOOT button
  3. Let Windows finish searching for drivers
  4. Start Zadig
  5. Select Options -> List All Devices
  6. Select STM32 BOOTLOADER from the device dropdown
  7. Select WinUSB (v6.1.7600.16385) as new driver
  8. Click Replace Driver
  9. Window 7s only:
    1. Go to Arduino/hardware/grumpypoldpizza/stm32l0/drivers/windows
    2. Right-click on dpinst_x86.exe (32 bit Windows) or dpinst_amd64.exe (64 bit Windows) and select Run as administrator
    3. Click on Install this driver software anyway at the Windows Security popup as the driver is unsigned

Blinky

Of course, no Arduino setup can be complete until you test your board with the beloved Blink sketch! Having launched the Arduino IDE, under Tools/Board choose Grasshopper-L082CZ, and under Tools/Port select the serial port on which your Grasshopper is connected. Under File/Examples/01. Basics chose Blink. Save a copy of this sketch in a temporary location (like your Desktop); Grasshopper led is on pin 13.

Flash the modified Blink sketch, and the little red LED on the Grasshopper should start blinking on and off. If you can't flash the sketch (countdown 10 9 .. 1 FAIL), disconnect the Grasshopper, reconnect it while holding down the Boot button (labeled BOOT), and try again.

Any question or trouble, send me an e-mail at tleracorp@gmail.com.

Discussions