|
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 |