Coder Social home page Coder Social logo

rene-aguirre / stm32-arduino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redbear/stm32-arduino

0.0 2.0 0.0 27.47 MB

Use Arduino IDE to develop STM32 MCU (e.g. RedBear Duo) firmware.

C 75.90% C++ 18.29% Objective-C 0.13% Arduino 5.38% Shell 0.15% Batchfile 0.02% Python 0.14%

stm32-arduino's Introduction

STM32-Arduino

Allows Arduino fans to use the Arduino IDE to develop STM32 MCU firmware. Currently, it supports the RedBear Duo (STM32F205) IoT development kit.

The Duo IoT development kit contains two boards, the Duo and the RBLink.

The Duo is a small and powerful IoT development board that has an ARM Cortex-M3 MCU runs at 120 MHz with 1 MB Flash (256 KB for Arduino sketch) and 128 KB SRAM, it comes with Broadcom's BCM43438 connectivity chip so that the Duo has WiFi (802.11n / 2.4 GHz) and Bluetooth features at the same time, the board only requires a single antenna.

The RBLink provides interfaces for Seeed Studio Grove System modules.

You do not really need the RBLink if you are not going to develop firmware using Broadcom's WICED SDK.

Note: unless you want to contribute to the Duo board support package, you do need to touch the folder 'arduino' because you will use the Arduino Boards Manager to add it to the Arduino IDE.

image

image

Requirements

Hardware

  1. RedBear Duo development board

Readings

  1. Basic Arduino knowledge
  2. Understand the Duo System Overview
  3. Go through the Duo Getting Started Guide

Software

  1. Arduino IDE (Tested with 1.6.7)
  2. Duo board support package for Arduino (See version for the latest version)

Install Driver (only for Windows)

USB CDC

Connect the Duo to your Windows PC using the USB port and install the driver from the driver/windows folder.

Update udev Rules (only for Linux)

For Linux (e.g. Ubuntu 14.04) users: ModemManager will try to use the Duo as a modem and this causes the upload process fail using Arduino IDE. To allow Arduino IDE to upload correctly, you need to fix it by modify the UDEV rule, write a simple UDEV rule to ignore it from being handled by modem manager.

$ sudo nano /etc/udev/rules.d/77-mm-usb-device-blacklist.rules

Simply add this single line:

ATTR{idVendor}=="2b04", ENV{ID_MM_DEVICE_IGNORE}="1"

Install lsb-core (only for Linux)

On Linux, if you cannot compile sketches (the IDE cannot find gcc or g++):

$ sudo apt-get install lsb-core

Setup Arduino IDE

Step 1:

Download the Arduino IDE, support OSX, Windows and Linux.

https://www.arduino.cc/en/Main/Software

Step 2:

Start the IDE and from the menu, Preferences, add the following to "Additional Boards Manager URLs"

https://redbearlab.github.io/arduino/package_redbear_index.json

Step 3:

From the menu, [ Tools ] > [ Board ], select "Boards Manager" and install the RedBear Duo board support package to the IDE.

Step 4:

Connect the Duo to your computer through the USB port of the Duo.

*** Note that, it is not the RBLink's USB port if you are going to use the RBLink for Grove System components, the following photo shows the setup (connected to Grove RGB LED):

image

Step 5:

From the menu, [ Tools ] > [ Board ], select [ RedBear Duo ] under RedBear IoT Boards.

Step 6:

Select the Port under the [ Tools ] -> [ Port ] menu.

Update Firmware

For using Arduino IDE to update

image

  • Connect the Duo to your PC via the USB port.
  • Select [ Menu ] -> [ Tools ] -> [ Programmer ] -> [ Duo FW Uploader ]
  • Press and hold the SETUP button on the board and press the RESET button, until it shows in flashing yellow, release the SETUP button, it is in DFU mode now.
  • Select [ Menu ] -> [ Tools ] -> [ Burn Bootloader ] to update the system firmware.
  • You will see the Blue LED on the board is flashing.

For using DFU-Util

For people want to compile without the Arduino IDE, please use this method to update firmware:

Upload sketch (e.g. Blink)

From the menu, [ File ] > [ Examples ] > [ RedBear_Duo ] -> [01.Basics], select the example Duo_Blink and upload to the board.

The blue LED (D7) on the board is blinking.

ToDo

  • Support Arduino IDE 1.6.8
  • More BLE Peripheral examples
  • More BLE Central examples
  • Support upload sketches using the RBLink

Please also propose other good features.

stm32-arduino's People

Contributors

cheong2k avatar xuguohui avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.