Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rogerclarkmelbourne/Arduino_STM32
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: rogerclarkmelbourne/Arduino_STM32
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Oct 31, 2016

  1. Add files via upload

    Phonog authored Oct 31, 2016
    Copy the full SHA
    49d5ed2 View commit details
  2. Add files via upload

    Phonog authored Oct 31, 2016
    Copy the full SHA
    ee3a305 View commit details
  3. Add files via upload

    Phonog authored Oct 31, 2016
    Copy the full SHA
    9765b9b View commit details
  4. Add files via upload

    Phonog authored Oct 31, 2016
    Copy the full SHA
    9e5911b View commit details

Commits on Dec 18, 2016

  1. Copy the full SHA
    380b863 View commit details

Commits on Feb 3, 2018

  1. Copy the full SHA
    2536e6d View commit details
  2. Copy the full SHA
    5ca1b19 View commit details

Commits on Feb 16, 2018

  1. upload-reset: fix/rewrite

    The code in upload-reset did not work for me, and quick googling
    shows I'm not the only one. I tried to fix it (and succeeded)
    and in the process I rewrote it to be way simpler/cleaner.
    
    Most probably the code was not working because TIOCMGET and then
    TIOCMSET were used, which is slower than use a direct ioctl command
    to set/clear a flag. Maybe there were something else.
    
    Anyway, the new code is working almost always for my Blue Pill.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Feb 16, 2018
    Copy the full SHA
    5dcd970 View commit details
  2. maple_upload: better error handing

    1. If upload-reset failed, keep going but warn a user and give them a
    hint that RESET butting might need to be used instead of autoreset.
    
    2. If dfu-util failed, report it and skip the wait.
    
    3. If waiting for device was unsuccesful, report it.
    
    4. Check dfu-util presense earlier in the code.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Feb 16, 2018
    Copy the full SHA
    ae33c88 View commit details

Commits on May 14, 2018

  1. Add frequency to hardware i2c

    Tested with Naze32 @72MHz & BMP280 working at 1.2Mhz
    It doesn't break existing code
    jjbubka committed May 14, 2018
    Copy the full SHA
    de1141d View commit details

Commits on Jul 4, 2018

  1. Copy the full SHA
    0dc153e View commit details

Commits on Aug 4, 2018

  1. Copy the full SHA
    6791e79 View commit details

Commits on Aug 9, 2018

  1. make __always_inline compatible with older gcc versions; replace inli…

    …ne __always_inline in USBComposite library
    arpruss committed Aug 9, 2018
    Copy the full SHA
    03184ad View commit details

Commits on Aug 20, 2018

  1. Fix clearing of TIMx_SR register

    To clear specific bits in TIMx_SR registers, libmaple code
    used to do
    
      TIMx_SR &= ~(events_handled);  // wrong
    
    This is wrong. If a new event occurs between the read from TIMx_SR
    and the write to TIMx_SR, that new event will be cleared immediately
    without ever being noticed or handled.
    
    A better way to clear specific bits is
    
      TIMx_SR = ~(events_handled);  // good
    
    This writes '0' to the bits to be cleared, and '1' to all other bits.
    The hardware will not allow software to change any SR bits from 0 to 1;
    only hardware events can do that. So bits written as '1' are effectively
    ignored and bits written as '0' are cleared. Exactly what we need.
    jorisvr committed Aug 20, 2018
    Copy the full SHA
    73e268d View commit details

Commits on Aug 23, 2018

  1. Copy the full SHA
    a0408b1 View commit details
  2. C++ requires that static object destructors are called when the

    program terminates. Recent versions of GCC use __cxa_atexit to
    register exit handlers which call these object destructors.
    
    With the -fno-use-cxa-atexit command line option, GCC uses atexit
    instead (same functionality, but only up to 32 exit handlers can
    be registered).
    
    Since the Arduino main process can not return, and calls to exit()
    simply call an infinite loop - so all of this is completely
    irrelevant. No exit handlers are ever called.
    
    By removing the unused __cxa_atexit functionality we save a bit of
    space, and enable further cleanups (in later commits).
    justinschoeman committed Aug 23, 2018
    Copy the full SHA
    5b214da View commit details

Commits on Aug 24, 2018

  1. Remove uncallable libc call

    main() never exits. The subsequent call to exit() links in the libc
    exit symbol and all that it calls (including free() and a few others.
    Removing this saves around 2k of flash.
    justinschoeman committed Aug 24, 2018
    Copy the full SHA
    a58f650 View commit details

Commits on Sep 18, 2018

  1. Fix for possible break of DFU functionality

    shodan committed Sep 18, 2018
    Copy the full SHA
    92b46fb View commit details

Commits on Feb 3, 2019

  1. Copy the full SHA
    49d0cd4 View commit details
  2. Copy the full SHA
    0f868ec View commit details
  3. Copy the full SHA
    c1aba24 View commit details
  4. Copy the full SHA
    e69cf8f View commit details

Commits on Feb 8, 2019

  1. Protect _settings[] array from accesses beyond end

    _settings[] array is accessed beyond the end of the array if BOARD_NR_SPI is defined as 1 on for example the HyTiny board.
    mitchmitchell authored Feb 8, 2019
    Copy the full SHA
    e2f2937 View commit details
  2. additional checks for BOARD_NR_SPI == 1 or 2

    Insure code is properly compiled for boards with fewer than the usual number of SPIs
    mitchmitchell authored Feb 8, 2019
    Copy the full SHA
    ac24ff4 View commit details
  3. additional checks for #if BOARD_NR_SPI >= 1 and 2

    Check #if BOARD_NR_SPI >= 1 or >= 2 as is done for >=3 to avoid compiling invalid code on boards that have fewer SPIs
    mitchmitchell authored Feb 8, 2019
    Copy the full SHA
    4865add View commit details
  4. prevent _settings[] array from being written to beyond the end of the…

    … array
    
    check for #if BOARD_NR_SPI >= 1 and 2 as is done for >= 3 to insure _settings[] array is not written beyond the end.
    mitchmitchell authored Feb 8, 2019
    Copy the full SHA
    096facf View commit details

Commits on Feb 24, 2019

  1. Copy the full SHA
    73ec420 View commit details

Commits on Feb 27, 2019

  1. Added KEY_NUM_LOCK definition

    VergLsm committed Feb 27, 2019
    Copy the full SHA
    8d883a4 View commit details
  2. Copy the full SHA
    ee0caa6 View commit details

Commits on Mar 17, 2019

  1. Fixed float constant

    Fixed a float constant so double precision multiply is not linked in
    profdc9 authored Mar 17, 2019
    Copy the full SHA
    da2c9cb View commit details

Commits on Mar 22, 2019

  1. Update SingleChannelSingleConversion.ino

    Corrected class definition
    stevstrong authored Mar 22, 2019
    Copy the full SHA
    cc76bca View commit details
  2. Update SingleChannelSingleConversion.ino

    fix unresolved variable
    stevstrong authored Mar 22, 2019
    Copy the full SHA
    96a47b5 View commit details
  3. Copy the full SHA
    1763d8a View commit details

Commits on Mar 24, 2019

  1. Update SingleChannelSingleConversion.ino

    corrected ADC interrupt
    stevstrong authored Mar 24, 2019
    Copy the full SHA
    1167371 View commit details

Commits on Mar 30, 2019

  1. Fixed incorect arguments for stlink_upload

    The number of arguments being passed to the stlink_upload script on
    linux, linux64, macosx is one (this may have been more in the past but
    the with version 1.8.8) this is now only a single argument.
    
    The change changes the variable referenced in the script from $4 to $1.
    
    This change already appears to have been applied to the windows version
    of the script.
    timsavage committed Mar 30, 2019
    Copy the full SHA
    398fff6 View commit details

Commits on Mar 31, 2019

  1. Merge pull request #616 from timsavage/bugfix/stlink_upload

    Fixed incorrect arguments for stlink_upload
    rogerclarkmelbourne authored Mar 31, 2019
    Copy the full SHA
    677de8c View commit details

Commits on Jun 13, 2019

  1. bugfix:HardwareSerial check framing or parity error

    Currently HardwareSerial uart does not check if a framing error
    (parity error or invalid stop bit) has occured and simply
    forward the received byte to the caller. This results in spurious
    invalid data being received e.g. when the uart pin is left floating
    or when a connected device is reset. This confuses apps using uart,
    and cause apps to abort with errors.
    
    this fix checks received bytes for framing error (parity error or
    stop bit errors) and discards them if a framing error occured
    ag88 committed Jun 13, 2019
    Copy the full SHA
    23b3edc View commit details
  2. RTC Adjustment examples

    this commit provides examples to adjust for RTC drifts
    as discussed in thread
    http://www.stm32duino.com/viewtopic.php?f=18&t=4365
    
    it provides a new set of source files in
    STM32F1/libraries/RTClock/examples/RTCAdj
    
    these examples uses RTClock functionality
    and do not affect/or change existing functionality
    ag88 committed Jun 13, 2019
    Copy the full SHA
    ce70b32 View commit details

Commits on Jun 14, 2019

  1. Merge pull request #641 from ag88/RTCAdjust_examples

    RTC Adjustment examples
    rogerclarkmelbourne authored Jun 14, 2019
    Copy the full SHA
    7b3d634 View commit details
  2. Merge pull request #554 from jorisvr/fix_timer

    Fix clearing of TIMx_SR register
    rogerclarkmelbourne authored Jun 14, 2019
    Copy the full SHA
    2e1d0f6 View commit details

Commits on Jun 17, 2019

  1. Copy the full SHA
    d59612e View commit details

Commits on Jun 29, 2019

  1. Copy the full SHA
    400f5fd View commit details

Commits on Jul 28, 2019

  1. Remove reference to www.stm32duino.com

    Hosting of www.stm32duino.com could no be sustained, because traffic and CPU usage breached the AUP on my hosting.
    
    I am unable to continue hosting the forum, and GDPR and other worldwide privacy laws make it impossible for me to give the forum including the data to ST or anyone else.
    rogerclarkmelbourne authored Jul 28, 2019
    8
    Copy the full SHA
    a3a5686 View commit details
  2. Handle strchr_P alias for AVR code compat

    This function is used in some projects (Marlin) and require to be defined
    tpruvot committed Jul 28, 2019
    Copy the full SHA
    9c369ac View commit details

Commits on Jul 29, 2019

  1. SPI: fix annoying unused variables warnings

    - use const for ff variable to avoid unused variable on each SPI.h include
    - move the spi_this refs where its used...
    - and also the 3 others ones :
    
    STM32F1\libraries\SPI\src\SPI.cpp:784:12
      warning: enumeration value 'RCC_AHB' not handled in switch [-Wswitch]
    
    STM32F1\libraries\SPI\src\SPI.cpp:392:5:
      warning: this 'while' clause does not guard... [-Wmisleading-indentation]
    
    Sample use : https://travis-ci.org/MarlinFirmware/Marlin/jobs/564740480
    tpruvot committed Jul 29, 2019
    Copy the full SHA
    920b075 View commit details

Commits on Aug 8, 2019

  1. Remove compiler warning

    Now all enum values (of rcc_clk_domain) used
    saloid authored Aug 8, 2019
    Copy the full SHA
    5d85d7b View commit details
  2. waitSpiTransferEnd function added

    And replaced
    "while (spi_is_tx_empty(spi_d) == 0)
    while (spi_is_busy(spi_d) != 0)"
    in all places
    saloid authored Aug 8, 2019
    Copy the full SHA
    f9e5e90 View commit details

Commits on Aug 28, 2019

  1. Copy the full SHA
    7eb0333 View commit details

Commits on Aug 29, 2019

  1. Copy the full SHA
    4f2707a View commit details

Commits on Sep 11, 2019

  1. Copy the full SHA
    87141e1 View commit details
Showing 504 changed files with 26,708 additions and 11,699 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/TestCompile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# TestCompile.yml
# Github workflow script to test compile all examples of an Arduino core repository.
#
# Copyright (C) 2020 Armin Joachimsmeyer
# https://github.com/ArminJo/Github-Actions
#

# This is the name of the workflow, visible on GitHub UI.
name: TestCompile
on:
workflow_dispatch: # To run it manually
description: 'manual build check'
push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
paths:
- '**.ino'
- '**.cpp'
- '**.h'
- '**TestCompile.yml'
pull_request:
jobs:
build:
name: Test compiling examples for Arduino_STM32
runs-on: ubuntu-latest
env:
# PLATFORM_DEFAULT_URL: http://dan.drown.org/stm32duino/package_STM32duino_index.json
# Comma separated list without double quotes around the list.
REQUIRED_LIBRARIES: SdFat,Streaming,Adafruit GFX Library,Adafruit SSD1306,Adafruit STMPE610,Adafruit TouchScreen,SD

strategy:
matrix:
# The matrix will produce one job for each configuration parameter of type `arduino-boards-fqbn`
# In the Arduino IDE, the fqbn is printed in the first line of the verbose output for compilation as parameter -fqbn=... for the "arduino-builder -dump-prefs" command
#
# Examples: arduino:avr:uno, arduino:avr:leonardo, arduino:avr:nano, arduino:avr:mega
# arduino:sam:arduino_due_x, arduino:samd:arduino_zero_native"
# ATTinyCore:avr:attinyx5:chip=85,clock=1internal, digistump:avr:digispark-tiny, digistump:avr:digispark-pro
# STM32:stm32:GenF1:pnum=BLUEPILL_F103C8
# esp8266:esp8266:huzzah:eesz=4M3M,xtal=80, esp32:esp32:featheresp32:FlashFreq=80
# You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace
#############################################################################################################
arduino-boards-fqbn:
- stm32duino:STM32F1:genericSTM32F103C
#- stm32duino:STM32F1:nucleo_f103rb
#- stm32duino:STM32F1:mapleMini

# Specify parameters for each board.
# With sketches-exclude you may exclude specific examples for a board. Use a comma separated list.
#############################################################################################################
include:
- arduino-boards-fqbn: stm32duino:STM32F1:genericSTM32F103C
# errors: BOARD_BUTTON_PIN not defined, 'textsize' was not declared in this scope, 'A0' was not declared in this scope, 'BOARD_LED_PIN' was not declared in this scope, no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)
sketches-exclude: Debounce,StateChangeDetection,Button,QASlave,InteractiveTest,WhileStatementConditional,HardwareTimerOnePulseMode,HardwareTimerPWMInput,StringEx_Parsing,hello_STM,MIDI_Classic_Mode,JeeUdp,multipacketSD,udpListener,etherNode,SingleChannelContinuousConversion,OLED_I2C_NumberFonts,OLED_I2C_TinyFont_View,OLED_I2C_Scrolling_Text,OLED_I2C_Bitmap,OLED_I2C_3D_Cube,OLED_I2C_ViewFont,OLED_I2C_Graph_Demo,OLED_I2C_Brightness,OLED_I2C_NumberFonts,OLED_I2C_TinyFont_View,coos_display_blink,rtos_blink,rtos_display_blink,Twitter_Serial_GW,XivelyClientString,XivelyClient,ssd1306_128x64_i2c_STM32,breakouttouchpaint,graphicstest,stm32_graphicstest,TFT_Rainbow_ILI9341,TFT_Clock_ILI9341,TFT_Clock_Digital_ILI9341,TFT_Show_Font_ILI9341,graphicstest,stm32_graphicstest,onoffbutton_breakout,onoffbutton_breakout,onoffbutton,spitftbitmap,ssd1306_128x64_spi,ssd1306_128x32_i2c,ssd1306_128x32_spi,sdreader

#- arduino-boards-fqbn: stm32duino:STM32F1:nucleo_f103rb
# Examples to exclude because of ...
#sketches-exclude: WiiClassicJoystick,BasicUsage,DigisparkOLED,SoftPwm13Pins,TinySoftPwmDemo,DigiUSB2LCD,DigisparkUSBDemo,ArduinoNunchukDemo,DigisparkJoystickDemo

# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master

- name: Use this repo as Arduino core
run: |
mkdir --parents $HOME/.arduino15/packages/stm32duino/hardware/STM32F1/0.0.7 # dummy release number
# cannot move, since we want to compile the examples in the library subfolder :-)
ln -s $GITHUB_WORKSPACE/STM32F1/* $HOME/.arduino15/packages/stm32duino/hardware/STM32F1/0.0.7
#cp --recursive $GITHUB_WORKSPACE/STM32F1/* $HOME/.arduino15/packages/stm32duino/hardware/STM32F1/0.0.7/
#ls -l --dereference --recursive --all $HOME/.arduino15/packages/stm32duino/hardware/STM32F1/0.0.7/
- name: Compile all examples
uses: ArminJo/arduino-test-compile@master
with:
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
arduino-platform: stm32duino:STM32F1,arduino:sam # we require the C compiler from it. See dependencies of package_STM32duino_index.json
#platform-default-url: ${{ env.PLATFORM_DEFAULT_URL }}
#platform-url: ${{ matrix.platform-url }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}
sketch-names: "*.ino"
sketch-names-find-start: STM32F1/libraries/*/examples/
#debug-install: true
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -11,23 +11,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
## Summary:
This repo contains the "Hardware" files to support STM32 based boards on Arduino version 1.8.x (some older versions may also work) including [LeafLabs Maple, and Maple mini](http://www.leaflabs.com/about-maple/), and other generic STM32F103 boards.

***PRIMARY SUPPORT FORUM: http://www.stm32duino.com/***

***We are also on Gitter https://gitter.im/stm32duino/Lobby/***
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/stm32duino/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Background & Support:
* Based on https://github.com/bobc/maple-asp, which is in turn based on LibMaple by Leaflabs
* **Please read the wiki (https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki) for full details**
* See also my blog: http://www.rogerclark.net/stm32f103-and-maple-maple-mini-with-arduino-1-5-x-ide/
* **NEW: Main support site for using STM32 boards with the Arduino IDE: http://www.stm32duino.com/**
* Original LeafLabs "Docs:" http://docs.leaflabs.com/docs.leaflabs.com/index.html

## Known issues
* Use of static variables inside functions greatly increase the code size becuase additional code is needed for thread-safe handling of these statics.
If this is a problem for your application, please edit platform.txt and add -fno-threadsafe-statics the compiler.cpp.flags

**YouTube Videos:**
* 20141116: [Arduino 1.5.8 IDE with STM32 board](https://www.youtube.com/watch?v=-zwGnytGT8M)
* 20150413: [STM32 for Arduino 1.6.2 or newer (update)](https://www.youtube.com/watch?v=TePglhSkghg)
* 20150419: [Uploading via USB to Serial to STM32F103 boards](https://www.youtube.com/watch?v=G_RF0a0hrak)

## Additional Links & Info:
* https://www.hackster.io/rayburne/4-dollar-90-mips-32-bit-72-mhz-arm-arduino
105 changes: 105 additions & 0 deletions STM32F1/boards.txt
Original file line number Diff line number Diff line change
@@ -396,6 +396,15 @@ genericSTM32F103C.menu.upload_method.HIDUploadMethod.build.vect=VECT_TAB_ADDR=0x
genericSTM32F103C.menu.upload_method.HIDUploadMethod.build.ldscript=ld/hid_bootloader.ld

#-- CPU Clock frequency

genericSTM32F103C.menu.cpu_speed.speed_hsi_64mhz=64Mhz (HSI)
genericSTM32F103C.menu.cpu_speed.speed_hsi_64mhz.build.f_cpu=64000000L
genericSTM32F103C.menu.cpu_speed.speed_hsi_64mhz.build.hs_flag=-DUSE_HSI_CLOCK

genericSTM32F103C.menu.cpu_speed.speed_hsi_48mhz=48Mhz (HSI- USB)
genericSTM32F103C.menu.cpu_speed.speed_hsi_48mhz.build.f_cpu=48000000L
genericSTM32F103C.menu.cpu_speed.speed_hsi_48mhz.build.hs_flag=-DUSE_HSI_CLOCK -DHSI_USB_SPEED

genericSTM32F103C.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
genericSTM32F103C.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L

@@ -432,6 +441,102 @@ genericSTM32F103C.menu.opt.ogstd=Debug (-g)
genericSTM32F103C.menu.opt.ogstd.build.flags.optimize=-Og
genericSTM32F103C.menu.opt.ogstd.build.flags.ldspecs=

###################### Generic STM32F103C6 ########################################

genericSTM32F103C6.name=Generic STM32F103C6/fake STM32F103C8
genericSTM32F103C6.vid.0=0x1EAF
genericSTM32F103C6.pid.0=0x0004
genericSTM32F103C6.build.variant=generic_stm32f103c
genericSTM32F103C6.build.vect=VECT_TAB_ADDR=0x8000000
genericSTM32F103C6.build.core=maple
genericSTM32F103C6.build.board=GENERIC_STM32F103C
genericSTM32F103C6.build.error_led_port=GPIOC
genericSTM32F103C6.build.error_led_pin=13
genericSTM32F103C6.upload.use_1200bps_touch=false
genericSTM32F103C6.upload.file_type=bin
genericSTM32F103C6.upload.auto_reset=true
genericSTM32F103C6.upload.tool=maple_upload
genericSTM32F103C6.upload.protocol=maple_dfu
genericSTM32F103C6.build.cpu_flags=-DMCU_STM32F103C6
genericSTM32F103C6.build.ldscript=ld/jtag_c6.ld
genericSTM32F103C6.upload.maximum_size=32768
genericSTM32F103C6.upload.maximum_data_size=10240

#---------------------------- UPLOAD METHODS ---------------------------

genericSTM32F103C6.menu.upload_method.DFUUploadMethod=STM32duino bootloader
genericSTM32F103C6.menu.upload_method.DFUUploadMethod.upload.protocol=maple_dfu
genericSTM32F103C6.menu.upload_method.DFUUploadMethod.upload.tool=maple_upload
genericSTM32F103C6.menu.upload_method.DFUUploadMethod.build.upload_flags=-DSERIAL_USB -DGENERIC_BOOTLOADER
genericSTM32F103C6.menu.upload_method.DFUUploadMethod.build.vect=VECT_TAB_ADDR=0x8002000
genericSTM32F103C6.menu.upload_method.DFUUploadMethod.build.ldscript=ld/bootloader_20_c6.ld
genericSTM32F103C6.menu.upload_method.DFUUploadMethod.upload.usbID=1EAF:0003
genericSTM32F103C6.menu.upload_method.DFUUploadMethod.upload.altID=2
genericSTM32F103C6.menu.upload_method.DFUUploadMethod.upload.maximum_size=24576

genericSTM32F103C6.menu.upload_method.serialMethod=Serial
genericSTM32F103C6.menu.upload_method.serialMethod.upload.protocol=maple_serial
genericSTM32F103C6.menu.upload_method.serialMethod.upload.tool=serial_upload
genericSTM32F103C6.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG

genericSTM32F103C6.menu.upload_method.STLinkMethod=STLink
genericSTM32F103C6.menu.upload_method.STLinkMethod.upload.protocol=STLink
genericSTM32F103C6.menu.upload_method.STLinkMethod.upload.tool=stlink_upload
genericSTM32F103C6.menu.upload_method.STLinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER

genericSTM32F103C6.menu.upload_method.BMPMethod=BMP (Black Magic Probe)
genericSTM32F103C6.menu.upload_method.BMPMethod.upload.protocol=gdb_bmp
genericSTM32F103C6.menu.upload_method.BMPMethod.upload.tool=bmp_upload
genericSTM32F103C6.menu.upload_method.BMPMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG

genericSTM32F103C6.menu.upload_method.jlinkMethod=JLink
genericSTM32F103C6.menu.upload_method.jlinkMethod.upload.protocol=jlink
genericSTM32F103C6.menu.upload_method.jlinkMethod.upload.tool=jlink_upload
genericSTM32F103C6.menu.upload_method.jlinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER

#genericSTM32F103C6.menu.upload_method.HIDUploadMethod=HID bootloader 2.0
#genericSTM32F103C6.menu.upload_method.HIDUploadMethod.upload.tool=hid_upload
#genericSTM32F103C6.menu.upload_method.HIDUploadMethod.build.upload_flags=-DSERIAL_USB -DGENERIC_BOOTLOADER
#genericSTM32F103C6.menu.upload_method.HIDUploadMethod.build.vect=VECT_TAB_ADDR=0x8001000
#genericSTM32F103C6.menu.upload_method.HIDUploadMethod.build.ldscript=ld/hid_bootloader_c6.ld

#-- CPU Clock frequency
genericSTM32F103C6.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
genericSTM32F103C6.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L

genericSTM32F103C6.menu.cpu_speed.speed_48mhz=48Mhz (Slow - with USB)
genericSTM32F103C6.menu.cpu_speed.speed_48mhz.build.f_cpu=48000000L

genericSTM32F103C6.menu.cpu_speed.speed_128mhz=Overclocked 128Mhz NO USB SERIAL. MANUAL RESET NEEDED TO UPLOAD
genericSTM32F103C6.menu.cpu_speed.speed_128mhz.build.f_cpu=128000000L

#-- Optimizations
genericSTM32F103C6.menu.opt.osstd=Smallest (default)
#genericSTM32F103C6.menu.opt.oslto=Smallest Code with LTO
#genericSTM32F103C6.menu.opt.oslto.build.flags.optimize=-Os -flto
#genericSTM32F103C6.menu.opt.oslto.build.flags.ldspecs=-flto
genericSTM32F103C6.menu.opt.o1std=Fast (-O1)
genericSTM32F103C6.menu.opt.o1std.build.flags.optimize=-O1
genericSTM32F103C6.menu.opt.o1std.build.flags.ldspecs=
#genericSTM32F103C6.menu.opt.o1lto=Fast (-O1) with LTO
#genericSTM32F103C6.menu.opt.o1lto.build.flags.optimize=-O1 -flto
#genericSTM32F103C6.menu.opt.o1lto.build.flags.ldspecs=-flto
genericSTM32F103C6.menu.opt.o2std=Faster (-O2)
genericSTM32F103C6.menu.opt.o2std.build.flags.optimize=-O2
genericSTM32F103C6.menu.opt.o2std.build.flags.ldspecs=
#genericSTM32F103C6.menu.opt.o2lto=Faster (-O2) with LTO
#genericSTM32F103C6.menu.opt.o2lto.build.flags.optimize=-O2 -flto
#genericSTM32F103C6.menu.opt.o2lto.build.flags.ldspecs=-flto
genericSTM32F103C6.menu.opt.o3std=Fastest (-O3)
genericSTM32F103C6.menu.opt.o3std.build.flags.optimize=-O3
genericSTM32F103C6.menu.opt.o3std.build.flags.ldspecs=
#genericSTM32F103C6.menu.opt.o3lto=Fastest (-O3) with LTO
#genericSTM32F103C6.menu.opt.o3lto.build.flags.optimize=-O3 -flto
#genericSTM32F103C6.menu.opt.o3lto.build.flags.ldspecs=-flto
genericSTM32F103C6.menu.opt.ogstd=Debug (-g)
genericSTM32F103C6.menu.opt.ogstd.build.flags.optimize=-Og
genericSTM32F103C6.menu.opt.ogstd.build.flags.ldspecs=

########################### Generic STM32F103R ###########################

genericSTM32F103R.name=Generic STM32F103R series
59 changes: 21 additions & 38 deletions STM32F1/cores/maple/HardwareSerial.h
Original file line number Diff line number Diff line change
@@ -181,44 +181,27 @@ class HardwareSerial : public Stream {
#endif
};

#ifdef SERIAL_USB
#if BOARD_HAVE_USART1
extern HardwareSerial Serial1;
#endif
#if BOARD_HAVE_USART2
extern HardwareSerial Serial2;
#endif
#if BOARD_HAVE_USART3
extern HardwareSerial Serial3;
#endif
#if BOARD_HAVE_UART4
extern HardwareSerial Serial4;
#endif
#if BOARD_HAVE_UART5
extern HardwareSerial Serial5;
#endif
#if BOARD_HAVE_USART6
extern HardwareSerial Serial6;
#endif
#else
#if BOARD_HAVE_USART1
extern HardwareSerial Serial;
#endif
#if BOARD_HAVE_USART2
extern HardwareSerial Serial1;
#endif
#if BOARD_HAVE_USART3
extern HardwareSerial Serial2;
#endif
#if BOARD_HAVE_UART4
extern HardwareSerial Serial3;
#endif
#if BOARD_HAVE_UART5
extern HardwareSerial Serial4;
#endif
#if BOARD_HAVE_USART6
extern HardwareSerial Serial5;
#endif
#ifndef SERIAL_USB
#define Serial Serial1
#endif

#if BOARD_HAVE_USART1
extern HardwareSerial Serial1;
#endif
#if BOARD_HAVE_USART2
extern HardwareSerial Serial2;
#endif
#if BOARD_HAVE_USART3
extern HardwareSerial Serial3;
#endif
#if BOARD_HAVE_UART4
extern HardwareSerial Serial4;
#endif
#if BOARD_HAVE_UART5
extern HardwareSerial Serial5;
#endif
#if BOARD_HAVE_USART6
extern HardwareSerial Serial6;
#endif

#endif //_WIRISH_HARDWARESERIAL_H_
1 change: 1 addition & 0 deletions STM32F1/cores/maple/HardwareTimer.h
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@ class HardwareTimer {
*/
HardwareTimer(uint8 timerNum);

void init(void) { timer_init(this->dev); timer_pause(this->dev); }
/**
* @brief Stop the counter, without affecting its configuration.
*
4 changes: 2 additions & 2 deletions STM32F1/cores/maple/Stream.cpp
Original file line number Diff line number Diff line change
@@ -177,7 +177,7 @@ float Stream::parseFloat(char skipChar){
boolean isFraction = false;
long value = 0;
int c;
float fraction = 1.0;
float fraction = 1.0f;

c = peekNextDigit();
// ignore non numeric leading characters
@@ -194,7 +194,7 @@ float Stream::parseFloat(char skipChar){
else if(c >= '0' && c <= '9') { // is c a digit?
value = value * 10 + c - '0';
if(isFraction)
fraction *= 0.1;
fraction *= 0.1f;
}
read(); // consume the character we got with peek
c = timedPeek();
Loading