Skip to content

tocisz/forthplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STM32F103C8 tutorial by Cichy

Arduino

There is an STM32 project for Arduino. Follow the installation instructions from the project wiki.

Forth

Flashing with a serial connection

First you need to flash forth. You can use a USB-UART dongle. Download stm32loader. Before use, install: sudo pip install pyserial.

Set BOOT0 jumper to 1.

Connect:

STM32   PA9  --- RX   UART-USB
        PA10 --- TX

STM32 USB-UART

Get the flash file from mecrisp-stellaris.

  • mecrisp-stellaris-2.3.9b/stm32f103-ra/*.bin includes register allocator optimizations
  • mecrisp-stellaris-2.3.9b/stm32f103/*.bin is smaller, but without optimizations.
./stm32loader.py -p /dev/ttyUSB0 -e -v -w mecrisp-stellaris-stm32f103.bin

Connecting

picocom can do the job:

picocom -b 115200 --imap lfcrlf /dev/ttyUSB0

But folie is more comfortable. You can get it from the GitHub releases page.

Installing USB on the microcontroller

A lot of Forth code can be found in this repository.

See here for a list of directories.

Most important now is suf which will allow programming the microcontroller without USB-UART connector.

  • run folie
  • !cd ..../explore/1608-forth/suf
  • !s f-common.fs

Now you should be able to connect to the microcontroller directly with USB.

Removing unwanted code

With f-common.fs comes a lot of code thay may not be necessary, e.g. the display driver and fonts. These can be removed. Read the article about cornerstones.

About

Experiments with forth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages