Coder Social home page Coder Social logo

wa1tnr / camelforth-rp2040-b-ms-u Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 922 KB

CamelForth in C by Dr Brad Rodriguez - UNSTABLE - RP2040 Pi Pico port with mass storage QSPI flashROM

License: GNU General Public License v3.0

C 72.35% C++ 11.60% Shell 5.20% Forth 1.15% CMake 3.80% Pawn 2.87% Assembly 3.02%
c interpreter forth interpreted-programming-language usart usb-cdc camelforth memory-dumper memory-map rp2040

camelforth-rp2040-b-ms-u's Introduction

camelforth-rp2040-b-MS-U UNSTABLE 0.1.7-pre-alpha Wed Apr 14 14:43:13 UTC 2021

CamelForth in C, by Dr. Brad Rodriguez

UNSTABLE version - with mass storage support QSPI flashROM

NEOPIX support added (pio) 11 May. Feather target configured for that. Edit source for others.

Stores forth source code in QSPI flash, and plays it back during COLD (player piano).

NEWS

4 November 2022 - inquiry received

Begin forwarded message:

> Date: Mon, 14 Nov 2022 15:03:24 +0000

> From: D.V.

> Subject: [CamelForth] Camelforth for Pico

> Wondering whether the implementor will continue to develop the Pico implementation and/or 'entertain' questions about the implementation.

> I didn't see any contact information on this site or the 'github' material. Thank you!

The one open issue already invites contact through the issue mechanism.

Work is only done on this repository when a specific operational difficulty arises, such as an update to pico-sdk that changes how (or if) the program continues to compile correctly.

Not noticed ordinarily, as the project is essentially mothballed.

In its current state it should be able to read and write to on-board (external, QSPI) flashROM 'raw'. This amounts to a player piano situation; it plays back the Forth source code (in ascii representation, as with any ascii plaintext file) .. upon a cold boot.

Which, in turn, amounts to an extended Forth dictionary.

14 April 2021 - three targets supported.

RPi Pico RP2040, Adafruit Feather and ItsyBitsy RP2040 (three targets) all supported.

Use a different shell script to build each.

see pico-examples/build for those scripts.

Added brief documentation (see immediately, below!)

BRIEF DOCO

The program will stores your Forth source code, in QSPI flash.

It will then play it back, during COLD (player piano).

There is a new 'flaccept' (flash accept) word/thread that does the play-back during COLD; 'rewind' is used to reset the pointer to the flashROM address where flaccept (& friends) reads in the simulated keystrokes.

'rewind' word controls what happens the next time COLD is called. 'rewind' allows the source to be read back into the interpreter; failure to use 'rewind' leaves the generic camelforth kernel, only, without the update to the forth dictionary provided by this mechanism.

'reflash' simply starts the target such that the USB mass storage is visible to the host PC.

'reading' accepts ascii upload of forth source code; terminate with ESC (press it after the upload, the interpreter will see your keypress of ESC and stop the upload, and mark the buffer termination).

Max size supported is 4096 bytes (leave off a few bytes for proper termination of the buffer).

Short uploads are not detected - press ESC as detailed, above.

'reading' puts out its own address onto TOS.

'buf2flash' takes that address and uses it to find what you've just ascii-uploaded (into SRAM).

It writes that block of SRAM into QSPI flashROM.

Nominally, at 0x10040000 per the SDK example program.

'erase' takes an address and erases the QSPI flashROM at that address. Should be a multiple of 0x1000 as that's the size erased.

OLDER

new feature: no-error getKey()

 improved: rp2040_pico_getkey_usb.inc

Reasonably well debugged - functional Forth interpreter.

There was one bug where it crashes unexpectedly, after a decently long runtime. 'getchar()' in the upstream pico-sdk now has a bug report filed.

Port: rp2040, Raspberry Pi Pico target board, February, 2021.

older entries in this README.md, follows (from prior to 17 Feb Wed 16:29 UTC).

PARENT was camelforth-rp2040-a 0.1.1-pre-alpha Tue Feb 9 05:28:31 UTC 2021

commit 6cd03e97f38784f3f7fe8baf68416657af9469a7

CamelForth in C by Brad Rodriguez

About

CamelForth

A Forth in C by Dr Brad Rodriguez

Forth interpreter for the RP2040 and Raspberry Pi Pico.

UNSTABLE version. Look for changes and improvements here.

New feature: the blink word. Use once per blink.

Requires pico-sdk and is modeled on pico-examples.

The /dev/ttyACM0 is the primary interface (USB).

(Reference host PC is Linux Debian amd64)

Using CP2104 USB-to-USART bridge, the secondary interface (in Linux host PC) is /dev/ttyUSB0, but that is arbitrary (you can bridge using other methods and chips).

Connected to UART0 on the pico.

Topics

camelforth

rp2040

raspberry-pi-pico

rpi-pico-pio

forth

c

old branches:

BUILD ENVIRONMENT - bare bones text interpreter

no Forth functionality at all - not even base code.

Just keyboard echo loop.

END.

camelforth-rp2040-b-ms-u's People

Contributors

wa1tnr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

camelforth-rp2040-b-ms-u's Issues

Contact with the author.

Please leave a message here if contact is desired (questions about the program, &c.) and if you file an issue on the repository, please also comment on this issue. Thanks! -wa1tnr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.