FiveForths

32-bit RISC-V Forth for microcontrollers

  • Devlog 19 Get Put Key Emit

    December 14, 2022 Log 19 Minor UART fix Major macro fix Get Put Key Emit Closing thoughts Log 19 In this session I plan on completing the implementation of get/put functions for UART, as well as fixing the remaining 2 primitives KEY and EMIT. Minor UART fix I noticed a...

  • Devlog 18 Testing Uart

    December 13, 2022 Log 18 Testing UART Looping for UART Interrupt initialization Closing thoughts Log 18 After a few days deliberating on the best implementation for interrupts, I decided not to implement them just yet. I did implement a short test routine and I’m happy to report my UART code...

  • Devlog 17 Fixing Uart

    December 8, 2022 Log 17 Fixing UART Closing thoughts Log 17 I made a mistake when configuring the RX/TX GPIO pins. This session’s focus is on fixing that. Fixing UART When reviewing the datasheet for the Longan Nano’s MCU, I realized I made one mistake. The USART pins RX/TX are...

  • Devlog 16 Initializing Uart Pt3

    December 8, 2022 Log 16 Initializing UART pt3 Configuring GPIO Closing thoughts Log 16 I’m aiming to complete the UART and GPIO initialization in this session. Initializing UART pt3 Last time, we enabled the clocks and set the baud rate. Now we’ll look at setting up the mode bits. We...

  • Devlog 15 Initializing Uart Pt2

    December 7, 2022 Log 15 Initializing UART pt2 Closing thoughts Log 15 The goal today is to continue with the UART initialization and validate the register values in GDB. Initializing UART pt2 After enabling the clocks, the next step is to set the baud rate for USART0. From the GD32VF103...

  • Devlog 14 Initializing Uart

    December 6, 2022 Log 14 Initializing UART Closing thoughts Log 14 I’ve finally made it to the I/O part. I want to do this before the interpreter, just to be sure I can actually communicate with the Longan Nano MCU. Initializing UART The Longan Nano MCU contains a few UARTs...

  • Devlog 13 Debugging On Mcu

    December 4, 2022 Log 13 Debugging on MCU Closing thoughts Log 13 In this session I’ll focus on debugging directly on the MCU with gdb and openocd. Debugging on MCU I started this session by wiring my Longan Nano to my FTDI FT232RL USB device. The device itself has all...

  • Devlog 12 Completing Semi

    December 3, 2022 Log 12 Fixing COLON Starting SEMI Continuing SEMI Completing SEMI Setup registers Closing thoughts Log 12 Thanks to Moving Forth, I finally understand how COLON works, and the purpose of docol and enter. Let’s fix this. Fixing COLON In the last session I couldn’t figure out if...

  • Devlog 11 Completing Colon

    December 1, 2022 Log 11 Completing COLON Closing thoughts Log 11 I think this session will be short since I only plan to “complete” the COLON primitive. Completing COLON OK so I wrote quite a few lines of code to finish this definition, without logging what I was doing. So...

  • Devlog 10 Extending Colon And Fixing Bugs

    November 30, 2022 Log 10 Fixing bug Moving TOIN No indexes Testing my code Creating the header Closing thoughts Log 10 I want to start by jumping into the COLON primitive and adding the remaining instructions for it to work correctly, but first I need to fix some issues. Fixing...