Skip to content

Commit 14ce55a

Browse files
committed
removed unsupported/unused STM32F103 references
1 parent 94b6a0a commit 14ce55a

File tree

4 files changed

+9
-89
lines changed

4 files changed

+9
-89
lines changed

platformio.ini

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,6 @@ upload_protocol = dfu
133133
debug_tool = stlink
134134
monitor_speed = 115200
135135

136-
[env:bluepill_f103c8]
137-
platform = ststm32
138-
framework = arduino
139-
; framework-arduinoststm32
140-
board = bluepill_f103c8_128k
141-
lib_deps = EEPROM, stm32duino/STM32duino RTC @ 1.2.0, SimplyAtomic
142-
;build_flags = -DUSE_LIBDIVIDE -fpermissive -std=gnu++11 -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,-Map,output.map
143-
build_flags = -DUSE_LIBDIVIDE -fpermissive -std=gnu++11 -Os -DCORE_STM32_OFFICIAL -UBOARD_MAX_IO_PINS
144-
145136
;SAMD21
146137
[env:samd21]
147138
platform = atmelsam
@@ -178,7 +169,6 @@ extra_configs = local.ini
178169
;default_envs = teensy40
179170
;env_default = LaunchPad_tm4c1294ncpdt
180171
;env_default = genericSTM32F103RB
181-
;env_default = bluepill_f103c8
182172

183173
[env:native]
184174
platform = native

speeduino/board_stm32_official.cpp

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,12 @@ HardwareTimer Timer1(TIM1);
6868
HardwareTimer Timer2(TIM2);
6969
HardwareTimer Timer3(TIM3);
7070
HardwareTimer Timer4(TIM4);
71-
#if !defined(ARDUINO_BLUEPILL_F103C8) && !defined(ARDUINO_BLUEPILL_F103CB) //F103 just have 4 timers
7271
HardwareTimer Timer5(TIM5);
7372
#if defined(TIM11)
7473
HardwareTimer Timer11(TIM11);
7574
#elif defined(TIM7)
7675
HardwareTimer Timer11(TIM7);
7776
#endif
78-
#endif
7977

8078
#ifdef RTC_ENABLED
8179
STM32RTC& rtc = STM32RTC::getInstance();
@@ -130,25 +128,14 @@ STM32RTC& rtc = STM32RTC::getInstance();
130128
***********************************************************************************************************
131129
* Timers
132130
*/
133-
#if defined(ARDUINO_BLUEPILL_F103C8) || defined(ARDUINO_BLUEPILL_F103CB)
134-
Timer4.setOverflow(1000, MICROSEC_FORMAT); // Set up period
135-
#if ( STM32_CORE_VERSION_MAJOR < 2 )
136-
Timer4.setMode(1, TIMER_OUTPUT_COMPARE);
137-
Timer4.attachInterrupt(1, oneMSInterval);
138-
#else //2.0 forward
139-
Timer4.attachInterrupt(oneMSInterval);
140-
#endif
141-
Timer4.resume(); //Start Timer
131+
Timer11.setOverflow(1000, MICROSEC_FORMAT); // Set up period
132+
#if ( STM32_CORE_VERSION_MAJOR < 2 )
133+
Timer11.setMode(1, TIMER_OUTPUT_COMPARE);
134+
Timer11.attachInterrupt(1, oneMSInterval);
142135
#else
143-
Timer11.setOverflow(1000, MICROSEC_FORMAT); // Set up period
144-
#if ( STM32_CORE_VERSION_MAJOR < 2 )
145-
Timer11.setMode(1, TIMER_OUTPUT_COMPARE);
146-
Timer11.attachInterrupt(1, oneMSInterval);
147-
#else
148-
Timer11.attachInterrupt(oneMSInterval);
149-
#endif
150-
Timer11.resume(); //Start Timer
136+
Timer11.attachInterrupt(oneMSInterval);
151137
#endif
138+
Timer11.resume(); //Start Timer
152139
pinMode(LED_BUILTIN, OUTPUT); //Visual WDT
153140

154141
/*

speeduino/board_stm32_official.h

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
#endif
1717
#endif
1818

19-
#if defined(STM32F1)
20-
#include "stm32f1xx_ll_tim.h"
21-
#elif defined(STM32F3)
19+
#if defined(STM32F3)
2220
#include "stm32f3xx_ll_tim.h"
2321
#elif defined(STM32F4)
2422
#include "stm32f4xx_ll_tim.h"
@@ -50,8 +48,7 @@
5048
#define word(h, l) ((h << 8) | l) //word() function not defined for this platform in the main library
5149
#endif
5250

53-
#if defined(ARDUINO_BLUEPILL_F103C8) || defined(ARDUINO_BLUEPILL_F103CB) \
54-
|| defined(ARDUINO_BLACKPILL_F401CC) || defined(ARDUINO_BLACKPILL_F411CE)
51+
#if defined(ARDUINO_BLACKPILL_F401CC) || defined(ARDUINO_BLACKPILL_F411CE)
5552
//STM32 Pill boards
5653
#ifndef NUM_DIGITAL_PINS
5754
#define NUM_DIGITAL_PINS 35
@@ -65,11 +62,6 @@
6562
#endif
6663
#endif
6764

68-
//Specific mode for Bluepill due to its small flash size. This disables a number of strings from being compiled into the flash
69-
#if defined(MCU_STM32F103C8) || defined(MCU_STM32F103CB)
70-
#define SMALL_FLASH_MODE
71-
#endif
72-
7365
#define BOARD_MAX_DIGITAL_PINS NUM_DIGITAL_PINS
7466
#define BOARD_MAX_IO_PINS NUM_DIGITAL_PINS
7567
#if __GNUC__ < 7 //Already included on GCC 7
@@ -110,8 +102,7 @@ uint16_t freeRam();
110102
void doSystemReset();
111103
void jumpToBootloader();
112104

113-
#if defined(ARDUINO_BLUEPILL_F103C8) || defined(ARDUINO_BLUEPILL_F103CB) \
114-
|| defined(ARDUINO_BLACKPILL_F401CC) || defined(ARDUINO_BLACKPILL_F411CE)
105+
#if defined(ARDUINO_BLACKPILL_F401CC) || defined(ARDUINO_BLACKPILL_F411CE)
115106
#define pinIsReserved(pin) ( ((pin) == PA11) || ((pin) == PA12) || ((pin) == PC14) || ((pin) == PC15) )
116107

117108
#ifndef PB11 //Hack for F4 BlackPills
@@ -191,13 +182,6 @@ void jumpToBootloader();
191182
/*
192183
***********************************************************************************************************
193184
* Schedules
194-
* Timers Table for STM32F1
195-
* TIMER1 TIMER2 TIMER3 TIMER4
196-
* 1 - FAN 1 - INJ1 1 - IGN1 1 - oneMSInterval
197-
* 2 - BOOST 2 - INJ2 2 - IGN2 2 -
198-
* 3 - VVT 3 - INJ3 3 - IGN3 3 -
199-
* 4 - IDLE 4 - INJ4 4 - IGN4 4 -
200-
*
201185
* Timers Table for STM32F4
202186
* TIMER1 | TIMER2 | TIMER3 | TIMER4 | TIMER5 | TIMER11
203187
* 1 - FAN |1 - INJ1 |1 - IGN1 |1 - IGN5 |1 - INJ5 |1 - oneMSInterval
@@ -332,14 +316,12 @@ extern HardwareTimer Timer1;
332316
extern HardwareTimer Timer2;
333317
extern HardwareTimer Timer3;
334318
extern HardwareTimer Timer4;
335-
#if !defined(ARDUINO_BLUEPILL_F103C8) && !defined(ARDUINO_BLUEPILL_F103CB) //F103 just have 4 timers
336319
extern HardwareTimer Timer5;
337320
#if defined(TIM11)
338321
extern HardwareTimer Timer11;
339322
#elif defined(TIM7)
340323
extern HardwareTimer Timer11;
341324
#endif
342-
#endif
343325

344326
#if ((STM32_CORE_VERSION_MINOR<=8) & (STM32_CORE_VERSION_MAJOR==1))
345327
void oneMSInterval(HardwareTimer*);

speeduino/init.cpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,45 +2564,6 @@ void setPinMapping(byte boardID)
25642564
pinFlex = PC14; // Flex sensor (Must be external interrupt enabled)
25652565
pinTrigger = PC13; //The CAS pin also led pin so bad idea
25662566
pinTrigger2 = PC15; //The Cam Sensor pin
2567-
2568-
#elif defined(CORE_STM32)
2569-
//blue pill wiki.stm32duino.com/index.php?title=Blue_Pill
2570-
//Maple mini wiki.stm32duino.com/index.php?title=Maple_Mini
2571-
//pins PA12, PA11 are used for USB or CAN couldn't be used for GPIO
2572-
//PB2 can't be used as input because is BOOT pin
2573-
pinInjector1 = PB7; //Output pin injector 1 is on
2574-
pinInjector2 = PB6; //Output pin injector 2 is on
2575-
pinInjector3 = PB5; //Output pin injector 3 is on
2576-
pinInjector4 = PB4; //Output pin injector 4 is on
2577-
pinCoil1 = PB3; //Pin for coil 1
2578-
pinCoil2 = PA15; //Pin for coil 2
2579-
pinCoil3 = PA14; //Pin for coil 3
2580-
pinCoil4 = PA9; //Pin for coil 4
2581-
pinCoil5 = PA8; //Pin for coil 5
2582-
pinTPS = A0; //TPS input pin
2583-
pinMAP = A1; //MAP sensor pin
2584-
pinIAT = A2; //IAT sensor pin
2585-
pinCLT = A3; //CLS sensor pin
2586-
pinO2 = A4; //O2 Sensor pin
2587-
pinBat = A5; //Battery reference voltage pin
2588-
pinBaro = pinMAP;
2589-
pinIdle1 = PB2; //Single wire idle control
2590-
pinIdle2 = PA2; //2 wire idle control
2591-
pinBoost = PA1; //Boost control
2592-
pinVVT_1 = PA0; //Default VVT output
2593-
pinVVT_2 = PA2; //Default VVT2 output
2594-
pinStepperDir = PC15; //Direction pin for DRV8825 driver
2595-
pinStepperStep = PC14; //Step pin for DRV8825 driver
2596-
pinStepperEnable = PC13; //Enable pin for DRV8825
2597-
pinDisplayReset = PB2; // OLED reset pin
2598-
pinFan = PB1; //Pin for the fan output
2599-
pinFuelPump = PB11; //Fuel pump output
2600-
pinTachOut = PB10; //Tacho output pin
2601-
//external interrupt enabled pins
2602-
pinFlex = PB8; // Flex sensor (Must be external interrupt enabled)
2603-
pinTrigger = PA10; //The CAS pin
2604-
pinTrigger2 = PA13; //The Cam Sensor pin
2605-
26062567
#endif
26072568
break;
26082569
default:

0 commit comments

Comments
 (0)