.. index:: learning-modules > :ref:`What's New ?` < .. _learning-modules: .. Created learning-modules.rst: Mon 13 Feb 2023 11:08:29 AEDT .. Full Path: /home/tp/mecrisp-unofficial-doc/learning-modules.rst .. Author Copyright 2023 by t.j.porter \ .. Made by /home/tp/projects/scripts/makerst.sh -->/usr/local/bin/makerst .. license: MIT, please see COPYING Learning Modules - Blinkies =========================== This page will eventually present a number of STM32F0 Discovery board blinkies for you to work thru. Each one has a descriptive page explaining the operation. Things You Will Need -------------------- **A STM32F0 Discovery Board** `Don't forget the tech manuals! `_ .. image:: stm32-disco.jpg .. note:: Alternately you can use a :ref:`standalone STM32F0xx MCU on a homemade or header board` .. image:: pics/prototyping/qfn32-header-pcb-stm32f051-run-mode.jpg **Mecrisp-Stellaris Forth** 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. Refer to: :ref:`methods for flashing` Mecrisp-Stellaris Forth onto your board or chip. **A Serial Terminal Emulator** A :ref:`serial terminal emulator` running on a PC which provides the Forth REPL user interface. Also needed will be a :ref:`serial 3.3v to USB dongle ` .. image:: pics/zeptocom/zeptocom-chrome-15feb23.jpg **Or SWDCOM** *Advanced Only:* Use :ref:`SWDCOM` to access the REPL using the MCU SWD pins connected to a SWD/USB interface like this $5 Chinese one. .. image:: pics/swd-usb-interface-dongle.jpg Or :ref:`Make your own SWD/USB Interface` from a $2 Blue Pill **SVD2DB, a Peripheral Configuration Search Tool** :ref:`SVD2DB` is a search tool for STM32F0xx *CMSIS-SVD Register names, *Register Memory Addresses*, Register Access Rights, BitWidths, BitOffsets, and description fields*. This assists the createion of programs like blinky-1.fs, and greatly reduces searching thru the Technical Manual for this information. .. image:: pics/svd2db-v1-f0xx.jpg **All set up and ready ?? You should now have a terminal window open that looks somewhat like the picture below.** .. image:: pics/terminal-window.jpg Plus: * a PDF window with the STM32F051 Reference Manual RM0091 open * a SVD2DB (readdb) window open **LETS GO!** Learning Modules ---------------- **For portable code, a much better approach is to define application APIs in a generic way, like init_system_timer(), and then implement this function in a platform specific way using registers.** blinky-1a.fs ^^^^^^^^^^^^ The only module so far. .. literalinclude:: blinkies/blinky-1a.fs **Download blinky-1a.fs-->** :download:`Download blinky-1a.fs` **Operation of blinky-1a.fs -->** :ref:`blinky-1a Explained`