|
From: J. B. <jpu...@gm...> - 2025-08-09 11:58:07
|
Hi, my name is Jochen, I've tried to upload ports-standard.frt to my (arduino) uno to access the adc. Did use amforth-6.9 with uno.hex and uno.eep.hex (manually, done before reading the manual). (Had to add -I /home/user_xyz/.../amforth-6.9/common/lib , without it did not find some #require files) see below: ./amforth-shell-upload.sh $(./amforth-dependencies.pl ports-standard.frt) + ../amforth-6.9/tools/amforth-shell.py -p /dev/ttyUSB0 -I /home/jb/forth/amforth-6.9/common/lib ../amforth-6.9/appl/arduino/blocks/ports-standard.frt |I=appl_defs: 0 loaded |I=getting filenames on the host |I= Reading . |I= Reading /home/jb/forth/amforth-6.9/common/lib |I=using ../amforth-6.9/appl/arduino/blocks/ports-standard.frt verbatim **** /home/jb/forth/my-amforth |I=getting MCU name.. |I=successfully loaded register definitions for atmega328p |I=getting filenames on the host |I= Reading /home/jb/forth/amforth-6.9/avr8/devices/atmega328p |I= Reading /home/jb/forth/amforth-6.9/avr8/lib |I= Reading . |I= Reading /home/jb/forth/amforth-6.9/common/lib |F=../amforth-6.9/appl/arduino/blocks/ports-standard.frt |C| 1|\ |C| 2|\ port definitions for Atmegas as found on the Arduino Standard |C| 3|\ Atmega168, Atmega328p |C| 4|\ |S| 5|decimal |W| 6| |S| 7|PORTD 0 portpin: digital.0 |S| 8|PORTD 1 portpin: digital.1 |S| 9|PORTD 2 portpin: digital.2 |S| 10|PORTD 3 portpin: digital.3 |S| 11|PORTD 4 portpin: digital.4 |S| 12|PORTD 5 portpin: digital.5 |S| 13|PORTD 6 portpin: digital.6 |S| 14|PORTD 7 portpin: digital.7 |W| 15| |S| 16|PORTB 0 portpin: digital.8 |S| 17|PORTB 1 portpin: digital.9 |S| 18|PORTB 2 portpin: digital.10 |S| 19|PORTB 3 portpin: digital.11 |S| 20|PORTB 4 portpin: digital.12 |S| 21|PORTB 5 portpin: digital.13 |W| 22| |S| 23|PORTC 0 portpin: digital.14 |S| 24|PORTC 1 portpin: digital.15 |S| 25|PORTC 2 portpin: digital.16 |S| 26|PORTC 3 portpin: digital.17 |S| 27|PORTC 4 portpin: digital.18 |S| 28|PORTC 5 portpin: digital.19 |W| 29| |C| 30|\ some digital ports have an alternative use |C| 31|\ synonym is available since amforth 5.0 |S| 32|synonym SPI:SS digital.10 |E= ?? -13 7 **** /home/jb/forth/amforth-6.9/appl/arduino/blocks Kind regards, Jochen |
|
From: Martin N. <amf...@mg...> - 2025-08-09 13:03:18
|
On Sat, 9 Aug 2025 13:57:33 +0200 "J. Barth" <jpu...@gm...> wrote: > Hi, my name is Jochen, > I've tried to upload ports-standard.frt to my (arduino) uno to access > the adc. > > Did use amforth-6.9 with uno.hex and uno.eep.hex (manually, done > before reading the manual). > > (Had to add -I /home/user_xyz/.../amforth-6.9/common/lib , without it > did not find some #require files) > > see below: > > ./amforth-shell-upload.sh $(./amforth-dependencies.pl > ports-standard.frt) > + ../amforth-6.9/tools/amforth-shell.py -p /dev/ttyUSB0 -I > /home/jb/forth/amforth-6.9/common/lib > ../amforth-6.9/appl/arduino/blocks/ports-standard.frt > |I=appl_defs: 0 loaded > |I=getting filenames on the host > |I= Reading . > |I= Reading /home/jb/forth/amforth-6.9/common/lib > |I=using ../amforth-6.9/appl/arduino/blocks/ports-standard.frt > verbatim **** /home/jb/forth/my-amforth > |I=getting MCU name.. > |I=successfully loaded register definitions for atmega328p > |I=getting filenames on the host > |I= Reading /home/jb/forth/amforth-6.9/avr8/devices/atmega328p > |I= Reading /home/jb/forth/amforth-6.9/avr8/lib > |I= Reading . > |I= Reading /home/jb/forth/amforth-6.9/common/lib > |F=../amforth-6.9/appl/arduino/blocks/ports-standard.frt > |C| 1|\ > |C| 2|\ port definitions for Atmegas as found on the Arduino > Standard |C| 3|\ Atmega168, Atmega328p > |C| 4|\ > |S| 5|decimal > |W| 6| > |S| 7|PORTD 0 portpin: digital.0 > |S| 8|PORTD 1 portpin: digital.1 > |S| 9|PORTD 2 portpin: digital.2 > |S| 10|PORTD 3 portpin: digital.3 > |S| 11|PORTD 4 portpin: digital.4 > |S| 12|PORTD 5 portpin: digital.5 > |S| 13|PORTD 6 portpin: digital.6 > |S| 14|PORTD 7 portpin: digital.7 > |W| 15| > |S| 16|PORTB 0 portpin: digital.8 > |S| 17|PORTB 1 portpin: digital.9 > |S| 18|PORTB 2 portpin: digital.10 > |S| 19|PORTB 3 portpin: digital.11 > |S| 20|PORTB 4 portpin: digital.12 > |S| 21|PORTB 5 portpin: digital.13 > |W| 22| > |S| 23|PORTC 0 portpin: digital.14 > |S| 24|PORTC 1 portpin: digital.15 > |S| 25|PORTC 2 portpin: digital.16 > |S| 26|PORTC 3 portpin: digital.17 > |S| 27|PORTC 4 portpin: digital.18 > |S| 28|PORTC 5 portpin: digital.19 > |W| 29| > |C| 30|\ some digital ports have an alternative use > |C| 31|\ synonym is available since amforth 5.0 > |S| 32|synonym SPI:SS digital.10 > |E= ?? -13 7 > **** /home/jb/forth/amforth-6.9/appl/arduino/blocks > > Kind regards, Jochen > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > Have a look at: https://amforth.sourceforge.net/faq.html#what-means https://forth-standard.org/standard/tools/SYNONYM Error -13 means "Word not found". You need to load: ./common/lib/forth2012/tools/synonym.frt You can faultfind this sort of thing by typing the following: " ' synonym drop" An error means synonym isn't found. The above snippet avoids executing synonym should it actually be present. Hope this helps. -- Regards, Martin Nicholas. E-mail: rep...@mg... (Address will be valid throughout 2025). |
|
From: Martin N. <amf...@mg...> - 2025-08-09 14:06:34
|
For a numerical list of exceptions: https://forth-standard.org/standard/exception -- Regards, Martin Nicholas. E-mail: rep...@mg... (Address will be valid throughout 2025). |
|
From: J. B. <jpu...@gm...> - 2025-08-09 16:09:32
|
Thanks, Martin + Tristan. After reading »synonym is available since amforth 5.0« I did expect that it is included already. so I've tried ports-standard.frt . Worked after \-ing analog.6 and analog.7 . Perhaps a somewhat more explicit comment would help. PS: the PDF from Trute is very nice, because I have a lot of info in 1 document. PS2: 'drop' is not(?) for removing defined words, it's forget → marker empty (?) PS3: it's ports-standard.frt, not ports-arduino.frt as per documentation. PS4: perhaps we could add the library path to amforth-shell.py - making it easier for beginners(?) Kind regards, Jochen Am Sa., 9. Aug. 2025 um 15:03 Uhr schrieb Martin Nicholas via Amforth-devel <amf...@li...>: > On Sat, 9 Aug 2025 13:57:33 +0200 > "J. Barth" <jpu...@gm...> wrote: > > > Hi, my name is Jochen, > > I've tried to upload ports-standard.frt to my (arduino) uno to access > > the adc. > > > > Did use amforth-6.9 with uno.hex and uno.eep.hex (manually, done > > before reading the manual). > > > > (Had to add -I /home/user_xyz/.../amforth-6.9/common/lib , without it > > did not find some #require files) > > > > see below: > > > > ./amforth-shell-upload.sh $(./amforth-dependencies.pl > > ports-standard.frt) > > + ../amforth-6.9/tools/amforth-shell.py -p /dev/ttyUSB0 -I > > /home/jb/forth/amforth-6.9/common/lib > > ../amforth-6.9/appl/arduino/blocks/ports-standard.frt > > |I=appl_defs: 0 loaded > > |I=getting filenames on the host > > |I= Reading . > > |I= Reading /home/jb/forth/amforth-6.9/common/lib > > |I=using ../amforth-6.9/appl/arduino/blocks/ports-standard.frt > > verbatim **** /home/jb/forth/my-amforth > > |I=getting MCU name.. > > |I=successfully loaded register definitions for atmega328p > > |I=getting filenames on the host > > |I= Reading /home/jb/forth/amforth-6.9/avr8/devices/atmega328p > > |I= Reading /home/jb/forth/amforth-6.9/avr8/lib > > |I= Reading . > > |I= Reading /home/jb/forth/amforth-6.9/common/lib > > |F=../amforth-6.9/appl/arduino/blocks/ports-standard.frt > > |C| 1|\ > > |C| 2|\ port definitions for Atmegas as found on the Arduino > > Standard |C| 3|\ Atmega168, Atmega328p > > |C| 4|\ > > |S| 5|decimal > > |W| 6| > > |S| 7|PORTD 0 portpin: digital.0 > > |S| 8|PORTD 1 portpin: digital.1 > > |S| 9|PORTD 2 portpin: digital.2 > > |S| 10|PORTD 3 portpin: digital.3 > > |S| 11|PORTD 4 portpin: digital.4 > > |S| 12|PORTD 5 portpin: digital.5 > > |S| 13|PORTD 6 portpin: digital.6 > > |S| 14|PORTD 7 portpin: digital.7 > > |W| 15| > > |S| 16|PORTB 0 portpin: digital.8 > > |S| 17|PORTB 1 portpin: digital.9 > > |S| 18|PORTB 2 portpin: digital.10 > > |S| 19|PORTB 3 portpin: digital.11 > > |S| 20|PORTB 4 portpin: digital.12 > > |S| 21|PORTB 5 portpin: digital.13 > > |W| 22| > > |S| 23|PORTC 0 portpin: digital.14 > > |S| 24|PORTC 1 portpin: digital.15 > > |S| 25|PORTC 2 portpin: digital.16 > > |S| 26|PORTC 3 portpin: digital.17 > > |S| 27|PORTC 4 portpin: digital.18 > > |S| 28|PORTC 5 portpin: digital.19 > > |W| 29| > > |C| 30|\ some digital ports have an alternative use > > |C| 31|\ synonym is available since amforth 5.0 > > |S| 32|synonym SPI:SS digital.10 > > |E= ?? -13 7 > > **** /home/jb/forth/amforth-6.9/appl/arduino/blocks > > > > Kind regards, Jochen > > > > _______________________________________________ > > Amforth-devel mailing list for http://amforth.sf.net/ > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > > > > Have a look at: > https://amforth.sourceforge.net/faq.html#what-means > https://forth-standard.org/standard/tools/SYNONYM > > Error -13 means "Word not found". You need to load: > ./common/lib/forth2012/tools/synonym.frt > > You can faultfind this sort of thing > by typing the following: > " ' synonym drop" > An error means synonym isn't found. The above snippet avoids executing > synonym should it actually be present. > > Hope this helps. > > -- > Regards, > > Martin Nicholas. > > E-mail: rep...@mg... (Address will be valid throughout 2025). > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
|
From: <ho...@tj...> - 2025-08-09 14:02:37
|
Hi Jochen and welcome. AmForth is complaining when you upload ports-standard.frt because it cannot find the word synonym. This is not a built-in word and so needs to be uploaded before trying to upload ports-standard.frt synonym can be found in this file ./common/lib/forth2012/tools/synonym.frt To use the ADC will require some additional Forth words. Below is a link in the AmForth documentation (if you have not already found it) https://amforth.sourceforge.net/TG/recipes/Arduino-Analog.html?highlight=adc The ADC unit on the ATmega328P, the mcu which powers the UNO, does have more to offer than is made available in the above words. Whether that is important to you depends upon what you want to do and your appetite for reading the datasheet and modifying this set of Forth words. > (Had to add -I /home/user_xyz/.../amforth-6.9/common/lib , without it > did > not find some #require files) tools/amforth-shell.py --help amforth-shell.py can use the environment variable AMFORTH_LIB which helps with this. Let us know how you get on. Kind regards, Tristan On 2025-08-09 12:57, J. Barth wrote: > Hi, my name is Jochen, > I've tried to upload ports-standard.frt to my (arduino) uno to access > the > adc. > > Did use amforth-6.9 with uno.hex and uno.eep.hex (manually, done before > reading the manual). > > (Had to add -I /home/user_xyz/.../amforth-6.9/common/lib , without it > did > not find some #require files) > > see below: > > ./amforth-shell-upload.sh $(./amforth-dependencies.pl > ports-standard.frt) > + ../amforth-6.9/tools/amforth-shell.py -p /dev/ttyUSB0 -I > /home/jb/forth/amforth-6.9/common/lib > ../amforth-6.9/appl/arduino/blocks/ports-standard.frt > |I=appl_defs: 0 loaded > |I=getting filenames on the host > |I= Reading . > |I= Reading /home/jb/forth/amforth-6.9/common/lib > |I=using ../amforth-6.9/appl/arduino/blocks/ports-standard.frt verbatim > **** /home/jb/forth/my-amforth > |I=getting MCU name.. > |I=successfully loaded register definitions for atmega328p > |I=getting filenames on the host > |I= Reading /home/jb/forth/amforth-6.9/avr8/devices/atmega328p > |I= Reading /home/jb/forth/amforth-6.9/avr8/lib > |I= Reading . > |I= Reading /home/jb/forth/amforth-6.9/common/lib > |F=../amforth-6.9/appl/arduino/blocks/ports-standard.frt > |C| 1|\ > |C| 2|\ port definitions for Atmegas as found on the Arduino > Standard > |C| 3|\ Atmega168, Atmega328p > |C| 4|\ > |S| 5|decimal > |W| 6| > |S| 7|PORTD 0 portpin: digital.0 > |S| 8|PORTD 1 portpin: digital.1 > |S| 9|PORTD 2 portpin: digital.2 > |S| 10|PORTD 3 portpin: digital.3 > |S| 11|PORTD 4 portpin: digital.4 > |S| 12|PORTD 5 portpin: digital.5 > |S| 13|PORTD 6 portpin: digital.6 > |S| 14|PORTD 7 portpin: digital.7 > |W| 15| > |S| 16|PORTB 0 portpin: digital.8 > |S| 17|PORTB 1 portpin: digital.9 > |S| 18|PORTB 2 portpin: digital.10 > |S| 19|PORTB 3 portpin: digital.11 > |S| 20|PORTB 4 portpin: digital.12 > |S| 21|PORTB 5 portpin: digital.13 > |W| 22| > |S| 23|PORTC 0 portpin: digital.14 > |S| 24|PORTC 1 portpin: digital.15 > |S| 25|PORTC 2 portpin: digital.16 > |S| 26|PORTC 3 portpin: digital.17 > |S| 27|PORTC 4 portpin: digital.18 > |S| 28|PORTC 5 portpin: digital.19 > |W| 29| > |C| 30|\ some digital ports have an alternative use > |C| 31|\ synonym is available since amforth 5.0 > |S| 32|synonym SPI:SS digital.10 > |E= ?? -13 7 > **** /home/jb/forth/amforth-6.9/appl/arduino/blocks > > Kind regards, Jochen > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |