Mecrisp Stellaris Unofficial UserDoc¶
What is Mecrisp-Stellaris?¶
Mecrisp-Stellaris is an embedded Forth Operating System for ARM Cortex-M Microprocessors. It is closest to the Subroutine Threaded Code model (STC), but it isn’t threaded at all.
What is Mecrisp-Stellaris used for ?¶
To create microprocessor controlled devices, your imagination is the only limit.
Example: Photoacoustic Gas Sensing Device¶
Abstract¶
The circuitry comprises a sine wave generator based on direct digital synthesis, a laser diode driver module, a band-pass frequency filter, a synchronous detector with phase adjustment circuitry and a low pass filter to form an analog lock-in amplifier, and an analog-to-digital converter. A 32-bit ARM microcontroller programmed with the open source Mecrisp dialect of the Forth interpreter language is used to set the frequency, and read the data from the analog-to-digital converter. The circuitry is tethered via a serial interface to a personal computer. A graphical user interface written in Phython allows easy interaction with the microcontroller by sending the appropriate Forth commands. The data acquired is visualized and stored on the personal computer for further processing. The circuitry is easy to build as it is based on through-hole devices, except for two necessary surface mount items, which, however, still can be soldered with a fine tipped soldering iron. The performance of the circuitry was demonstrated by the photo-acoustic detection of NO2 using a laser diode with a wavelength of 450 nm.
Full detailed design notes with schematic and code: https://www.hardware-x.com/article/S2468-0672(22)00025-6/fulltext
See also
I think this Mecrisp-Stellaris project required true genius to imagine and create. https://mecrisp-across-folkdoc.sourceforge.io/
What is this Website ?¶
“This website provides an unofficial user documentation for Mecrisp-Stellaris, which is an embedded Forth Operating System for ARM Microprocessors. It is a port of Mecrisp Forth to the ARM Cortex M architecture written by Matthias Koch. The documentation includes information on the Forth programming language, the Mecrisp-Stellaris Forth, its features, and how to get started with it. The site also offers insights into the history of Forth, its characteristics, and its applications in embedded systems. Additionally, it provides guidance on using Mecrisp-Stellaris Forth for real-time interactive development on microcontrollers, including quick start instructions and tips for beginners. The website also mentions Mecrisp-Across, which is a strong optimizing cross-compiler designed by Matthias Koch for generating code for small classic MSP430 chips like MSP430F2012. It offers global optimizations, automatic inlining, dead code elimination, and register allocation of both data and return stack across control structures. In summary, the website serves as a valuable resource for individuals interested in learning about and working with Mecrisp-Stellaris Forth and Mecrisp-Across, providing detailed information, practical guidance, and historical context.” - https://www.perplexity.ai/search
Index¶
The QUICK way to find things, use this Index and the [QUICK search] box on the left.
The Forth 200x STANDARD Wordlist with Interpretation semantics
- DOWNLOAD Mecrisp-Stellaris by Matthias Koch (GPL3)
See https://sourceforge.net/projects/mecrisp/files/ to download the latest version for Cortex-M processors mecrisp-stellaris-X.x.x.tar.gz, get the one with the most recent date.
Ok, I’ve run Forth using a off-the-shelf board, I made a led blink, I have a basic understanding now, so WHAT SHOULD I DO NEXT ?
This Table Shows Why CMSIS Matters.
MCU |
Peripherals |
Registers |
Register Bitfields |
---|---|---|---|
MSP430G2553 |
17 |
113 |
503 |
STM32F0xx |
37 |
413 |
3044 |
STM32F303x |
38 |
549 |
3857 |
GD32VF103 |
45 |
? |
? |
STM32F103xx |
53 |
722 |
4833 |
STM32F103C8 |
33 |
466 |
3503 |
GD32VF103Cx |
46 |
1074 |
7713 |
TM4C129x |
65 |
2137 |
7347 |
STM32F746 |
98 |
1778 |
14338 |
Contents:
- Quickstart
- Common User Issues
- Dictionary
- Example Dictionary Listing
- Forth Definition Components
- RA Core Register Usage
- Number Bases
- Data Types
- Key to Tables
- Compiler Error Messages
- Terminal-IO
- Stack Jugglers
- Logic
- Single Number Math
- Double Number Math
- Fixed Point Arithmetic
- Decision Making
- Bits: Test, Toggle, Clear and Set
- Memory Status
- Memory Access
- String Formatting
- Deep Insights
- User Input and Interpretation
- Dictionary Expansion
- Flags and Inventory
- Folding
- Compiler Essentials
- Control Structures
- Common Hardware Access
- About This Site
- DOCUMENTATION FOR MCU(s)
- Alternate Functions
- Antiforth
- Arrays
- Asyncronous Message Passing
- Assembly Language: Interactive
- Assembly Language Blinky with GDB-TUI
- Autobaud
- AutodocFs
- Atomic read/modify accesses
- Beginner Advice
- Benchmarks
- Bigger, Better, Faster
- Blinky-1a.fs
- BITFIELDS AND STRUCTURES
- BITFIELDS, DECLARE EARLY ?
- Bit Manipulation Tips
- Bluepill Diagnostics
- Bluepill Diagnostics V1.6 User Guide
- Bluepill Examples
- BLUEPILL STLINK V2 PROGRAMMER/DEBUGGER
- BLACK MAGIC PROBE (BMP)
- Bugs or Benefits ?
- BUFFERS
- MecrispCube
- C V/S Forth Comparison 2
- C and Forth Examples
- Charles (Chuck) Moore the inventor of Forth
- Chips
- Chip Pics
- Chip Supply Times
- STM32 CLONES
- Cloning, Manual
- Cloning, Integrated
- Code Errors, Detecting
- Code Reviews and Libraries
- Colour
- Common Programs
- assembler-m0.txt
- bitlog.txt
- blocks.txt
- calltrace.txt
- charcomma.txt
- conditional.txt
- disassembler-m0.txt
- disassembler-m3.txt
- dump.txt
- editor.txt
- examples.txt
- experimental/
- floored-divide.txt
- fonts/
- Flash
- graphics-unicode-8x16.txt
- graphics-unicode-8x8.txt
- graphics.txt
- longcomment.txt
- mecrisp-registergenerator/
- multitask.txt
- nvic.txt
- profiler.txt
- prompt.txt
- pseudorandom.txt
- quotations.txt
- registergenerator/
- romans.txt
- sine.txt
- sqrt.txt
- svd2forth-v2/
- Exceptions
- Compiling
- Contributing Code
- Contributors Go Here
- Critical Systems
- Data Stack
- Debugging With Swdcom
- Defining Words
- Delay
- FORTH DEVELOPMENT ENVIRONMENT
- Development Tips
- Digipot
- Palanqin, an ARM Cortex M0 emulator for DOS
- Electronic Design
- Emacs and Forth
- Endianess
- Example Forth Programs
- Examples: Word Usage
- User Contributed Device Driver Code
- File System
- F0 Discovery: 48 MHz Clock
- F0 Discovery Blinkies
- STM32F1 USB
- RCC_PLLCFGR
- GD32VF103 RISC-V
- Fixed Point (s31.32)
- The First Rule of Forth
- Flash Sizes
- Flashing Mecrisp-Stellaris onto a STM32: Methods
- Floating Point
- Forth Development Applications
- Folding
- Forth (embedded) Interactive Alternatives for Cortex M on STM32F
- Forth Books and Tutorials
- Forth Links
- Mecrisp-stellaris
- Why I Use Forth by Bernd Paysan
- Forth Still Suits Embedded Applications (Tom Napier | Nov 21, 1999)
- The Forth Programming Language - Why YOU should learn it
- Forth - the LEGO of Programming Languages 1995
- Why Forth ?
- Old Tutorial List
- Forths at Github
- Space-Related Applications of Forth
- Forth Variants
- Forth vs C
- Forth Versus Other Systems
- Forth Based Commercial Products
- Mecrisp-Stellaris Videos
- Forth Wizard
- Forth Wisdom
- Fossil Distributed Version Control System
- Garbage Collection
- Gdb for C On A Stm32f051 Disco
- Gema
- Glossary
- Graphics
- heartblink README
- Hosted or Tethered ?
- Hosted Or Tether Part 2
- HTML
- Low Power on STM32F0
- Ihex 32 Bit
- Loadmeter
- Interactive Assembly Delay
- Interpreter: Inner
- Interpreter: Outer
- Interrupts
- Intro: Forth
- IRC
- Jump Too Far
- Kernel Deep Configurations
- Levels of Code in Forth Programming
- Learning Modules - Blinkies
- Library
- GNU General Public License
- LISP
- Words4
- Machine and Assembly Code
- Macros
- Mecrisp-Stellaris Changelog
- Mecrisp-Stellaris Known Issues
- Mecrisp-Stellaris Readme
- Mecrisp* on a Unsupported MCU
- Obsoleting the Memory Map
- Memstat
- Mcu Specific Special Words
- Microscope
- Miscellanious
- Muforth
- A Modern Forth IDE
- Youtube Videos
- Historical Forth Development
- Modern Development Systems
- C v/s Historical Forth
- C v/s Modern Forth
- Modern Forth IDE Elements
- Serial Terminal: GnuScreen
- Speedup Methods Employed
- Code editor
- Bourne Shell
- Coding/library support
- Fossil SCM
- Target Baud Rate increase to 480600
- Hardware handshaking (RTS)
- Automatic source-code error detection
- Add CR to LF
- Mecrisp-Stellaris Not Working
- MSP340
- The Ideal Small Embedded MCU ?
- Nokia 5110 LCD Display
- Non Cortex-M
- Numworks Calculator
- Parsing
- Patches: Kernel
- PCB
- Pcb-rnd
- PLANG
- PLANG ?
- Audience
- Synopsis
- Target MCU
- Scope
- STM32 Peripheral Howto
- Usage
- Configuring The Peripheral
- Find the SMS bitfield for TIM3
- PLANG Database Syntax Table
- Set TIM3_SMCR_SMS to %001
- includes.fs
- A Do Nothing Word ?
- Disassembled
- Inlined
- Disassembled
- The Old Dichotomy
- PLANG Flowchart
- Intelligent Processing ?
- PLANG Database
- Peripherals Configured
- Dependencies
- The End
- PLANG - How it Works
- Plang Reader
- Plang For STM32f103C8
- Plang2 Status
- Porters Guide
- Problem MCU’s
- Project: LMT01 Temperature Sensor
- Project Suggestions
- A Blue Pill LMT01 Temperature Sensor
- blink-greenpill README
- Prototyping
- Prototyping, Methods
- Quadrature Rotary Switch
- Radiation Hardened CPU
- Random Access Memory
- Compiling, Ram V/S Flash
- RA Kernel
- Rants
- I’m inspired by the epic rants of ttm richter
- How to Solve STM32 Problems
- QUICK, GRAB A BARGAIN
- A Bargain?
- Summary
- REINVENTING THE WHEEL
- THE C PROGRAMMING LANGUAGE
- THE C LIBRARY MYTH
- USE MICROSOFT WINDOWS OR DIE
- The Water Barons
- THE HARD WAY
- Flowchart
- Keep It Simple
- Asking For Help
- A Learning Challenge
- Hackerspaces or SalesPlaces?
- Today’s Gold Standards
- Tethered Forth
- Projects: Working Forth Programs
- Window Comparator
- A Sunrise and Sunset Calculator
- Benchmark Your Forth MCU ?
- Push button switch debounce demo
- Square Wave Generator
- 100 Microsecond Systick
- Overclock to 96 MHz
- F0 Discovery 48 MHz System Clock
- Delay using the interrupt driven 1 millisecond Systick
- Timer, 1mS Interrupt Systick
- Analog To digital 19ch scanner
- Morse code generator
- Real Time
- Recognisers
- References
- CMSIS-SVD
- The Mecrisp REPL
- Retro
- Serial Terminal: Software
- Source Documentation
- Special Chip?
- Stair-Stepping
- Stacks
- Stack Sensitive Prompt
- Stepper Motor Demo
- STM32 Book List
- STM32 Boards
- STM32 Links
- STM32F103C8T6, 2 x 64kB flash ?
- Stm32f103 Which Board ?
- STM32F103C8 V/S GD32VF103Cx
- STM32G431xx
- STM32WLE5C8
- Storage Space
- Supported Hardware
- Svd2db-v1 README
- Svd2gas - The Freedom To Assemble
- Svd2forth-v3
- Forth Sourcecode Dependency Generation
- svd2mem-sqlite
- SWDCOM Intro
- Swdcom Binaries
- SWDCOM Install
- FreeBSD
- Debian-10.6-xfce
- Apple Mac OSX
- Building SWD2
- Modifying your Mecrisp-Stellaris Kernel
- Cortex-M7 Example
- Swap SWDCOM for the terminal.s
- Transpose ‘bl uart_init’
- Recompile your MCU
- Flash the new binary
- To upload a file named ‘upload.fs’
- To upload files via a script
- Why do we transpose bl uart_init?
- to reduce the frequency?
- Swdcom Debugging Advantages
- Terminal
- Serial Terminal: Hardware
- Serial Terminal: Hardware Flow Control
- The Terminal Problem
- Thinking Forth Tips
- Thumb Instruction Set
- Thumbulator
- TODO LIST
- Turnkey
- PCB Turret Pins
- Brass, Solder Plated Turret Pins
- Typical Turret Pin Use
- My Turret Pins
- Pin Base End
- Pin Base Inner
- Flaring The Base
- Success
- The tools
- Tool #2, The Flattener
- The Anvil
- The Hammer
- Final Crimps
- Pin1
- Pin2
- Pin3
- Pin4
- Results
- Adhesive Backed Silver Paper
- Alternate Pin Fitting
- Building a Test PCB
- PCB Top
- PCB Bottom
- PCB With MCU
- Working
- Ruggedness ?
- Unusual Forths
- Programming Question And Answers
- VIM
- Vim Syntax Highlighter
- Visualising the Forth Stack
- wordlists, vocabularies, vocabulary prefixes and implicit context switching
- XON/XOFF
- YouTube Videos about Forth
- Zeptocom