Skip to content

Commit e9f7a61

Browse files
authored
Merge pull request #374 from TG9541/relprep2.2.26
Relprep2.2.26
2 parents 9e694b7 + 9bd3341 commit e9f7a61

File tree

7 files changed

+42
-14
lines changed

7 files changed

+42
-14
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ The [Wiki on GitHub](https://github.com/TG9541/stm8ef/wiki) covers various topic
2828

2929
## Generic targets
3030

31-
The Releases section provides several generic binaries:
31+
STM8 eForth provides configurations and binaries for typical STM8S and STM8L devices. The binaries for selected "Low", "Medium" or "High density" can be expected to work for all of the listed packaging and memory specs variants. For details please refer to the `README.md` in the linked configuration folder.
3232

33-
Support for STM8S devices [RM0016](https://www.st.com/resource/en/reference_manual/cd00190271-stm8s-series-and-stm8af-series-8-bit-microcontrollers-stmicroelectronics.pdf) is stable. Automotive grade STM8AF devices are likely to work with one of the configurations. Various STM8 Discovery boards and [breakout boards](https://github.com/TG9541/stm8ef/wiki/Breakout-Boards) for "Low", "Medium", and "High density" devices can be used.
33+
### Generic STMS targets
3434

35-
Please refer to the `README.md` in the board folders below:
35+
Support for STM8S devices in the [RM0016](https://www.st.com/resource/en/reference_manual/cd00190271-stm8s-series-and-stm8af-series-8-bit-microcontrollers-stmicroelectronics.pdf) family is stable. Peripherals aren't as fancy as those of e.g. STM8L devices but that makes them easy to master. Automotive grade STM8AF devices belong to the same family and they can be expected to work. Various STM8 Discovery boards and breakout boards for "Low", "Medium", and "High density" devices can be used.
3636

3737
* STM8S "Low density" devices (up to 1K RAM, 8K Flash and 640 bytes EEPROM)
3838
* [STM8S103F3](https://github.com/TG9541/stm8ef/tree/master/STM8S103F3) for STM8S003F3/K3, STM8S103F2/F3/K3 and STM8S903F3/K3 (not recommended for STM8S001J3)
@@ -42,22 +42,24 @@ Please refer to the `README.md` in the board folders below:
4242
* STM8S "High density" devices (up to 6K RAM, 32K + 96K Flash and 2K EEPROM)
4343
* [STM8S207RB](https://github.com/TG9541/stm8ef/tree/master/STM8S207RB) for STM8S007C8, STM8S207C6/K6/R6/S6, STM8S207C8/K8/M8/R8/S8, STM8S207CB/MB/RB/SB, STM8S208C6/R6/S6, STM8S208C8/R8/S8 and STM8S208CB/MB/RB/SB
4444

45-
STM8L [RM0031](https://www.st.com/resource/en/reference_manual/cd00218714-stm8l050j3-stm8l051f3-stm8l052c6-stm8l052r8-mcus-and-stm8l151l152-stm8l162-stm8al31-stm8al3l-lines-stmicroelectronics.pdf) devices, compared to STM8S, provide rich feature set. Although support for STM8L peripherals is still in an early phase, the STM8 eForth core is well tested. The latest addition, support forSTM8L101F3 and STM8L001J3 (the [RM0013](https://www.st.com/resource/en/reference_manual/CD00184503-.pdf) family) is experimental but it can be expected to work.
45+
### Generic STML targets
4646

47-
For more details please refer to the `README.md` in the board folders below:
47+
Compared to STM8S most STM8L devices provide such a rich feature set that studying the reference manual may take some time. Although support for STM8L peripherals is still in an early phase the STM8 eForth core is mostly the same as for STM8S devices and well tested. The latest addition is support for STM8L101F3 and STM8L001J3, the only members of the [RM0013](https://www.st.com/resource/en/reference_manual/CD00184503-.pdf) family.
4848

49+
For more details please refer to the `README.md` in the board folders below.
50+
51+
* STM8L [RM0013](https://www.st.com/resource/en/reference_manual/CD00184503-.pdf) family "Low density" devices (1.5K RAM, 8K Flash, basic peripherals)
4952
* [STM8L101F3](https://github.com/TG9541/stm8ef/tree/master/STM8L101F3) for STM8L101F1, STM8L101F2/G2, STM8L101F3/G3/K3 and STM8L001J3M3
50-
* STM8L [RM0031](https://www.st.com/resource/en/reference_manual/cd00218714-stm8l050j3-stm8l051f3-stm8l052c6-stm8l052r8-mcus-and-stm8l151l152-stm8l162-stm8al31-stm8al3l-lines-stmicroelectronics.pdf) "Low density" devices (1K RAM, 8K Flash, 256 bytes EEPROM)
53+
* [RM0031](https://www.st.com/resource/en/reference_manual/cd00218714-stm8l050j3-stm8l051f3-stm8l052c6-stm8l052r8-mcus-and-stm8l151l152-stm8l162-stm8al31-stm8al3l-lines-stmicroelectronics.pdf) family STM8L "Low density" devices (1K RAM, 8K Flash, 256 bytes EEPROM, advanced peripherals)
5154
* [STM8L051F3](https://github.com/TG9541/stm8ef/tree/master/STM8L051F3) for STM8L151C3/K3/G3/F3, STM8L151C2/K2/G2/F2, STM8L051F3 and STM8L050J3M3
5255
* STM8L "Medium density" devices (2K RAM, 32K Flash, 1K EEPROM)
5356
* [STM8L151K4](https://github.com/TG9541/stm8ef/tree/master/STM8L151K4) for STM8L151C4/K4/G4, STM8L151C6/K6/G6, STM8L152C4/K4/G4, STM8L152C6/K6/G6 and STM8L052C6
5457
* STM8L "High" and "Medium+ density" devices (4K RAM, 32K + 32K Flash, 2K EEPROM)
5558
* [STM8L152R8](https://github.com/TG9541/stm8ef/tree/master/STM8L152R8) for STM8L151C8/M8/R8, STM8L152C8/K8/M8/R8 and STM8L052R8
56-
* STM8L [RM0013](https://www.st.com/resource/en/reference_manual/CD00184503-.pdf) "Low density" devices (1.5K RAM, 8K Flash, basic peripherals)
5759

5860
## Board support:
5961

60-
STM8 eForth provides board support like LED display code for several common boards and "Chinese gadgets":
62+
STM8 eForth provides board support, e.g. relay outputs or I/O with keys and LED displays, for several common boards and "Chinese gadgets" like thermostats, voltmeters or relay boards. There is more information in the Wiki.
6163

6264
* [CORE](https://github.com/TG9541/stm8ef/tree/master/CORE) "svelte" 4K configuration for STM8S "Low density" devices, some features are disabled (no background task, `DO .. LOOP` or `CREATE .. DOES>`). Also, the dictionary search is case-sensitive.
6365
* [SWIMCOM](https://github.com/TG9541/stm8ef/tree/master/SWIMCOM) 2-wire communication through PD1/SWIM (i.e. the ICP pin) and a full feature set (the similar [DOUBLECOM](https://github.com/TG9541/stm8ef/tree/master/DOUBLECOM) also provides UART I/O words for applications)
@@ -133,6 +135,7 @@ Compared to the original "stm8ef" STM8 eForth offers many features:
133135
* `NVR`, `RAM`, `WIPE`, `RESET` and `PERSIST` for compiling to Flash memory
134136
* `'BOOT` for autostart applications
135137
* `EVALUATE` interprets Forth code in text strings (even compilation is possible!)
138+
* `OUTER` and `BYE` a simple debug console for foreground code
136139
* many words from Forth systems that were popular in the 1980s are provided in the [library](https://github.com/TG9541/stm8ef/tree/master/lib)
137140

138141
## Other changes to the original STM8EF code:

STM8L051F3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# STM8L051F3 Base Image
22

3-
This folder contains the configuration for STM8L "Low density" devices as described in [RM0031](https://www.st.com/resource/en/reference_manual/cd00218714-stm8l050j3-stm8l051f3-stm8l052c6-stm8l052r8-mcus-and-stm8l151l152-stm8l162-stm8al31-stm8al3l-lines-stmicroelectronics.pdf) with 8K Flash ROM, 1K RAM and 256 bytes EEPROM (plus 64 option bytes). Compared to other STM8 "Low density" devices they provide a richer set of peripherals (e.g. 12bit ADC, DMA and RTC).
3+
This folder contains the configuration for STM8L "Low density" devices in the [RM0031](https://www.st.com/resource/en/reference_manual/cd00218714-stm8l050j3-stm8l051f3-stm8l052c6-stm8l052r8-mcus-and-stm8l151l152-stm8l162-stm8al31-stm8al3l-lines-stmicroelectronics.pdf) family with 8K Flash ROM, 1K RAM and 256 bytes EEPROM (plus 64 option bytes). Compared to other STM8 "Low density" devices these devices provide a richer set of peripherals (e.g. 12bit ADC, DMA and RTC).
44

55
The following datasheets apply:
66

STM8S001J3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Half-duplex operation not only makes sharing pin8 between `PD1/SWIM` and `PD5/UA
3838
\ a reset will be required!
3939
```
4040

41-
STM8 eForth will automatically configure the GPIO pull-up for the selected pin.
41+
STM8 eForth will automatically configure the GPIO pull-up for the selected pin if `HALF_DUPLEX = 2` is set in `globconf.inc`.
4242

4343
Of course, it's also possible to use a simulated serial interface instead of the UART. This way the UART can be freed up, e.g. for [MODBUS RTU](https://github.com/TG9540/stm8ef-modbus).
4444

STM8S105K4/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# STM8S105K4 Base Image
22

3-
This folder contains the configuration for STM8S "Medium density" devices as described in [RM0016](https://www.st.com/resource/en/reference_manual/cd00190271-stm8s-series-and-stm8af-series-8-bit-microcontrollers-stmicroelectronics.pdf) with up to 32K Flash ROM, 2K RAM and 1K EEPROM. These robust devices offer a good feature set (e.g. 10bit ADC, 4 timers, I2C, SPI, TLI, AWU) and configuration is trivially easy compared to STM8L devices (e.g. simple ADC, clock tree "normally on"). Tests have shown that, like automotive grade STM8AF "Medium density" devices, using a 24MHz clock for the core [is possible](https://hackaday.io/project/16097-eforth-for-cheap-stm8s-gadgets/log/172752-stm8s-medium-density-devices-can-have-performance-too).
3+
This folder contains the configuration for STM8S "Medium density" devices as described in [RM0016](https://www.st.com/resource/en/reference_manual/cd00190271-stm8s-series-and-stm8af-series-8-bit-microcontrollers-stmicroelectronics.pdf) with up to 32K Flash ROM, 2K RAM and 1K EEPROM. These robust devices offer a good feature set (e.g. 10bit ADC, 4 timers, I2C, SPI, TLI, AWU) and configuration is trivially easy compared to STM8L devices (e.g. simple ADC, clock tree "normally on"). Tests have shown that using a 24MHz clock for the core [is possible](https://hackaday.io/project/16097-eforth-for-cheap-stm8s-gadgets/log/172752-stm8s-medium-density-devices-can-have-performance-too) like in automotive grade STM8AF "Medium density" devices.
44

55
The following datasheets apply:
66
* [STM8S105C4/K4/S4 and STM8S105C6/K6/S6](https://www.st.com/resource/en/datasheet/stm8s105k4.pdf) "Access Line"

docs/words.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,11 @@
877877
; and start text interpreter.
878878
```
879879

880+
```
881+
; OUTER ( -- n ) ( TOS STM8: - Y,Z,N )
882+
; Outer interpreter (use EXIT with 2x R-address drop)
883+
```
884+
880885
```
881886
; EVAL ( -- )
882887
; Interpret input stream.

inc/defconf.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
;--------------------------------------------------------
2-
; STM8EF for STM8S (Value line and Access Line devices)
3-
; Default settings for all kinds of options
2+
; STM8 eForth for STM8S and STM8L devices
3+
; Default settings for all options
44
;--------------------------------------------------------
55
RELVER1 = 2 ; Revision digit 1
66
RELVER0 = 6 ; Revision digit 0
7-
PRE_REL = 3 ; Pre Release digit 0 (0: release)
7+
PRE_REL = 0 ; Pre Release digit 0 (0: release)
88

99
TERM_LINUX = 1 ; LF terminates line
1010

lib/BYE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
\ BYE - leave a debug console "OUTER" interpreter
2+
#require OUTER
3+
: BYE ( -- ) [
4+
$9085 , \ POPW Y
5+
$9085 , \ POPW Y
6+
]
7+
;
8+
9+
\\ Example
10+
#require BYE
11+
12+
: test ( n -- )
13+
FOR
14+
I DUP . 2 MOD 0= IF
15+
CR ." Debug console - leave with BYE. Be careful with the stack!" CR
16+
OUTER THEN
17+
NEXT ." done"
18+
;
19+
20+
\ 5 test

0 commit comments

Comments
 (0)