Difference: ForthSTM32WB (17 vs. 18)

Revision 182020-01-26 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Changed:
<
<

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.

>
>
Mecrisp Forth for the STM32WB
Intro
Forth is an interactive and extensible language, built-in lexical analysis (tokenizer, parser), needs less than 32 KiB Flash and 4 KiB RAM.
 
Added:
>
>
The competitor is MicroPython, but it needs more than 250 KiB of Flash. What about uLisp? It is also small (32 KiB) and self-contained, but it needs garbage collection, that takes about 2 ms @ 40 MHz.
 
Changed:
<
<

STM32WB Nucleo Board

>
>
Contents

STM32WB Nucleo Board

  stm32wb-nucleo.jpg
Changed:
<
<
https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html

Schematic Nucleo Board MB1355

>
>

Build

 
Changed:
<
<
Schematic Nucleo Dongle MB1293

Build

Tools

>
>

Tools

 Linux packages:
  • cross-arm-binutils
  • cross-arm-none-gcc9
Line: 45 to 50
 
Changed:
<
<

CMSIS-SVD for STM32WB

>
>

CMSIS-SVD for STM32WB

 
Changed:
<
<
It is tedious job to find all the registers in the data sheets. There is CubeMX to create code for STM's MCUs, but mecrisp use pure assembler. There is convenient way to create equates for the assembler.
>
>
It is tedious job to find all the registers in the data sheets. There is CubeMX to create code for STM's MCUs, but mecrisp use pure assembler. There is convenient way to create equates for the assembler.
  SVD 2 Forth
Line: 79 to 84
 You can get STM32WBxx_CM4.svd.equates.s from my site: STM32WBxx_CM4.svd.equates.s
Changed:
<
<

Create the Binary for STM32WB

>
>

Create the Binary for STM32WB

 
Changed:
<
<

Debug

>
>

Debug

  There is good architecture diagram from STM32MPU Wiki (consider only the Cortex-M4 parts):

700px-GDB_openOCD_focus_graph.png

Changed:
<
<

OpenOCD

>
>

OpenOCD

 
Changed:
<
<
OpenOCD 0.10.0 does not support STM32WB, therefore I built the OpenOCD from the sources.
>
>
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
Line: 172 to 178
 Note: automatically using hardware breakpoints for read-only addresses.
Changed:
<
<

Flash mecrisp to the Target

>
>

Flash mecrisp to the Target

 
Changed:
<
<

Nucleo Board

>
>

Nucleo Board

 
Changed:
<
<
Connect Nucleo's ST-LINK USB to you PC. Erase the flash e.g. by openOCD, we use 768 KiB -> 192 sectors.
>
>
Connect Nucleo's ST-LINK USB to you PC. Erase the flash e.g. by openOCD, we use 768 KiB Right 192 sectors.
 
$ telnet localhost 4444
Trying ::1...

Line: 197 to 205
 
Changed:
<
<

USB Dongle

>
>

USB Dongle

 
Changed:
<
<
The USB Dongle does not have a ST-Link interface, but the STM32WB has a built-in boot-loader (BTW you can flash the Nucleo Board in the same way). I use the CLI from the STM32CubeProg package.
>
>
The USB Dongle does not have a ST-Link interface, but the STM32WB has a built-in boot-loader (BTW you can flash the Nucleo Board in the same way). I use the CLI from the STM32CubeProg package.
 

Changed:
<
<
$ alias cubepgmcli='/opt/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI' $ cubepgmcli -c port=USB1 -ob displ
>
>
$ alias cubepgmcli='/opt/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI' $ cubepgmcli -c port=USB1 -ob displ
 
Added:
>
>

BLE and other Middlewares

STM32WB Forth without BLE, USB, Filesystems, RTOS etc. is not complete, to build this by myself from the scratch overwhelms me. I would like to go the reverse way and use the STM tools like CubeIDE, HAL, CubeMX and integrate the Mecrips Forth into it. Forth as an interactive extension for the STM ecosystem. Mecrisp Forth running as a CMSIS-RTOS thread.

  -- Peter Schmid - 2019-12-29
Line: 212 to 230
 
<--/commentPlugin-->
Deleted:
<
<
  • 700px-GDB_openOCD_focus_graph.png:

 
META FILEATTACHMENT attachment="stm32wb-nucleo.jpg" attr="" comment="" date="1577724681" name="stm32wb-nucleo.jpg" path="stm32wb-nucleo.jpg" size="87877" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="STM32WBxx_CM4.svd" attr="" comment="" date="1577815908" name="STM32WBxx_CM4.svd" path="STM32WBxx_CM4.svd" size="1572973" user="PeterSchmid" version="1"
Line: 234 to 249
 
META FILEATTACHMENT attachment="vectors.s" attr="" comment="" date="1579900483" name="vectors.s" path="vectors.s" size="4607" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="mecrisp-stellaris-stm32wb55.bin" attr="" comment="" date="1579900771" name="mecrisp-stellaris-stm32wb55.bin" path="mecrisp-stellaris-stm32wb55.bin" size="15384" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="mecrisp-stellaris-stm32wb55.hex" attr="" comment="" date="1579900771" name="mecrisp-stellaris-stm32wb55.hex" path="mecrisp-stellaris-stm32wb55.hex" size="43325" user="PeterSchmid" version="1"
Added:
>
>
META FILEATTACHMENT attachment="nucleo-header.jpg" attr="" comment="" date="1580032769" name="nucleo-header.jpg" path="nucleo-header.jpg" size="86766" user="PeterSchmid" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback