Mecrisp Forth for the STM32WB

Interactive and extensible language. Built-in lexical analysis (tokenizer, parser), needs less than 32 KiB Flash and 4 KiB RAM.

The competitor is MicroPython, but it needs more than 250 KiB of Flash.

But what about uLisp? It is also small and self-contained.

CMSIS-SVD for STM32WB

SVD 2 Forth

Install the STM32CubeIDE and get the STM32WBxx_CM4.svd from the folder:

Version 1.6: stm32cubeide_1.1.0/plugins/com.st.stm32cube.ide.mcu.productdb.debug_1.1.0.201910081157/resources/cmsis/STMicroelectronics_CMSIS_SVD
Version 1.7: stm32cubeide_1.2.0/plugins/com.st.stm32cube.ide.mcu.productdb.debug_1.2.0.201912201802/resources/cmsis/STMicroelectronics_CMSIS_SVD

Install the Mecrisp-Stellaris and copy the STM32WBxx_CM4.svd into common/svd2forth-v3. Edit the Makefile

common/svd2forth-v3> diff Makefile Makefile~
5c5
< FOLDED_SVD            = STM32WBxx_CM4.svd
---
> FOLDED_SVD            = STM32L07x.svd

Edit the shell script raw-svd-clean.sh. Replace gsed with sed.

Generate the Forth and Assembler source files:

common/svd2forth-v3> make everything
common/svd2forth-v3> make mem

STM32WB Nucleo Board

stm32wb-nucleo.jpg

https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html

Schematic Nucleo Board MB1355

Schematic Nucleo Dongle MB1293

Build

Linux packages:

  • cross-arm-binutils
  • cross-arm-none-gcc9
  • cross-arm-none-newlib-devel

  • stlink
  • stlink-gui
  • stm32flash
  • openocd

OpenOCD

OpenOCD 0.10.0 does not support STM32WB, therefore I built the OpenOCD from the sources.

$ git clone https://git.code.sf.net/p/openocd/code openocd-code 

But openSUSE' jimtcl Package conflicts with the configure script, to prevent this:

$ mv /usr/bin/jimsh /usr/bin/jimsh-unused

The usual configure/make/install:

$ ./configure
$ make
# make install

/usr/local/share/openocd/scripts/target/stm32wbx.cfg

/opt/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=SWD -ob displ

Debug

-- Peter Schmid - 2019-12-29

Comments

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatfs 1b.fs r1 manage 0.7 K 2020-01-12 - 10:21 PeterSchmid  
Unknown file formatsvd STM32WBxx_CM4.svd r1 manage 1536.1 K 2019-12-31 - 18:11 PeterSchmid  
Unknown file formats STM32WBxx_CM4.svd.equates.s r1 manage 447.3 K 2020-01-12 - 10:21 PeterSchmid  
Unknown file formatfs bitfields.fs r1 manage 526.9 K 2020-01-12 - 10:21 PeterSchmid  
Unknown file formatfs memmap.fs r1 manage 132.7 K 2020-01-12 - 10:21 PeterSchmid  
JPEGjpg stm32wb-nucleo.jpg r1 manage 85.8 K 2019-12-30 - 16:51 PeterSchmid  
Edit | Attach | Watch | Print version | History: r34 | r14 < r13 < r12 < r11 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r12 - 2020-01-19 - PeterSchmid
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback