Skip to content

Commit

Permalink
Merge branch 'release-0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tenbaht committed Dec 7, 2018
2 parents ead12d8 + e0448a2 commit 1db470f
Show file tree
Hide file tree
Showing 119 changed files with 6,287 additions and 92 deletions.
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[submodule "tools/stm8gal"]
path = tools/stm8gal
url = https://github.com/tenbaht/stm8gal.git
branch = detectMode
[submodule "tools/stm8flash"]
path = tools/stm8flash
url = [email protected]:tenbaht/stm8flash.git
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Support for Sduino-UNO board (s8uno)
- Support for Sduino MB board (mb208)
- Unlocking a MCU by using Tools->Burn Bootloader in the Arduino IDE
- new library LiquidCrystal_pcf2119 for I2C text LCD based on the PCF2119
- new library Wire for I2C communication
- new library EEPROM

### Changed
- completed I2C library, master transmit and master receive modes work
- updated stm8flash to support more STM8 devices and the ST-Link/V2.1
adapter found on STM8 Nucleo boards (and espstlink for Linux
and OSX)
- updated SDCC to version 3.8.0
- updated SDCC to version 3.8.1
- Arduino.h is automatically included now, no need for #include "Arduino.h"
anymore

### Fixed
- Serial_serial_print_sn()
- object dependencies are calculated correctly for *.obj suffix
- Include path for sduino.mk in all example Makefiles



Expand Down
11 changes: 7 additions & 4 deletions board-manager/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# the required versions for the new build
COREVERSION=0.4.0-pre1
SDCCVERSION=10088
TOOLSVERSION=2017.11.13
COREVERSION=0.4.0
SDCCVERSION=10738
TOOLSVERSION=2018.12.07

# default the tool version to be the current date as YYYY.MM.DD
#TOOLSVERSION?=$(shell date '+%Y.%m.%d')

BASEURL=https://github.com/tenbaht/sduino/releases/download/v$(COREVERSION)

Expand Down Expand Up @@ -44,7 +47,7 @@ release:
# update the version number in the changelog if not already done:
grep -q "$(COREVERSION)" ../CHANGELOG.md || \
sed "/^## \[Unreleased\]/ a\\\n\n## [$(COREVERSION) - $(DATE)]" ../CHANGELOG.md
git add ../CHANGELOG.md
git add ../CHANGELOG.md ../$(PACKAGEFILE)
git add parts/tools-*-$(SDCCVERSION).txt parts/tools-*-$(TOOLSVERSION).txt parts/platform-*-$(COREVERSION).txt
git commit
git tag v$(COREVERSION)
16 changes: 13 additions & 3 deletions board-manager/Makefile.core
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
NAME=sduino
COREVERSION?=0.3.2
SDCCVERSION?=10088
TOOLSVERSION?=2017.11.06

ifndef COREVERSION
$(error COREVERSION is not set)
endif

ifndef SDCCVERSION
$(error SDCCVERSION is not set)
endif

ifndef TOOLSVERSION
$(error TOOLSVERSION is not set)
endif


# where to put the generated files
COREDIR?=release/v$(COREVERSION)
Expand Down
30 changes: 28 additions & 2 deletions board-manager/Makefile.sdcc
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
NAME=sdcc
COREVERSION?=0.3.0
SDCCVERSION?=10088
ifndef COREVERSION
$(error COREVERSION is not set)
endif

ifndef SDCCVERSION
$(error SDCCVERSION is not set)
endif

# Makefile.sdcc
#
# Build the sdcc archive files.
#
# Targets:
#
# - (default):
# build a new tools entry in the parts directory.
# - repack SDCCVERSION=10738 COREVERSION=xx
# repack the snapshot files in the Downloads directory into stipped
# down SDunino minimal packages.
# COREVERSION doesn't matter, but needs to be present.


# where to look for the original SDCC snapshot files
#SNAPSHOTDIR=sdcc-snapshots
Expand All @@ -11,6 +30,8 @@ PARTSDIR=parts

VERSION=$(SDCCVERSION)

.PHONY: repack

#
### No user serviceable part below here. Only generated content. ########
#
Expand All @@ -28,3 +49,8 @@ TOOLS_ENTRY=$(PARTSDIR)/tools-entry-$(NAME)-$(VERSION).txt

$(TOOLS_ENTRY) : $(SDCC_TARS)
./gen_tools_entry.sh "$(TOOLS_STEM)" "$(VERSION)" "$(COREVERSION)" > $@

repack:
for i in ~/Downloads/sdcc*$(SDCCVERSION)*; do \
./minimize-sdcc.sh $$i; \
done
18 changes: 14 additions & 4 deletions board-manager/Makefile.tools
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
NAME=sduino-tools
COREVERSION?=0.3.2
# default the tool version to be the current date as YYYY.MM.DD
TOOLSVERSION?=$(shell date '+%Y.%m.%d')

ifndef COREVERSION
$(error COREVERSION is not set)
endif

ifndef SDCCVERSION
$(error SDCCVERSION is not set)
endif

ifndef TOOLSVERSION
$(error TOOLSVERSION is not set)
endif


# Where to find the tools directory
BASEDIR=../sduino/hardware/sduino
Expand Down Expand Up @@ -59,7 +69,7 @@ $(TOOLS_MACOSX): | $(ARCHIVEDIR)

$(TOOLS_WINDOWS): | $(ARCHIVEDIR)
@echo "Generating the tools archive file for Windows."
tar cjf $@ $(EXCLUDES) -C $(BASEDIR) tools/wrapper tools/win
tar cjhf $@ $(EXCLUDES) -C $(BASEDIR) tools/wrapper tools/win


# make a new release directory if not present
Expand Down
17 changes: 13 additions & 4 deletions board-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ After testing, check in the newly generated files and update the Changelog:
make release


For testing purposes only (!!), it is possible to use the simpler systax
For testing purposes only (!!), it is possible to use the simpler syntax
using makefile variables on the command line:

make COREVERSION=0.3.2 core
Expand All @@ -44,6 +44,16 @@ will generate a fresh archive for the core files and update the package file
accordingly.


## Preparing the parts

### SDCC

First: Update the SDCC version number in Makefile and Makefile.sdcc

- Download snapshot files for all supported systems into ~/Downloads
- `make repack` minimizes all archives into small SDunio minimal packages


## Supporting tools

`assemble.sh`: Insert all objects from parts/ directory in the platform and
Expand All @@ -54,9 +64,8 @@ tools field of the json template file to assemble the final package file.
`gen_tools_entry.sh`: Generate a tools entry for a sdcc or STM8Tools
archive.

Makefile.core
Makefile.sdcc
Makefile.tools
`Makefile.core`, `Makefile.sdcc`, `Makefile.tools`: Pack the archive for one
component into release/ and generate the description in the parts/ directory.

`minimize-sdcc.sh`: Repack a [SDCC snapshot
build](http://sdcc.sourceforge.net/snap.php) into a minimal compiler package
Expand Down
7 changes: 6 additions & 1 deletion board-manager/minimize-sdcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ VERBOSE=
NAME=$(basename "$FILE")
NAME=${NAME/snapshot/stm8}

# remove all suffixes
NAME=${NAME%%.t*}
NAME=${NAME%%.z*}

# patterns to exclude all unneeded files from unpacking
TAR_EXCLUDE='--exclude=doc --exclude=src --exclude=non-free
--exclude=stlcs --exclude=ds80c390.h --exclude=pic*
Expand All @@ -54,8 +58,9 @@ else
tar x${VERBOSE}${TARFLAG}f "$FILE" -C "$TMP" $TAR_EXCLUDE
fi

# always repack into a tar.bz2 file, even if was a zip before.
echo "Repacking into file $NAME"
tar c${VERBOSE}${TARFLAG}f "$NAME" -C "$TMP" sdcc
tar c${VERBOSE}jf "$NAME.tar.bz2" -C "$TMP" sdcc

echo "cleaning up temporary files"
rm -rf "$TMP"
Expand Down
29 changes: 29 additions & 0 deletions board-manager/parts/platform-entry-sduino-0.4.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Sduino STM8 plain C core (non-C++)",
"architecture": "stm8",
"version": "0.4.0",
"category": "Contributed",
"boards": [
{"name": "STM8S103F3 Breakout Board"},
{"name": "STM8S105C6 Discovery Board"},
{"name": "STM8S105K4T6 Breakout Board"},
{"name": "sduino UNO (STM8S105K6)"},
{"name": "sduino MB (STM8S208MBT6B)"}
],
"toolsDependencies": [
{
"name": "STM8Tools",
"version": "2018.12.07",
"packager": "sduino"
},
{
"name": "sdcc",
"version": "build.10738",
"packager": "sduino"
}
],
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sduino-core-0.4.0.tar.bz2",
"archiveFileName": "sduino-core-0.4.0.tar.bz2",
"checksum": "SHA-256:a71dee029991653577c63c9cebe70095b2c08d5b55a9aa0af836f527daf44d8c",
"size": "6110413"
},
31 changes: 31 additions & 0 deletions board-manager/parts/tools-entry-sdcc-10738.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "sdcc",
"version": "build.10738",
"systems": [
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sdcc-stm8-amd64-unknown-linux2.5-20181206-10738.tar.bz2",
"archiveFileName": "sdcc-stm8-amd64-unknown-linux2.5-20181206-10738.tar.bz2",
"checksum": "SHA-256:d5f3d1d1699c6edeb1db6b9a38f0b0c4c28d1ef1cd267dedb9b3f5a65e07a60e",
"size": "2637159"
},{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sdcc-stm8-i386-unknown-linux2.5-20181205-10738.tar.bz2",
"archiveFileName": "sdcc-stm8-i386-unknown-linux2.5-20181205-10738.tar.bz2",
"checksum": "SHA-256:d25344d392707773712f71d6c3dd63b4b80ce92e7999664e78a7b186ae4485d6",
"size": "2701297"
},{
"host": "i686-mingw32",
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sdcc-stm8-i586-mingw32msvc-20181205-10738.tar.bz2",
"archiveFileName": "sdcc-stm8-i586-mingw32msvc-20181205-10738.tar.bz2",
"checksum": "SHA-256:eecfb34f085f0adc1b9544a5e32168907a88145a469f4733551b79b5ba91ad75",
"size": "3063721"
},{
"host": "x86_64-apple-darwin",
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sdcc-stm8-x86_64-apple-macosx-20181205-10738.tar.bz2",
"archiveFileName": "sdcc-stm8-x86_64-apple-macosx-20181205-10738.tar.bz2",
"checksum": "SHA-256:c0ece00b5f20411307b7a5e5bd527c127421e7df5b10946c45ad3305c46732c2",
"size": "2877491"
}
]
},
31 changes: 31 additions & 0 deletions board-manager/parts/tools-entry-sduino-tools-2018.12.07.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "STM8Tools",
"version": "2018.12.07",
"systems": [
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sduino-tools_linux32-2018.12.07.tar.bz2",
"archiveFileName": "sduino-tools_linux32-2018.12.07.tar.bz2",
"checksum": "SHA-256:3e7b2eded467e29f99024b639dbe7fff444ee5b43e98bae2ba7c9c32d7c15bb8",
"size": "42628"
},{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sduino-tools_linux64-2018.12.07.tar.bz2",
"archiveFileName": "sduino-tools_linux64-2018.12.07.tar.bz2",
"checksum": "SHA-256:342243c369e7aaa363dcef3048d973a4e90072ffe68a9eeda1f6e679d9cc8b28",
"size": "43223"
},{
"host": "x86_64-apple-darwin",
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sduino-tools_macosx-2018.12.07.tar.bz2",
"archiveFileName": "sduino-tools_macosx-2018.12.07.tar.bz2",
"checksum": "SHA-256:2a3680070638e9af8dd5a5af9f52d1643bf29e765b9caa3c996349ccc24f1945",
"size": "45664"
},{
"host": "i686-mingw32",
"url": "https://github.com/tenbaht/sduino/releases/download/v0.4.0/sduino-tools_mingw32-2018.12.07.tar.bz2",
"archiveFileName": "sduino-tools_mingw32-2018.12.07.tar.bz2",
"checksum": "SHA-256:9d68ff3deb35d840aec8a8f3a92465869990c900e36880cc1298e6fd9d8a7097",
"size": "5485803"
}
]
},
Loading

0 comments on commit 1db470f

Please sign in to comment.