Coder Social home page Coder Social logo

nanoforth's Introduction

The emerging micro-controller communities are no more focusing on specific hardware or form factor but around tool-chain provided typically with higher-level languages. The once popular Arduino platform gradually lose out the market share to ESP, Raspberry, and whatever new kids on the block. Being chip agnostic, the Arduino IDE does serve as an excellent learning tool for future systems to come. No matter how the hardware environment evolved, especially on the edge of IoT universe, I felt a minimalist system similar to the Arduino UNO/Nano will always have its value especially in learning even when the size of chips shrunk down to micro or even nano-scale one-day.

On the language end, check out NASA and contemplate why FORTH is still running on a number of space probes today. It's known that projects developed in interactive/incremental style can be more productive compared to typical static tool-chain such as the C/C++ provided by Arduino.

I touched FORTH briefly years ago back in school days. After seeing Nakagawa's TinyForth, I got this idea!

nanoFORTH - FORTH for Arduino Nano

Observations

+ many Arduino makers are still using UNO or Nano,
+ most do not need the full-blown FORTH vocabularies,
  50+ words or so, anything more might need ESP or RPi.
+ most are not familiar with standard FORTH words, abbreviation would be OK,
+ meta-compiler not needed, i.e. no trying to build a new Forth

Features

+ no bootloader burning needed, so no extra cost or bricking,
+ a downloadable library from Arduino IDE,
+ easy to follow .ino Sketch examples, (bluetooth, 7-seg, robot)
+ 1K RAM dictionary, and EEPROM to persist user defined words,
+ call Arduino functions, (i.g. pinMode, digitalRead/Write, analogRead/Write, millis, delay),
+ C API, for user defined functions (ig. Bluetooth, Servo, ...),
+ timer ISR, support multi-tasking,
+ pin change ISR, support hardware trigger,
+ memory dump and execution trace, to understand FORTH internal,
+ autorun after reboot, can become a turnkey system

Use Cases - Interaction Examples

1 5 OUT ⏎

Red LED on

  • Turn off LED(blue) on digital pin 6, (0 is LOW).

0 6 OUT ⏎

  • Define a function, or a 'word' in FORTH, red to turn red LED on, and blue LED off.

: red 1 5 OUT 0 6 OUT ; ⏎

> the symbol : starts the definition, and ; ends the function (or word) definition

  • Define another word blu to turn red LED off and turn blue LED on (sorry, no blue, nanoFORTH takes max 3 characters only).

: blu 0 5 OUT 1 6 OUT ; ⏎

  • Execute blu, i.e. to turn red LED off, and blue LED on.

blu

> a function is defines in the 'Compile Mode', and executed in 'Interpreter Mode'. The difference is at the leading ':' (colon) sign.

  • Define a word xy to blink red/blue every 500 ms alternatively.

: xy FOR red 500 DLY blu 500 DLY NXT ; ⏎

  • Run 10 cycles of xy.

10 xy

Click for Video
Video

> so, 10 FOR ... NXT is to loop 10 times, (counting down from 10, 9, 8, ..., 2, 1)

  • If that flashes too slow for you, nanoFORTH allows redefining xy by "forget" it first.

FGT xy

> that erased xy from memory, we can redefine it now
> actually, multiple definition of the same function is allowed, the latest one takes precedence.
> also, FGT a word that is an interrupt service (see page3) might cause undefined behavior

: xy FOR red 200 DLY blu 300 DLY I . NXT ; ⏎

  • Now, try 20 cycles of xy this time.

20 xy ⏎ ⇨ 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ok

> so, you've probably noticed that I is the loop counter and . (dot) prints it

  • Let's try analog, say read a value from analog pin 1, assuming you have one installed, or try this Wokwi project again

1 AIN ⏎
⇨ 258_ok

> 258 is the value nanoFORTH read from photo-resister, then place it on top of data stack > a photo-resister or potentiometer returns value between 0 and 1023

  • If we don't need the value 258, we can drop it from data stack to keep it clean

DRP ⏎
⇨ ok

> 258 is gone now

  • Define lit to read from photoresister (or a potentiometer) and determine whether its value is > 200.

: lit 1 AIN 200 > ; ⏎

  • Execute lit, it puts value 1 on data stack (FORTH's memory) if your room is bright enough, a value 0 otherwise.

lit
⇨ 1_ok

  • Define ?z that turns on red or blue depends on value on top of data stack.

: ?z IF red ELS blu THN ; ⏎

> ?z is our newly defined function. Unlike most of the other languages, you can create some really strange function names in FORTH.

  • Run ?z which read from top of data stack, if it's 1 then turns on red LED or 0 turns on blue. Try these

1 ?z
0 ?z

  • We now can turn on red or blue LED depend on lighting condition (try blocking the photoresister), lit leaves 1 or 0 on data stack, ?z takes the value and turns on the red or blue LED.

lit ?z

  • Define a word xyz to keep checking photoresister, turn the blue or red LED on depending on the photoresister value read until button hooked at pin 7 is pushed.

: xyz BGN lit ?z 7 IN UTL ; ⏎
xyz

> Try blocking the photoresister to see the LED toggles.
> Can this become a trigger i.e. mouse trap or something useful? Why not!

  • Let's list all nanoFORTH words available in its dictionary.

WRD ⏎

nanoFORTH words

> See the latest, they include xyz, ?z, xy, lit, blu, red that we've just created.

Behold! This is nanoFORTH in its entirety. It's a short list of 'words' which should be rather easy to master. Note that the steps illustrated above has been the way Forth programmers building their applications. One small word at a time. Debug each well interactively then combine them into a "bigger" word. If a bug found, FGT the word, redefine it. Next word!


OK! If the process shown above has captured the essence, we should have an idea of what nanoFORTH is trying to do. Let's just stop and contemplate for a while. We did all of the above without any recompilation. Instead, we "talked" directly with the nanoFORTH uploaded only once via the USB cable. Should you code these in C, how do you go about doing it?

The interactive nature is different from the way we are so used to on Arduino platform. Just consider how many times you have to compile your C code to go through the functions shown above. So, move forward, let's envision how we can control robots or what we can do using Bluetooth with our Nano...


Ready to give nanoFORTH a trial? or view References and all the details...

nanoforth's People

Contributors

chochain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nanoforth's Issues

Will this run on a Teensy?

I have a couple of Teensy 4.1 microcontroller units. They are supported by the Arduino IDE. Specs:

Teensy 4.1 Specs

  • 600 MHz Cortex-M7 processor (NXP iMXRT1062) ...
  • 8192 kB flash memory (64 kB reserved for recovery & EEPROM emulation) ...
  • 1024 kB RAM.
  • 6 pins available for 10/100 Mbit Ethernet.
  • Micro SD Socket soldered onto board.
  • 42 breadboard-friendly I/O (c.f. 24 on Teensy 4.0)
  • 2 USB ports (1 soldered)

Will nanoForth run on it? It shows up as an available library in the IDE, but I haven't tried to run it yet.

compilation errors in Arduino IDE

I opened nanoforth.ino and also installed the library nanoFORTH 1.2.6. When compiling, I'm getting errors:

`Arduino: 1.8.19 (Mac OS X), Board: "Arduino Nano, ATmega328P"

/private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/hardware -hardware /Users/kuku/Library/Arduino15/packages -tools /private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/tools-builder -tools /private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/kuku/Library/Arduino15/packages -built-in-libraries /private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/libraries -libraries /Users/kuku/Documents/Arduino/libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=0000_0000 -ide-version=10819 -build-path /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454 -warnings=none -build-cache /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_cache_782701 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.avr-gcc.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -verbose /Users/kuku/Downloads/nanoFORTH/nanoforth.ino
/private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/hardware -hardware /Users/kuku/Library/Arduino15/packages -tools /private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/tools-builder -tools /private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/kuku/Library/Arduino15/packages -built-in-libraries /private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/libraries -libraries /Users/kuku/Documents/Arduino/libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=0000_0000 -ide-version=10819 -build-path /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454 -warnings=none -build-cache /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_cache_782701 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.avr-gcc.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/kuku/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -verbose /Users/kuku/Downloads/nanoFORTH/nanoforth.ino
Using board 'nano' from platform in folder: /Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5
Using core 'arduino' from platform in folder: /Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5
Detecting libraries used...
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/nanoforth.ino.cpp -o /dev/null
Alternatives for nanoforth.h: [[email protected]]
ResolveLibrary(nanoforth.h)
-> candidates: [[email protected]]
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/nanoforth.ino.cpp -o /dev/null
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp -o /dev/null
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp -o /dev/null
Alternatives for EEPROM.h: [[email protected]]
ResolveLibrary(EEPROM.h)
-> candidates: [[email protected]]
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp -o /dev/null
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp -o /dev/null
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp -o /dev/null
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /Users/kuku/Documents/Arduino/libraries/nanoFORTH/src/nanoforth.cpp -o /dev/null
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /Users/kuku/Documents/Arduino/libraries/nanoFORTH/src/nanoforth_asm.cpp -o /dev/null
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /Users/kuku/Documents/Arduino/libraries/nanoFORTH/src/nanoforth_core.cpp -o /dev/null
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /Users/kuku/Documents/Arduino/libraries/nanoFORTH/src/nanoforth_vm.cpp -o /dev/null
WARNUNG: Bibliothek nanoFORTH behauptet auf Arduino Nano, Arduino UNO Architektur(en) ausgeführt werden zu können und ist möglicherweise inkompatibel mit Ihrem derzeitigen Board, welches auf avr Architektur(en) ausgeführt wird.
Generating function prototypes...
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/nanoforth.ino.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/preproc/ctags_target_for_gcc_minus_e.cpp
/private/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/AppTranslocation/1652DCF3-8EDF-462A-8992-D4CAE7AA428E/d/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/preproc/ctags_target_for_gcc_minus_e.cpp
Sketch wird kompiliert...
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/nanoforth.ino.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/nanoforth.ino.cpp.o
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp.o
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o
Compiling libraries...
Compiling library "nanoFORTH"
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /Users/kuku/Documents/Arduino/libraries/nanoFORTH/src/nanoforth.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth.cpp.o
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /Users/kuku/Documents/Arduino/libraries/nanoFORTH/src/nanoforth_vm.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /Users/kuku/Documents/Arduino/libraries/nanoFORTH/src/nanoforth_core.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/eightanaloginputs -I/Users/kuku/Documents/Arduino/libraries/nanoFORTH/src -I/Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM/src /Users/kuku/Documents/Arduino/libraries/nanoFORTH/src/nanoforth_asm.cpp -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o
Compiling library "EEPROM"
Compiling core...
Using precompiled core: /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_cache_782701/core/core_arduino_avr_nano_cpu_atmega328_dd47504da76f8417a1c1b2a241a202f5.a
Linking everything together...
/Users/kuku/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/nanoforth.ino.elf /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/nanoforth.ino.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o /var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/../arduino_cache_782701/core/core_arduino_avr_nano_cpu_atmega328_dd47504da76f8417a1c1b2a241a202f5.a -L/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454 -lm
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth.cpp.o (symbol from plugin): In function NanoForth::begin(Stream&, unsigned char, unsigned int, unsigned int)': (.text+0x0): multiple definition of NanoForth::begin(Stream&, unsigned char, unsigned int, unsigned int)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth.cpp.o (symbol from plugin): In function NanoForth::begin(Stream&, unsigned char, unsigned int, unsigned int)': (.text+0x0): multiple definition of NanoForth::add(void ()(n4_task))'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth.cpp.o (symbol from plugin): In function NanoForth::begin(Stream&, unsigned char, unsigned int, unsigned int)': (.text+0x0): multiple definition of NanoForth::_n4tsk'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth.cpp.o (symbol from plugin): In function NanoForth::begin(Stream&, unsigned char, unsigned int, unsigned int)': (.text+0x0): multiple definition of NanoForth::yield()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth.cpp.o (symbol from plugin): In function NanoForth::begin(Stream&, unsigned char, unsigned int, unsigned int)': (.text+0x0): multiple definition of NanoForth::exec()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth.cpp.o (symbol from plugin): In function NanoForth::begin(Stream&, unsigned char, unsigned int, unsigned int)': (.text+0x0): multiple definition of NanoForth::wait(unsigned long)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::reset()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::N4Asm(unsigned char*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::N4Asm(unsigned char*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::query(unsigned char*, unsigned int*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::parse_token(unsigned char*, unsigned int*, unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::forget()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::trace(unsigned int, unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::variable()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::constant(int)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::compile(unsigned int*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::_list_voc()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_asm.cpp.o (symbol from plugin): In function N4Asm::reset()': (.text+0x0): multiple definition of N4Asm::words()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_asm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::_io'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::set_io(Stream*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::set_trace(unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::_trc'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::set_ucase(unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::_ucase'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::uc(char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::is_tracing()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::key()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_chr(char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_num(int)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_str(unsigned char*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_nib(unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_adr(unsigned int)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_ptr(unsigned char*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_u8(unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_mem(unsigned char*, unsigned char*, unsigned int, unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::d_name(unsigned char, char const*, unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::number(unsigned char*, int*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::_empty'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::find(unsigned char*, char const*, unsigned int*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_core.cpp.o (symbol from plugin): In function N4Core::_io': (.text+0x0): multiple definition of N4Core::_console_input(unsigned char*)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_core.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::meminfo()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::_init()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::N4VM(Stream&, unsigned char, unsigned char*, unsigned int, unsigned int)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::N4VM(Stream&, unsigned char, unsigned char*, unsigned int, unsigned int)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::_ok()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::_primitive(unsigned char)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::_execute(unsigned int)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::_dump(unsigned int, unsigned int)'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/libraries/nanoFORTH/nanoforth_vm.cpp.o (symbol from plugin): In function N4VM::meminfo()': (.text+0x0): multiple definition of N4VM::step()'
/var/folders/kc/5p61t70n0llbn05934gj4r_w0000gn/T/arduino_build_993454/sketch/src/nanoforth_vm.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
Bibliothek nanoFORTH in Version 1.2.6 im Ordner: /Users/kuku/Documents/Arduino/libraries/nanoFORTH wird verwendet
Bibliothek EEPROM in Version 2.0 im Ordner: /Users/kuku/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/libraries/EEPROM wird verwendet
exit status 1
Fehler beim Kompilieren für das Board Arduino Nano.
`

Is there a reason for preferring signed right-shifts over unsigned?

Currently, right-shifting is defined like so:

_X(17, TOS >>= POP()); // RSH

#define POP() (*vm.sp++) /**< pop value off parameter stack */

S16 *sp { 0 }; ///< top of data stack

In effect, this makes the emitted right-shift arithmetic.

I believe the logical shift is the one we're more likely to need, and the one that's defined by the standard. If arithmetic shift is needed for whatever reason, it isn't difficult to define in terms of a logical one.

The change to allow for this would be minimal:

_X(17,
    S16 a = POP();
    TOS = static_cast<U16>(TOS) >> a; 
);

An alternative would be to define both RSH and ASR

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.