Skip to content

Commit

Permalink
Merge pull request #321 from TG9541/stm8l_fdx
Browse files Browse the repository at this point in the history
Stm8l fdx
  • Loading branch information
TG9541 authored Jun 28, 2020
2 parents 2f40855 + b89647e commit 322d402
Show file tree
Hide file tree
Showing 35 changed files with 805 additions and 759 deletions.
29 changes: 0 additions & 29 deletions C0135/boardcore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,6 @@ AOUTSTOR:
RET
.endif

;===============================================================

; Dummy labels for PSIM interrupts declared in main.c

.ifne PSIM-PORTA
; Dummy label for _EXTIA_IRQHandler
_EXTI0_IRQHandler:
.endif

.ifne PSIM-PORTB
; Dummy label for _EXTIB_IRQHandler
_EXTI1_IRQHandler:
.endif

.ifne PSIM-PORTC
; Dummy label for _EXTIC_IRQHandler
_EXTI2_IRQHandler:
.endif

.ifne PSIM-PORTD
; Dummy label for _EXTID_IRQHandler
_EXTI3_IRQHandler:
.endif

.ifne PSIM-PORTE
; Dummy label for _EXTIE_IRQHandler
_EXTI4_IRQHandler:
.endif

;===============================================================

.ifne HAS_LED7SEG
Expand Down
29 changes: 0 additions & 29 deletions CORE/boardcore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,6 @@

;===============================================================

; Dummy labels for PSIM interrupts declared in main.c

.ifne PSIM-PORTA
; Dummy label for _EXTIA_IRQHandler
_EXTI0_IRQHandler:
.endif

.ifne PSIM-PORTB
; Dummy label for _EXTIB_IRQHandler
_EXTI1_IRQHandler:
.endif

.ifne PSIM-PORTC
; Dummy label for _EXTIC_IRQHandler
_EXTI2_IRQHandler:
.endif

.ifne PSIM-PORTD
; Dummy label for _EXTID_IRQHandler
_EXTI3_IRQHandler:
.endif

.ifne PSIM-PORTE
; Dummy label for _EXTIE_IRQHandler
_EXTI4_IRQHandler:
.endif

; ==============================================

.ifne HAS_LED7SEG
; LED_MPX driver ( -- )
; Code called from ISR for LED MPX
Expand Down
29 changes: 0 additions & 29 deletions DCDC/boardcore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,35 +27,6 @@ BOARDINIT:
CALL ZERO
JP PWMM

;===============================================================

; Dummy labels for PSIM interrupts declared in main.c

.ifne PSIM-PORTA
; Dummy label for _EXTIA_IRQHandler
_EXTI0_IRQHandler:
.endif

.ifne PSIM-PORTB
; Dummy label for _EXTIB_IRQHandler
_EXTI1_IRQHandler:
.endif

.ifne PSIM-PORTC
; Dummy label for _EXTIC_IRQHandler
_EXTI2_IRQHandler:
.endif

.ifne PSIM-PORTD
; Dummy label for _EXTID_IRQHandler
_EXTI3_IRQHandler:
.endif

.ifne PSIM-PORTE
; Dummy label for _EXTIE_IRQHandler
_EXTI4_IRQHandler:
.endif

;===============================================================

.ifne HAS_LED7SEG
Expand Down
31 changes: 0 additions & 31 deletions DOUBLECOM/boardcore.inc
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
; STM8S003F3P6 generic SWIM single pin communication



; Dummy labels for PSIM interrupts declared in main.c

.ifne PSIM-PORTA
; Dummy label for _EXTIA_IRQHandler
_EXTI0_IRQHandler:
.endif

.ifne PSIM-PORTB
; Dummy label for _EXTIB_IRQHandler
_EXTI1_IRQHandler:
.endif

.ifne PSIM-PORTC
; Dummy label for _EXTIC_IRQHandler
_EXTI2_IRQHandler:
.endif

.ifne PSIM-PORTD
; Dummy label for _EXTID_IRQHandler
_EXTI3_IRQHandler:
.endif

.ifne PSIM-PORTE
; Dummy label for _EXTIE_IRQHandler
_EXTI4_IRQHandler:
.endif

;===============================================================

.ifne HAS_LED7SEG
; LED_MPX driver ( -- )
; Code called from ISR for LED MPX
Expand Down
29 changes: 0 additions & 29 deletions MINDEV/boardcore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,6 @@ BOARDINIT:
RET
.endif

;===============================================================

; Dummy labels for PSIM interrupts declared in main.c

.ifne PSIM-PORTA
; Dummy label for _EXTIA_IRQHandler
_EXTI0_IRQHandler:
.endif

.ifne PSIM-PORTB
; Dummy label for _EXTIB_IRQHandler
_EXTI1_IRQHandler:
.endif

.ifne PSIM-PORTC
; Dummy label for _EXTIC_IRQHandler
_EXTI2_IRQHandler:
.endif

.ifne PSIM-PORTD
; Dummy label for _EXTID_IRQHandler
_EXTI3_IRQHandler:
.endif

.ifne PSIM-PORTE
; Dummy label for _EXTIE_IRQHandler
_EXTI4_IRQHandler:
.endif

;===============================================================

.ifne HAS_LED7SEG
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

[![Travis-CI](https://travis-ci.org/TG9541/stm8ef.svg)](https://travis-ci.org/TG9541/stm8ef)

STM8 eForth is a very compact interactive Forth system for STM8 µCs. It's much like a tiny operating system with a built-in compiler-interpreter that interacts with the user through a serial console (e.g. using [e4thcom](https://wiki.forth-ev.de/doku.php/en:projects:e4thcom) or a serial terminal). Simple multi-tasking features allow running a control application in the background while tuning parameters (or even change the program!) through the CLI.
STM8 eForth is a Forth system for very low-cost STM8 µCs. Interacting with the Forth interpreter-compiler (the REPL) feels like using an operating system on a much larger machine, e.g. simple multi-tasking features allow running embedded control code in the background while tuning parameters (or change the code!) in the foreground.

The [release](https://github.com/TG9541/stm8ef/releases) provides binaries, a library, STM8 register definitions and a [plug-in system for board support](https://github.com/TG9541/stm8ef-modular-build). Core features include compiling Forth to Flash memory, autostart-operation and all that's needed for creating a custom Forth core. The release process automatically runs a [self-test in the uCsim STM8S simulator](https://travis-ci.org/TG9541/stm8ef) with Travis-CI.
STM8 eForth is based on [Dr. C.H. Ting's eForth for the *STM8S Discovery*](http://www.forth.org/svfig/kk/07-2010.html). With the kind permission of the original author it has a permissive [FOSS license](https://github.com/TG9541/stm8ef/blob/master/LICENSE.md).

[![STM8EF Wiki](https://user-images.githubusercontent.com/5466977/28994765-3267d78c-79d6-11e7-927f-91751cd402db.jpg)](https://github.com/TG9541/stm8ef/wiki)
The [release](https://github.com/TG9541/stm8ef/releases) provides binaries, a library, STM8 register definitions and [modular board support](https://github.com/TG9541/stm8ef-modular-build). Core features include compiling Forth to Flash memory, autostart-operation and everything needed for creating a custom Forth core. The STM8 eForth release automatically runs a [self-test in the uCsim STM8S simulator](https://travis-ci.org/TG9541/stm8ef) with Travis-CI, and it's easy to use this feature for creating ready-to-run binaries (including Forth code) through a simple `git push`.

STM8 eForth is based on [Dr. C.H. Ting's eForth for the *STM8S Discovery*](http://www.forth.org/svfig/kk/07-2010.html). With the kind permission of the original author it has a permissive [FOSS license](https://github.com/TG9541/stm8ef/blob/master/LICENSE.md).
[![STM8EF Wiki](https://user-images.githubusercontent.com/5466977/28994765-3267d78c-79d6-11e7-927f-91751cd402db.jpg)](https://github.com/TG9541/stm8ef/wiki)

Forth is a simple but highly extensible [programming language](https://github.com/TG9541/stm8ef/wiki/STM8-eForth-Programming). "Hello World" is as simple as this:

```Forth
: hello ." Hello World!" ;
```

STM8 eForth is configurable: a full featured binary needs between 4.7K and 5.5K, a basic interactive Forth fits in just 3.5K. The unique `ALIAS` feature provides convenient access to headerless Forth words which enables even more code economy (interactive programming is possible on the smallest STM8 device with 4K Flash memory).
STM8 eForth is configurable: a full featured binary needs between 4.0K and 5.5K and a minimal interactive system fits in just 3.5K. The unique `ALIAS` feature provides convenient access to headerless Forth words which improves code economy. Working with the tiniest STM8 device with 4K Flash (STM8S103F2) is possible and a 32K Flash device (e.g. STM8S105C6T6C) provides ample room for applications!

The Forth console works with an STM8 UART, a pair of GPIOs, or even any single GPIO and 3-wire or 2-wire communication (up to two UARTs and a simulated serial interface are supported). The console can be configured at runtime and use any type of [character I/O](https://github.com/TG9541/stm8ef/wiki/STM8-eForth-Board-Character-IO) (e.g. keyboard and display)!
The Forth console works with an STM8 UART, or with a simulated serial interface: 3-wire or 2-wire communication with up to two UARTs and a simulated serial interface are supported. It works best with [e4thcom](https://wiki.forth-ev.de/doku.php/en:projects:e4thcom) but any serial terminal can be used. The console can be configured at runtime to use any type of [character I/O](https://github.com/TG9541/stm8ef/wiki/STM8-eForth-Board-Character-IO), e.g. keyboard and display!

The [Wiki on GitHub](https://github.com/TG9541/stm8ef/wiki) covers various topics, e.g. using [Breakout Boards](https://github.com/TG9541/stm8ef/wiki/Breakout-Boards), or the conversion of low-cost Chinese thermostats, voltmeters, or DC/DC-converters into Forth powered embedded control boards.

Expand Down
29 changes: 0 additions & 29 deletions STM8L-DISCOVERY/boardcore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,35 +49,6 @@ BOARDINIT:



;===============================================================

; Dummy labels for PSIM interrupts declared in main.c

.ifne PSIM-PORTA
; Dummy label for _EXTIA_IRQHandler
_EXTI0_IRQHandler:
.endif

.ifne PSIM-PORTB
; Dummy label for _EXTIB_IRQHandler
_EXTI1_IRQHandler:
.endif

.ifne PSIM-PORTC
; Dummy label for _EXTIC_IRQHandler
_EXTI2_IRQHandler:
.endif

.ifne PSIM-PORTD
; Dummy label for _EXTID_IRQHandler
_EXTI3_IRQHandler:
.endif

.ifne PSIM-PORTE
; Dummy label for _EXTIE_IRQHandler
_EXTI4_IRQHandler:
.endif

; ==============================================

.ifne HAS_LED7SEG
Expand Down
7 changes: 6 additions & 1 deletion STM8L-DISCOVERY/stm8device.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define STM8L

#define INTVEC_TLI 0
#define INTVEC_FLASH 1
#define INTVEC_DMA1_01 2
Expand All @@ -14,13 +16,16 @@
#define INTVEC_EXTI5 13
#define INTVEC_EXTI6 14
#define INTVEC_EXTI7 15
#define INTVEC_LCD 16 // STM8L152
#define INTVEC_CLK 17
#define INTVEC_ADC1 18
#define INTVEC_TIM2_UPDATE 19
#define INTVEC_TIM2_CAPCOM 20
#define INTVEC_TIM3_UPDATE 21
#define INTVEC_TIM3_CAPCOM 22
#define INTVEC_RI 23
#define INTVEC_RI 23 // STM8L051F3
#define INTVEC_TIM1_UPDATE 23 // STM8L151, STM8L152
#define INTVEC_TIM1_CAPCOM 24
#define INTVEC_TIM4 25
#define INTVEC_SPI1 26
#define INTVEC_USART1_TXD 27
Expand Down
29 changes: 0 additions & 29 deletions STM8L051F3/boardcore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,6 @@
; Note: for supporting a new board create a new board configuration
; folder with a "globconfig.inc" and a copy of this file.

;===============================================================

; Dummy labels for PSIM interrupts declared in main.c

.ifne PSIM-PORTA
; Dummy label for _EXTIA_IRQHandler
_EXTI0_IRQHandler:
.endif

.ifne PSIM-PORTB
; Dummy label for _EXTIB_IRQHandler
_EXTI1_IRQHandler:
.endif

.ifne PSIM-PORTC
; Dummy label for _EXTIC_IRQHandler
_EXTI2_IRQHandler:
.endif

.ifne PSIM-PORTD
; Dummy label for _EXTID_IRQHandler
_EXTI3_IRQHandler:
.endif

.ifne PSIM-PORTE
; Dummy label for _EXTIE_IRQHandler
_EXTI4_IRQHandler:
.endif

; ==============================================

.ifne HAS_LED7SEG
Expand Down
7 changes: 6 additions & 1 deletion STM8L051F3/stm8device.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define STM8L

#define INTVEC_TLI 0
#define INTVEC_FLASH 1
#define INTVEC_DMA1_01 2
Expand All @@ -15,12 +17,15 @@
#define INTVEC_EXTI6 14
#define INTVEC_EXTI7 15
#define INTVEC_CLK 17
#define INTVEC_LCD 16 // STM8L152
#define INTVEC_ADC1 18
#define INTVEC_TIM2_UPDATE 19
#define INTVEC_TIM2_CAPCOM 20
#define INTVEC_TIM3_UPDATE 21
#define INTVEC_TIM3_CAPCOM 22
#define INTVEC_RI 23
#define INTVEC_RI 23 // STM8L051F3
#define INTVEC_TIM1_UPDATE 23 // STM8L151, STM8L152
#define INTVEC_TIM1_CAPCOM 24
#define INTVEC_TIM4 25
#define INTVEC_SPI1 26
#define INTVEC_USART1_TXD 27
Expand Down
28 changes: 0 additions & 28 deletions STM8S001J3/boardcore.inc
Original file line number Diff line number Diff line change
@@ -1,34 +1,6 @@
; STM8S003F3P6 generic SWIM single pin communication



; Dummy labels for PSIM interrupts declared in main.c

.ifne PSIM-PORTA
; Dummy label for _EXTIA_IRQHandler
_EXTI0_IRQHandler:
.endif

.ifne PSIM-PORTB
; Dummy label for _EXTIB_IRQHandler
_EXTI1_IRQHandler:
.endif

.ifne PSIM-PORTC
; Dummy label for _EXTIC_IRQHandler
_EXTI2_IRQHandler:
.endif

.ifne PSIM-PORTD
; Dummy label for _EXTID_IRQHandler
_EXTI3_IRQHandler:
.endif

.ifne PSIM-PORTE
; Dummy label for _EXTIE_IRQHandler
_EXTI4_IRQHandler:
.endif

;===============================================================

.ifne HAS_LED7SEG
Expand Down
Loading

0 comments on commit 322d402

Please sign in to comment.