Skip to content

Commit 4c0bb52

Browse files
committed
Adjust GitHub Action and fix broken release
1 parent 0e84ac6 commit 4c0bb52

File tree

8 files changed

+31
-16
lines changed

8 files changed

+31
-16
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ jobs:
2222
- name: Build the FiveForths firmware binary for ${{matrix.device}}
2323
run: make ${{matrix.device}}
2424

25-
- name: Obtain SHA256 hash of the firmware ${{matrix.device}}.bin
26-
run: sha256sum fiveforths.bin > fiveforths.bin.sha256
25+
- name: Rename firmware binary file
26+
run: mv fiveforths.bin fiveforths-${{matrix.device}}.bin
27+
28+
- name: Obtain SHA256 hash of the firmware
29+
run: sha256sum fiveforths-${{matrix.device}}.bin > fiveforths-${{matrix.device}}.bin.sha256
2730

2831
- uses: actions/upload-artifact@v3
2932
with:
3033
name: fiveforths-firmware-${{matrix.device}}
31-
path: fiveforths.bin*
34+
path: fiveforths-${{matrix.device}}.bin*

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2021 Alexander Williams, On-Prem <[email protected]>
3+
Copyright (c) 2021~ Alexander Williams, https://a1w.ca
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Makefile for building and testing
44

55
PROGNAME = fiveforths
6+
FIRMWARE ?= $(PROGNAME).bin
7+
DEVICE ?= /dev/ttyUSB0
68
CFLAGS := -g
79
CROSS ?= /usr/bin/riscv64-unknown-elf-
810
AS := $(CROSS)as
@@ -48,6 +50,9 @@ openocd:
4850
debug:
4951
/opt/riscv/bin/riscv64-unknown-elf-gdb -command=debug.gdb -q fiveforths.elf
5052

53+
flash:
54+
stm32loader -p $(DEVICE) -ewv $(FIRMWARE)
55+
5156
longan-nano:
5257
$(MAKE) build BOARD=longan-nano
5358

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 32-bit RISC-V Forth for microcontrollers
1+
# FiveForths: 32-bit RISC-V Forth for microcontrollers
22

33
[![GitHub release](https://img.shields.io/github/release/aw/fiveforths.svg)](https://github.com/aw/fiveforths)
44

@@ -139,6 +139,7 @@ Please create a pull-request or [open an issue](https://github.com/aw/picolisp-k
139139
* Fix issue #9 - Handling of carriage return
140140
* Fix issue #11 - Ignore non-printable characters
141141
* Re-organize code to support different boards and MCUs
142+
* Add boot message when the device is reset
142143
* Add GitHub action to automatically build and publish the firmware binaries
143144

144145
## 0.1 2023-01-09 - First release
@@ -160,4 +161,4 @@ This document would be incomplete without listing other Forths which inspired me
160161

161162
[MIT License](LICENSE)
162163

163-
Copyright (c) 2021~ Alexander Williams, On-Prem <[email protected]>
164+
Copyright (c) 2021~ [Alexander Williams](https://a1w.ca)

fiveforths.s

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FiveForths - https://github.com/aw/FiveForths
33
RISC-V Forth implementation
44
55
The MIT License (MIT)
6-
Copyright (c) 2021 Alexander Williams, On-Prem <[email protected]>
6+
Copyright (c) 2021~ Alexander Williams, https://a1w.ca
77
*/
88

99
##
@@ -19,6 +19,12 @@ Copyright (c) 2021 Alexander Williams, On-Prem <[email protected]>
1919
# s1 = IP = instruction pointer
2020
# s2 = RSP = return stack pointer
2121

22+
# Ensure the _start entry label is defined first
23+
.text
24+
.global _start
25+
_start:
26+
j boot
27+
2228
# include board-specific functions and constants from src/boards/<board>/
2329
.include "board.s"
2430

src/01-variables-constants.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Variables and constants
33
##
44

5-
.equ FORTH_VERSION, 1
5+
.equ FORTH_VERSION, 2
66

77
##
88
# Memory map

src/03-interrupts.s

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
# Interrupts
33
##
44

5-
.text
6-
.global _start
7-
_start:
8-
j boot
9-
105
.balign CELL
116
.global interrupt_handler
127
.type interrupt_handler, @function

src/06-initialization.s

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# Initialization
33
##
44

5-
.text
6-
.global _start
7-
85
# board boot initializations
96
boot:
107
call interrupt_init # RISC-V interrupt CSR initialization
@@ -21,6 +18,12 @@ boot:
2118
li t1, LATEST # load LATEST variable
2219
sw t0, 0(t1) # initialize LATEST variable to contain word_SEMI memory address
2320

21+
# display boot message
22+
la a1, msg_boot # load string message
23+
addi a2, a1, 74 # load string length
24+
call uart_print # call uart print function
25+
j reset
26+
2427
# reset the Forth stack pointers, registers, variables, and state
2528
reset:
2629
# initialize stack pointers
@@ -53,3 +56,5 @@ tib_zerofill:
5356
j tib_zerofill # repeat
5457
tib_done:
5558
j interpreter_start # jump to the main interpreter REPL
59+
60+
msg_boot: .ascii "FiveForths v0.2, Copyright (c) 2021~ Alexander Williams, https://a1w.ca \n\n"

0 commit comments

Comments
 (0)