Source: Commerce Guys Blog

Commerce Guys Blog STM32Duino Tutorial 5 - Arduino IDE for STM32

It is very great that we can use the latest Arduino IDE for STM32. Now Let's try.Installation - Windows1. Download and install the version 1.6.9 of the Arduino IDE from here.2. Run the IDE, and on the Tools menu, select the Boards manager, and install the Arduino Zero from the list of available boards. You must do this step, it installs the arm-none-eabi-g++ toolchain!3. Download zip file containing the STM32 files from here.4. Unzip to create the Arduino_STM32 folder.5. Copy the Arduino_STM32 folder to My Documents/Arduino/hardware (note. if the hardware folder doesn't exist you will need to create it).6. If using Maple or Maple mini, you need to install drivers for the Serial and DFU (upload devices). Please run drivers/win/install_drivers.bat Note. This doesn't actually install drivers. Windows comes pre-installed with a compatible Serial USB driver and a DFU (upload) driver. However the built in drivers need to be associated with the USB ID of the Maple serial and DFU devices. The batch file and wdi-simple.exe do the clever stuff to convince Windows 7 or newer, that it should use its drivers with the Maple serial and DFU devices(Run install_drivers.bat in the "drivers/win" folder).7. Re-start the Arduino IDE, and select the appropriate board from the Tools -> Board menu, and select the appropriate Com port for your Maple mini or serial upload device. Note. If you do not see a Maple Serial com device, this is probably because the Maple mini has not been loaded with the blink sketch. So upload a the Maple mini blink sketch from examples\Digital\Blink and the Maple serial device should now be available on the Port menu. Above from https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Installation Problem 1 - Fail to build the sketch.After installation of Arduino IDE for STM32, building a example sketch. But there is a error. The error information is as below. Arduino: 1.6.9 (Windows 7), Board: "Maple (Rev 3)"Build options changed, rebuilding allWarning: platform.txt from core 'STM32 Boards (STM32duino.com)' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.Sketch uses 11,292 bytes (10%) of program storage space. Maximum is 108,000 bytes.Global variables use 2,560 bytes of dynamic memory.java.lang.UnsupportedClassVersionError: CliTemplate/CliMain : Unsupported major.minor version 51.0at java.lang.ClassLoader.defineClass1(Native Method)at java.lang.ClassLoader.defineClassCond(Unknown Source)at java.lang.ClassLoader.defineClass(Unknown Source)at java.security.SecureClassLoader.defineClass(Unknown Source)at java.net.URLClassLoader.defineClass(Unknown Source)at java.net.URLClassLoader.access$000(Unknown Source)at java.net.URLClassLoader$1.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)Could not find the main class: CliTemplate.CliMain. Program will exit.the selected serial port Could not find the main class: CliTemplate.CliMain. Program will exit.does not exist or your board is not connectedException in thread "main"This report would have more information with"Show verbose output during compilation"option enabled in File -> Preferences. The Solution is to download and install the latest version of JDK. I get idea from here.Enjoy it Now. STM32duino3Average: 3 (1 vote)

Read full article »
Est. Annual Revenue
$100K-5.0M
Est. Employees
1-25
CEO Avatar

CEO

Update CEO

CEO Approval Rating

- -/100