Skip to content

Commit 6589a0a

Browse files
committed
add IDE support for using stm8gal
1 parent b193d02 commit 6589a0a

2 files changed

Lines changed: 33 additions & 8 deletions

File tree

sduino/hardware/sduino/stm8/boards.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,18 @@ stm8sdisco.upload.speed=1
4343

4444

4545
##############################################################
46+
s8uno.name=sduino_UNO Board with STM8S105K6
4647

47-
s8uno.name=sduino_UNO Board with STM8S105K6 using stlink
48-
49-
s8uno.upload.using=stm8flash
50-
s8uno.upload.protocol=stlink
51-
s8uno.upload.mcu=stm8s105?6
48+
# we need to specify a protocol in order to use the bootloader
49+
s8uno.upload.tool=stm8gal
50+
s8uno.upload.protocol=serial
51+
s8uno.upload.speed=230400
5252
s8uno.upload.maximum_size=32768
53+
s8uno.upload.maximum_data_size=2048
5354

5455
s8uno.build.mcu=STM8S105
5556
s8uno.build.f_cpu=16000000L
57+
s8uno.build.board=STM8S_UNO
5658
s8uno.build.core=sduino
5759
s8uno.build.variant=s8uno
5860

59-
# meaningless variables just to keep the makefile happy
60-
61-
s8uno.upload.speed=115200

sduino/hardware/sduino/stm8/platform.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ version=1.6.15
1313
# ----------------------------------
1414
# For Board Manager installs these variables are already predefined and will
1515
# not be overwritten. This assignment is done only for manual installs.
16+
#
17+
# Apparently, this trick only works for compiler settings, not for the
18+
# upload process. The upload process is not handled by arduino-build, but
19+
# the IDE itself and behaves slightly differently.
20+
# FIXME: find a solution to allow for uploads with manual installations.
1621
runtime.tools.sdcc.path={runtime.hardware.path}/tools/sdcc
1722
runtime.tools.STM8Tools.path={runtime.hardware.path}/tools
1823

@@ -134,3 +139,24 @@ tools.stm8flash.path.macosx={runtime.tools.STM8Tools.path}/macosx
134139
tools.stm8flash.upload.params.verbose=
135140
tools.stm8flash.upload.params.quiet=
136141
tools.stm8flash.upload.pattern="{path}/{cmd}" -c{upload.protocol} -p{upload.mcu} -s flash -w "{build.path}/{build.project_name}.hex"
142+
143+
144+
# Serial upload using the builtin bootloader
145+
# ------------------------------------------
146+
147+
tools.stm8gal.cmd=stm8gal
148+
tools.stm8gal.path={runtime.tools.STM8Tools.path}/linux
149+
#tools.stm8gal.path={runtime.hardware.path}/tools/linux
150+
tools.stm8gal.path.windows={runtime.tools.STM8Tools.path}/win
151+
tools.stm8gal.path.macosx={runtime.tools.STM8Tools.path}/macosx
152+
#tools.stm8gal.path.linux64={runtime.hardware.path}/tools/linux64
153+
154+
#tools.stm8gal.upload.params.verify=
155+
tools.stm8gal.upload.params.noverify=-v
156+
tools.stm8gal.upload.params.verbose=-V
157+
tools.stm8gal.upload.params.quiet=
158+
tools.stm8gal.upload.pattern="{path}/{cmd}" -p "{serial.port}" {upload.verbose} {upload.verify} -R 1 -u 2 -Q -w "{build.path}/{build.project_name}.hex"
159+
160+
#tools.stm8gal.erase.params.verbose=-V
161+
#tools.stm8gal.erase.params.quiet=
162+
#tools.stm8gal.erase.pattern="{path}/{cmd}" "-p{serial.port}" {erase.verbose} -R1 -u2 -Q -e

0 commit comments

Comments
 (0)