Path: ...!3.eu.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.bofh.team!paganini.bofh.team!not-for-mail From: antispam@fricas.org (Waldek Hebisch) Newsgroups: comp.lang.forth Subject: Re: 1 euro Olimex RISC-V mini-PC: this needs Forth ;) Date: Mon, 21 Oct 2024 10:24:03 -0000 (UTC) Organization: To protect and to server Message-ID: References: <87frpoewse.fsf@nightsong.com> Injection-Date: Mon, 21 Oct 2024 10:24:03 -0000 (UTC) Injection-Info: paganini.bofh.team; logging-data="2609586"; posting-host="WwiNTD3IIceGeoS5hCc4+A.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A"; User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64)) X-Notice: Filtered by postfilter v. 0.9.3 Bytes: 3247 Lines: 60 albert@spenarnc.xs4all.nl wrote: > In article , > Waldek Hebisch wrote: >>albert@spenarnc.xs4all.nl wrote: >>> In article , >>> >>> For what it is worth. >>> I have ported the ciforth model (only 64 bits,the 5.4.0 level) onto >>> linux running on a riscv, taking advantage from earlier Dutch >>> implementation of noforth for triecky code words (UMD/MOD). >>> http://home.hccnet.nl/a.w.m.van.der.horst/lina.html >>> As usual, all words are extensively tested, all words are documented. >> >>Thanks, works on Milkv. >> >>> Once you have mapped the io space in virtual space and access it >>> via VMA-IO, you can apply all knowledge gained from the documentation >>> of the underlying System On a Chip. >>> For this particular board the printed circuit layout, the schematics >>> (9 pages) and a full 1000+ page documentation of the SoC (Allwinner >>> D1) is available. That is why I bought it. >> >>For Milkv there are schematics and chipset documentation (I did not >>check how complete it is). > > Could you try if the mapping succeeds? > Start up as root. > Now do > MMAP-IO > and check VMA-IO > It contains the virtual memory address, or possible an error code > -13. The SoC descriptions maps from VMA-IO. > You can also check DEV-MEM that should be 4, normally. > In forth.lab you can see the use of MMAP-IO in relation to > a number of SoC's. > I strive to have working: set-function gpio-on gpio-off gpio-on. > The io-nummers are system dependant. I get: RISCV ciforth beta 2023Mar30 MMAP-IO OK HEX OK VMA-IO @ . B2000000 OK DEV-MEM @ . 3 OK Datasheet says that device address space starts at 0x01000000 and ends at 0x7FFFFFFF (above is DRAM). There is a command line utility to do I/O. Sending 0x01000000 to 0x03022000 turns on blue LED, sending 0x0 truns it off. AFAICS in lina corresponding address is B2022000. More generally, there are four GPIO devices (ports). Port 0 is at 0x03020000, port 1 at 0x03021000, port 2 at 0x03022000, port 3 at 0x03023000. Device access should be done in 32-bit units. -- Waldek Hebisch