Difference: ForthSTM32WB (16 vs. 17)

Revision 172020-01-24 - PeterSchmid

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

Mecrisp Forth for the STM32WB

Line: 14 to 14
 
Changed:
<
<

CMSIS-SVD for STM32WB

>
>

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

Tools

Linux packages:
  • cross-arm-binutils
  • cross-arm-none-gcc9
  • cross-arm-none-newlib-devel
  • openocd for debugging

optional:

CMSIS-SVD for STM32WB

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
Changed:
<
<
>
>
  Install the STM32CubeIDE and get the STM32WBxx_CM4.svd from the folder:

Line: 43 to 76
 common/svd2forth-v3> make mem
Changed:
<
<

STM32WB Nucleo Board

>
>
You can get STM32WBxx_CM4.svd.equates.s from my site: STM32WBxx_CM4.svd.equates.s
 
Deleted:
<
<
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

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

Create the Binary for STM32WB

 
Line: 136 to 142
 Connection closed by foreign host.
Added:
>
>
Sample debugging session:
 
$ gdb
GNU gdb (GDB; openSUSE Tumbleweed) 8.3.1

Line: 165 to 172
 Note: automatically using hardware breakpoints for read-only addresses.
Added:
>
>

Flash mecrisp to the Target

Nucleo Board

Connect Nucleo's ST-LINK USB to you PC. Erase the flash e.g. by openOCD, we use 768 KiB -> 192 sectors.

$ telnet localhost 4444
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> reset init

> flash erase_sector 0 0 192
erased sectors 0 through 192 on flash bank 0 in 4.583453s
> flash write_image mecrisp-stellaris-stm32wb55.hex

> shutdown
shutdown command invoked
Connection closed by foreign host.

USB Dongle

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.

$ alias cubepgmcli='/opt/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI'
$ cubepgmcli -c port=USB1 -ob displ
 -- Peter Schmid - 2019-12-29

Comments

Line: 173 to 214
 
  • 700px-GDB_openOCD_focus_graph.png:
Added:
>
>
 
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"
META FILEATTACHMENT attachment="STM32WBxx_CM4.svd.equates.s" attr="" comment="" date="1578824494" name="STM32WBxx_CM4.svd.equates.s" path="STM32WBxx_CM4.svd.equates.s" size="458038" user="PeterSchmid" version="1"
Line: 181 to 224
 
META FILEATTACHMENT attachment="1b.fs" attr="" comment="" date="1578824494" name="1b.fs" path="1b.fs" size="756" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="st_nucleo_wb.cfg" attr="" comment="" date="1579447970" name="st_nucleo_wb.cfg" path="st_nucleo_wb.cfg" size="266" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="700px-GDB_openOCD_focus_graph.png" attr="" comment="" date="1579450310" name="700px-GDB_openOCD_focus_graph.png" path="700px-GDB_openOCD_focus_graph.png" size="106011" user="PeterSchmid" version="1"
Added:
>
>
META FILEATTACHMENT attachment="flash.s" attr="" comment="" date="1579900483" name="flash.s" path="flash.s" size="6518" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="interrupts.s" attr="" comment="" date="1579900483" name="interrupts.s" path="interrupts.s" size="1501" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="Makefile" attr="" comment="" date="1579900483" name="Makefile" path="Makefile" size="790" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="mecrisp-stellaris-stm32wb55.s" attr="" comment="" date="1579900483" name="mecrisp-stellaris-stm32wb55.s" path="mecrisp-stellaris-stm32wb55.s" size="3995" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="memmap" attr="" comment="" date="1579900483" name="memmap" path="memmap" size="192" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="terminal.s" attr="" comment="" date="1579900483" name="terminal.s" path="terminal.s" size="4709" user="PeterSchmid" version="1"
META FILEATTACHMENT attachment="turbo.s" attr="" comment="" date="1579900483" name="turbo.s" path="turbo.s" size="2204" user="PeterSchmid" version="1"
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"
 
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