Skip to content

Commit 28b2d99

Browse files
committed
Merge pull request #3 from rogerclarkmelbourne/master
Merging recent changes.
2 parents 7e59f08 + 0b7bbab commit 28b2d99

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

STM32F1/cores/maple/Print.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ size_t Print::write(const void *buffer, uint32 size) {
6565
}
6666

6767
size_t Print::print(uint8 b, int base) {
68-
print((uint64)b, base);
68+
return print((uint64)b, base);
6969
}
7070

7171
size_t Print::print(const String &s)

STM32F1/platform.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@
44
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
55

66
name=STM32 Boards (stm32duino)
7-
version=0.1.1
7+
version=0.1.2
8+
9+
compiler.warning_flags=-w -DDEBUG_LEVEL=DEBUG_NONE
10+
compiler.warning_flags.none=-w -DDEBUG_LEVEL=DEBUG_NONE
11+
compiler.warning_flags.default=-DDEBUG_LEVEL=DEBUG_NONE
12+
compiler.warning_flags.more=-Wall -DDEBUG_LEVEL=DEBUG_FAULT
13+
compiler.warning_flags.all=-Wall -Wextra -DDEBUG_LEVEL=DEBUG_ALL
814

915
# compiler variables
1016
# ----------------------
1117
compiler.path={runtime.ide.path}/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/
1218
compiler.c.cmd=arm-none-eabi-gcc
13-
compiler.c.flags=-c -g -Os -w -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -DBOARD_{build.variant} -D{build.vect} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin} -DDEBUG_LEVEL=DEBUG_NONE
19+
compiler.c.flags=-c -g -Os {compiler.warning_flags} -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -DBOARD_{build.variant} -D{build.vect} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin}
1420
compiler.c.elf.cmd=arm-none-eabi-g++
1521
compiler.c.elf.flags=-Os -Wl,--gc-sections
1622
compiler.S.cmd=arm-none-eabi-gcc
1723
compiler.S.flags=-c -g -x assembler-with-cpp -MMD
1824
compiler.cpp.cmd=arm-none-eabi-g++
19-
compiler.cpp.flags=-c -g -Os -w -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_{build.variant} -D{build.vect} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin} -DDEBUG_LEVEL=DEBUG_NONE
25+
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_{build.variant} -D{build.vect} -DERROR_LED_PORT={build.error_led_port} -DERROR_LED_PIN={build.error_led_pin}
2026
compiler.ar.cmd=arm-none-eabi-ar
2127
compiler.ar.flags=rcs
2228
compiler.objcopy.cmd=arm-none-eabi-objcopy
@@ -85,10 +91,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mcpu={b
8591
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
8692

8793
## Combine gc-sections, archives, and objects
88-
##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,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group "{build.path}/syscalls_sam3.c.o" {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group
89-
#-Wl,--entry=__start__
90-
#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 {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group
91-
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 {object_files} -Wl,--whole-archive "{build.path}/{archive_file}" -Wl,--no-whole-archive -Wl,--end-group
94+
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 {object_files} "{build.path}/{archive_file}" -Wl,--end-group
9295

9396
## Create eeprom
9497
recipe.objcopy.eep.pattern=

STM32F1/variants/nucleo_f103rb/board/board.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@
102102
/**
103103
* Note: there is no USB in this board.
104104
*/
105+
// Roger Clark. These USB disconnect pin definitions have been added as a temporary fix in order that the this board compiles
106+
// following changes to add usb serial to other boards
107+
// I will remove them when the code in the core usb_serial.cpp has been tidied up so that they are no longer needed.
108+
#define BOARD_USB_DISC_DEV GPIOB
109+
#define BOARD_USB_DISC_BIT 10
105110

106111
/* Pin aliases: these give the GPIO port/bit for each pin as an
107112
* enum. These are optional, but recommended. They make it easier to

0 commit comments

Comments
 (0)