Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

fix: 1.8.x compatibility, defined tools and patterns #15

Merged
merged 2 commits into from
Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions boards.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# edited 01 jun 2016 - Arduino Srl (http://www.arduino.org/) - Francesco Alessi (alfran) - [email protected]

##############################################################
star_otto.name=Arduino Star OTTO

star_otto.vid.0=0x2341
star_otto.vid.0=0x2A03
star_otto.pid.0=0x0058

star_otto.upload.tool=dfu-util
Expand All @@ -20,13 +19,15 @@ star_otto.upload.usbID=0483:DF11
star_otto.upload.altID=0

star_otto.build.mcu=cortex-m4
star_otto.build.board=otto
star_otto.build.board=STM32_STAR_OTTO
star_otto.build.f_cpu=180000000L
star_otto.build.core=arduino
star_otto.build.extra_flags=-DSTM32F469xx -DMCU_STM32F469NI -mthumb -DSTM32_HIGH_DENSITY
star_otto.build.esp_ch_uart_br=460800
star_otto.build.extra_flags=-DSTM32F469xx -DMCU_STM32F469NI -mthumb -DSTM32_HIGH_DENSITY -DESP_CH_UART -DESP_CH_UART_BR={build.esp_ch_uart_br}
star_otto.build.ldscript=link-tools/jtag.ld
star_otto.build.variant=otto
star_otto.build.variant_system_lib=libstm32f4_otto_gcc_rel.a
star_otto.build.vect=VECT_TAB_BASE
star_otto.build.density=STM32_HIGH_DENSITY

##############################################################
61 changes: 14 additions & 47 deletions platform.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# Arduino STM32 Core and platform

# Arduino STM32F4 Core and platform
# ------------------------------
#
# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification

#
# edited 1 Jun 2016 - Arduino srl - Francesco Alessi (alfran) - [email protected]
#

name=Arduino STM32 (32-bits) boards
version=1.7.0
name=Arduino STM32F4 (32-bits ARM Cortex-M4) Boards
version=1.0.0

# STM32 compiler variables
# STM32F4 compiler variables
# ------------------------

compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-c -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -D{build.vect} -Dprintf=iprintf -MMD {compiler.libs.c.flags}
compiler.c.elf.cmd=arm-none-eabi-gcc
Expand Down Expand Up @@ -69,10 +67,10 @@ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -m
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"

## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/syscalls.c.o" {object_files} -Wl,--whole-archive "{build.variant.path}/{build.variant_system_lib}" -Wl,--no-whole-archive "{build.path}/{archive_file}" -Wl,--end-group
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/core/syscalls.c.o" {object_files} -Wl,--whole-archive "{build.variant.path}/{build.variant_system_lib}" -Wl,--no-whole-archive "{build.path}/{archive_file}" -Wl,--end-group

## Create eeprom
recipe.objcopy.eep.pattern=
Expand All @@ -88,53 +86,22 @@ recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build
recipe.size.regex=^(?:\.text|\.rodata|\.ARM.exidx)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*

# STM32 Uploader/Programmers tools
# --------------------------------

# Generic STM32 upload via serial to Serial Port 1 (pins PA9 and PA10) - note. Boot0 line needs to high on board reset to enable upload via serial
# at the end of the upload the program is automatically run, without the board being reset

tools.serial_upload.cmd=serial_upload
tools.serial_upload.cmd.windows=serial_upload.bat
tools.serial_upload.cmd.macosx=serial_upload
#tools.serial_upload.cmd.linux=

tools.serial_upload.path={runtime.hardware.path}/tools/win
tools.serial_upload.path.macosx={runtime.hardware.path}/tools/macosx

tools.serial_upload.upload.params.verbose=-d
tools.serial_upload.upload.params.quiet=
tools.serial_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"

# STLINK/V2

tools.stlink.cmd=stlink
tools.stlink.cmd.windows=stlink_upload.bat
tools.stlink.cmd.macosx=stlink_upload
#tools.stlink.cmd.linux=

tools.stlink.path.windows={runtime.hardware.path}/tools/win
tools.stlink.path.macosx={runtime.hardware.path}/tools/macosx

tools.stlink.upload.params.verbose=-d
tools.stlink.upload.params.quiet=
tools.stlink.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"

#
# DFU Util
# --------

tools.dfu-util.path={runtime.tools.dfu-util-0.8.0-stm32-arduino1.path}
tools.dfu-util.cmd=dfu-util
tools.dfu-util.cmd.windows=StAr_Write.bat

tools.dfu-util.path={runtime.ide.path}/hardware/tools/dfu-util/
tools.dfu-util.cmd.windows=dfu-util.cmd

tools.dfu-util.upload.params.verbose=-v
tools.dfu-util.upload.params.quiet=
tools.dfu-util.upload.pattern="{path}/{cmd}" "{path}" {upload.usbID} {upload.altID} {upload.mem_start} "{build.path}/{build.project_name}.bin"

#
# USB Flags
# ---------

# Default usb manufacturer will be replaced at compile time using
# numeric vendor ID if available or by board's specific value.
build.usb_manufacturer="Unknown"
tools.dfu-util.upload.pattern="{path}/{cmd}" "{path}" -l -d {upload.usbID} -a {upload.altID} -s {upload.mem_start} -O "{build.path}/{build.project_name}.bin" -f 0x08000000
11 changes: 0 additions & 11 deletions programmers.txt
Original file line number Diff line number Diff line change
@@ -1,11 +0,0 @@
/*
Copyright 2015 Arduino Srl (http://www.arduino.org/)

MISSING LICENSE

authors:
created 31 May 2016 - Francesco Alessi (alfran) - [email protected]
*/


# no programmer implemented, the DFU is in ROM.