diff --git a/boards/arm/stm32/piconomix_hero_board/arduino/arduino.dox b/boards/arm/stm32/piconomix_hero_board/arduino/arduino.dox index c9dde745..0a24a3d4 100644 --- a/boards/arm/stm32/piconomix_hero_board/arduino/arduino.dox +++ b/boards/arm/stm32/piconomix_hero_board/arduino/arduino.dox @@ -10,22 +10,11 @@ With it's massive community and extensive set of supported boards and libraries, the Arduino development environment has become a force of nature. Here are the steps to set up and use the Arduino IDE for the PX-HER0 board. -@tip_s -Native support for the PX-HER0 board has been added in [Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32) -and will be available in release 1.8.0. The following are interim steps... -@tip_e - 2. Download and install the Arduino IDE {#HERO_ARDUINO_INSTALL_IDE} =================================================================== -Go to [THIS] (https://www.arduino.cc/en/Main/OldSoftwareReleases#previous) page -to download and install Arduino **1.8.9** - -@warn_s -Arduino 1.8.10 has a [bug](https://forum.arduino.cc/index.php?topic=648226.0) in -the command line arduino-builder that prevents it from compiling (building) a -sketch for the PX-HER0 board. The bug should be fixed in the next release. -@warn_e +Go to [THIS](https://www.arduino.cc/en/main/software) page to download and +install Arduino 1.8.10 or newer. 3. Install support for STM32 based boards {#HERO_ARDUINO_INSTALL_STM32} ======================================================================= @@ -40,11 +29,6 @@ Open the Preferences dialog in the Arduino IDE: ![](arduino_hero_preferences.png) -@tip_s -Note the path to the Arduino sketchbook. This path will be used in the next step -to add specific support for the PX-HER0 board. -@tip_e - Add a link to the stm32duino JSON file in the "Additional Boards Manager URLs" field: https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json @@ -64,45 +48,13 @@ Now open the Boards Manager window in the Arduino IDE: Type "STM32" into the search bar to narrow down the list of packages and install the "STM32 Cores by STMicroelectronics" package. -4. Add support for the PX-HER0 board {#HERO_ARDUINO_ADD_HERO} -============================================================= - -Use the path to the Arduino sketchbook as noted in the previous step. For the -Windows platform it will be: - - C:\Users\[User Name]\Documents\Arduino - -Copy the the PX-HER0 "hardware" directory and files into the sketchbook -directory. It is located here: - - px-lib/boards/arm/stm32/piconomix_hero_board/arduino/hardware - -After copying it, the tree must look like this: - - Documents - \---Arduino - \---hardware - \---piconomix - \---stm32 - | boards.txt - | platform.txt - | - \---variants - \---PX_HER0 - ldscript.ld - PeripheralPins.c - PinNamesVar.h - variant.cpp - variant.h - -![](arduino_hero_board_support.png) - -5. Specify the PX-HER0 board {#HERO_ARDUINO_SPECIFY_HERO} +4. Specify the PX-HER0 board {#HERO_ARDUINO_SPECIFY_HERO} ========================================================= Select the PX-HER0 board from the list of supported boards: - Tools > Board: "xxx" > PX-HER0 + Tools > Board: "xxx" > STM32 Boards > Generic STM32L0 series + Tools > Board part number: "xxx" > PX-HERO ![](arduino_hero_select.png) @@ -110,16 +62,16 @@ Options can be specified for the PX-HER0 board in sub menus: ![](arduino_hero_options.png) +Select "CDC (generic 'Serial supersede U(S)ART)" as the USB interface. This will +configure the Arduino firmware to stream all Serial communication over USB. We +will use the USB1 connector on the PX-HER0 board for serial communication. + Select "STM32CubeProgrammer (DFU)" as the upload method. The Arduino IDE will use the STM32CubeProgrammer command line software to program the STM32 via it's bootloader in ROM. We will use the USB1 connector on the PX-HER0 board to -program the STM32. - -Select "CDC (generic 'Serial supersede U(S)ART)" as the USB interface. This will -configure the Arduino firmware to stream all Serial communication over USB. We -will use the USB1 connector on the PX-HER0 board for serial communication too. +program the STM32 too. -6. Build a sketch {#HERO_ARDUINO_BUILD_SKETCH} +5. Build a sketch {#HERO_ARDUINO_BUILD_SKETCH} ============================================== Open the "serial_hello_world" sketch. It is located here: @@ -166,9 +118,10 @@ remove the BOOT jumper when you are finished. Otherwise, the STM32 will appear 8. Digital pin mapping {#HERO_ARDUINO_PIN_MAP} ============================================== -The PX-HER0 board pins are mapped in the following file: +The PX-HER0 board pins are mapped in [THIS](https://github.com/stm32duino/Arduino_Core_STM32/blob/master/variants/PX_HER0/variant.h) +file. It is duplicated here for easy offline viewing: - px-lib/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/variant.h + px-lib/boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HERO/variant.h Here is the map table: diff --git a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/boards.txt b/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/boards.txt deleted file mode 100644 index ae52f3c7..00000000 --- a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/boards.txt +++ /dev/null @@ -1,91 +0,0 @@ -# See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification - -menu.pnum=Board part number - -menu.xserial=Serial interface -menu.usb=USB interface - -menu.opt=Optimize -menu.rtlib=C Runtime Library -menu.upload_method=Upload method - -################################################################################ -# Piconomix STM32 Boards - -px_hero.name=PX-HER0 - -px_hero.build.vid=0x0483 -px_hero.build.core=STM32:arduino -px_hero.upload.maximum_size=131072 -px_hero.upload.maximum_data_size=20480 -px_hero.upload.tool= - -px_hero.build.mcu=cortex-m0plus -px_hero.build.board=PX_HER0 -px_hero.build.series=STM32L0xx -px_hero.build.product_line=STM32L072xx -px_hero.build.variant=PX_HER0 -px_hero.build.cmsis_lib_gcc=arm_cortexM0l_math -px_hero.build.extra_flags=-D{build.product_line} {build.enable_usb} {build.xSerial} -D__CORTEX_SC=0 - -# Upload menu -px_hero.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD) -px_hero.menu.upload_method.swdMethod.upload.protocol=0 -px_hero.menu.upload_method.swdMethod.upload.options=-g -px_hero.menu.upload_method.swdMethod.upload.tool=STM32:stm32CubeProg - -px_hero.menu.upload_method.serialMethod=STM32CubeProgrammer (Serial) -px_hero.menu.upload_method.serialMethod.upload.protocol=1 -px_hero.menu.upload_method.serialMethod.upload.options={serial.port.file} -s -px_hero.menu.upload_method.serialMethod.upload.tool=STM32:stm32CubeProg - -px_hero.menu.upload_method.dfuMethod=STM32CubeProgrammer (DFU) -px_hero.menu.upload_method.dfuMethod.upload.protocol=2 -px_hero.menu.upload_method.dfuMethod.upload.options=-g -px_hero.menu.upload_method.dfuMethod.upload.tool=STM32:stm32CubeProg - -# Serialx activation -px_hero.menu.xserial.generic=Enabled (generic 'Serial') -px_hero.menu.xserial.none=Enabled (no generic 'Serial') -px_hero.menu.xserial.none.build.xSerial=-DHAL_UART_MODULE_ENABLED -DHWSERIAL_NONE -px_hero.menu.xserial.disabled=Disabled (no Serial support) -px_hero.menu.xserial.disabled.build.xSerial= - -# USB connectivity -px_hero.menu.usb.none=None -px_hero.menu.usb.CDCgen=CDC (generic 'Serial' supersede U(S)ART) -px_hero.menu.usb.CDCgen.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC -px_hero.menu.usb.CDC=CDC (no generic 'Serial') -px_hero.menu.usb.CDC.build.enable_usb={build.usb_flags} -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -px_hero.menu.usb.HID=HID (keyboard and mouse) -px_hero.menu.usb.HID.build.enable_usb={build.usb_flags} -DUSBD_USE_HID_COMPOSITE - -# Optimizations -px_hero.menu.opt.osstd=Smallest (-Os default) -px_hero.menu.opt.oslto=Smallest (-Os) with LTO -px_hero.menu.opt.oslto.build.flags.optimize=-Os -flto -px_hero.menu.opt.o1std=Fast (-O1) -px_hero.menu.opt.o1std.build.flags.optimize=-O1 -px_hero.menu.opt.o1lto=Fast (-O1) with LTO -px_hero.menu.opt.o1lto.build.flags.optimize=-O1 -flto -px_hero.menu.opt.o2std=Faster (-O2) -px_hero.menu.opt.o2std.build.flags.optimize=-O2 -px_hero.menu.opt.o2lto=Faster (-O2) with LTO -px_hero.menu.opt.o2lto.build.flags.optimize=-O2 -flto -px_hero.menu.opt.o3std=Fastest (-O3) -px_hero.menu.opt.o3std.build.flags.optimize=-O3 -px_hero.menu.opt.o3lto=Fastest (-O3) with LTO -px_hero.menu.opt.o3lto.build.flags.optimize=-O3 -flto -px_hero.menu.opt.ogstd=Debug (-g) -px_hero.menu.opt.ogstd.build.flags.optimize=-g -Og - -# C Runtime Library -px_hero.menu.rtlib.nano=Newlib Nano (default) -px_hero.menu.rtlib.nanofp=Newlib Nano + Float Printf -px_hero.menu.rtlib.nanofp.build.flags.ldspecs=--specs=nano.specs -u _printf_float -px_hero.menu.rtlib.nanofs=Newlib Nano + Float Scanf -px_hero.menu.rtlib.nanofs.build.flags.ldspecs=--specs=nano.specs -u _scanf_float -px_hero.menu.rtlib.nanofps=Newlib Nano + Float Printf/Scanf -px_hero.menu.rtlib.nanofps.build.flags.ldspecs=--specs=nano.specs -u _printf_float -u _scanf_float -px_hero.menu.rtlib.full=Newlib Standard -px_hero.menu.rtlib.full.build.flags.ldspecs= diff --git a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/platform.txt b/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/platform.txt deleted file mode 100644 index 43aad072..00000000 --- a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/platform.txt +++ /dev/null @@ -1,8 +0,0 @@ -# CUSTOM STM32 ARM Core and platform. -# ------------------------------ -# -# For more info: -# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification - -name=Piconomix STM32 Boards -version=0.0.1 diff --git a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/PeripheralPins.c b/boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/PeripheralPins.c similarity index 100% rename from boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/PeripheralPins.c rename to boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/PeripheralPins.c diff --git a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/PinNamesVar.h b/boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/PinNamesVar.h similarity index 100% rename from boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/PinNamesVar.h rename to boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/PinNamesVar.h diff --git a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/ldscript.ld b/boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/ldscript.ld similarity index 100% rename from boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/ldscript.ld rename to boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/ldscript.ld diff --git a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/variant.cpp b/boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/variant.cpp similarity index 100% rename from boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/variant.cpp rename to boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/variant.cpp diff --git a/boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/variant.h b/boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/variant.h similarity index 100% rename from boards/arm/stm32/piconomix_hero_board/arduino/hardware/piconomix/stm32/variants/PX_HER0/variant.h rename to boards/arm/stm32/piconomix_hero_board/arduino/variants/PX_HER0/variant.h diff --git a/doc/images/arduino_hero_board/arduino_hero_board_manager.png b/doc/images/arduino_hero_board/arduino_hero_board_manager.png index 02719098..ba5dd22a 100644 Binary files a/doc/images/arduino_hero_board/arduino_hero_board_manager.png and b/doc/images/arduino_hero_board/arduino_hero_board_manager.png differ diff --git a/doc/images/arduino_hero_board/arduino_hero_options.png b/doc/images/arduino_hero_board/arduino_hero_options.png index 12811590..8bde4fbe 100644 Binary files a/doc/images/arduino_hero_board/arduino_hero_options.png and b/doc/images/arduino_hero_board/arduino_hero_options.png differ diff --git a/doc/images/arduino_hero_board/arduino_hero_preferences.png b/doc/images/arduino_hero_board/arduino_hero_preferences.png index f8d6a63b..a59db3cc 100644 Binary files a/doc/images/arduino_hero_board/arduino_hero_preferences.png and b/doc/images/arduino_hero_board/arduino_hero_preferences.png differ diff --git a/doc/images/arduino_hero_board/arduino_hero_preferences_menu.png b/doc/images/arduino_hero_board/arduino_hero_preferences_menu.png index 6943e35d..4e20eca8 100644 Binary files a/doc/images/arduino_hero_board/arduino_hero_preferences_menu.png and b/doc/images/arduino_hero_board/arduino_hero_preferences_menu.png differ diff --git a/doc/images/arduino_hero_board/arduino_hero_select.png b/doc/images/arduino_hero_board/arduino_hero_select.png index e309c679..f9ad0a13 100644 Binary files a/doc/images/arduino_hero_board/arduino_hero_select.png and b/doc/images/arduino_hero_board/arduino_hero_select.png differ