-
Install
Arduino
version >= 1.6,Git for Windows
with MSYS -
Open
Git for Windows
, then run below commandscd ~/AppData/Local/Arduino15/ mkdir -p packages/Seeeduino/hardware; mkdir -p packages/Seeeduino/tools export GIT_DIR=`pwd`/packages/.git; cd packages/Seeeduino/hardware git clone --separate-git-dir $GIT_DIR https://github.com/Seeed-Studio/grove_stm32f030.git Grove_STM32F030 cp Grove_STM32F030/package_grove_stm32f030_index.json ../../../
-
Open below .json file by text editor
C:\Users\<Your-User-Name>\AppData\Local\Arduino15\package_grove_stm32f030_index.json
Find the downloading URL of stm32_serial_upload_tool and arm-none-eabi-gcc,then extract them to
C:\Users\<Your-User-Name>\AppData\Local\Arduino15\packages\Seeeduino\tools
-
Open
Arduino
,Tool
->Board:
, select the itemGrove STM32F030
. -
Click
File
->Examples
->GroveSTM32F030
, then select any one. -
Click
Verify
button to start compiling.
-
Remove all files under
C:\Users\<Your-User-Name>\AppData\Local\Arduino15\packages\Seeeduino\hardware\Grove_STM32F030\
but except file
1.0.0
and*.json
, without this the compiling will be error. -
After you operate
Arduino Boards Manager
, json fileC:\Users\<Your-User-Name>\AppData\Local\Arduino15\package_grove_stm32f030_index.json
will be removed. And boardGrove STM32F030
will miss/disappear in the Boards: menu. .
You need recopy the fileC:\Users\<Your-User-Name>\AppData\Local\Arduino15\packages\Seeeduino\hardware\Grove_STM32F030\package_grove_stm32f030_index.json
to folderC:\Users\<Your-User-Name>\AppData\Local\Arduino15\
again. -
The target bin or hex file will be in the subfolder of
C:\Users\<Your-User-Name>\AppData\Local\Temp
. Enable the compiling log feature of Arduino to find the specific path in the log. If you use bin target file, careful the downloading address of MCU is 0x8000000.
Most of time, we can use SEGGER JLink/J-Flash to flash the MCU STM32F030 device, I think this is a simple method,
cause which has a wizard steps.
Advanced user play with RPi & Grove-RPi-Base-Hat, also can use the RPi as a OpenOCD device, see
Programming Microcontrollers using OpenOCD on a Raspberry Pi
-
Grove Base Hat for PI/PI-Zero
1.0.0\libraries\GroveSTM32F030\examples\grove_rpi_base_hat
In this example, STM32F030 act as a I2C slave, and capture multichannel ADC results.
-
Grove 5-Way Tactile Switch
1.0.0\libraries\GroveSTM32F030\examples\grove_5way_tactile_switch
and check the source, make sure below line defined
#define _DEV_TYPE _DEV_5_WAY_TACTILE_SWITCH
-
Grove 6-Position DIP Switch
1.0.0\libraries\GroveSTM32F030\examples\grove_5way_tactile_switch
and check the source, make sure below line defined
#define _DEV_TYPE _DEV_6_POS_DIP_SWITCH