Closed AnnyCaroline closed 6 years ago
The error occurs because ceu.lua
, called by Arduino Makefile, understands the first word as the value of --pre-input
option, and the second word as an option that it don't know. The following code was extracted from \repos\ceu-arduino\Makefile
. The file name is stored in CEU_SRC_
.
ceu:
$(CEU_EXE) --pre --pre-args="-include ./include/arduino/arduino.ceu -include ./libraries/arch-$(ARD_ARCH)/$(ARD_ARCH).ceu -I./include/ $(CEU_INCS) -include pm.ceu $(CEU_DEFS) -DCEUMAKER_ARDUINO -DARDUINO_ARCH_$(ARD_ARCH_UPPER) -DARDUINO_MCU_$(ARD_MCU_UPPER) -DARDUINO_BOARD_$(ARD_BOARD_UPPER) -DCEU_PM" \
--pre-input="$(CEU_SRC_)" \
--ceu --ceu-err-unused=pass --ceu-err-uninitialized=pass \
--ceu-line-directives=true \
--ceu-features-lua=false --ceu-features-thread=false \
--ceu-features-isr=static \
$(CEU_FEATURES) \
--env --env-types=env/types.h \
--env-output=env/_ceu_app.c.h
pre:
ceu --pre --pre-args="-include ./include/arduino/arduino.ceu -include ./libraries/arch-$(ARD_ARCH)/$(ARD_ARCH).ceu -I$(CEU_DIR)/include/ -I./include/ $(CEU_INCS) $(CEU_DEFS) -DCEUMAKER_ARDUINO -DARDUINO_ARCH_$(ARD_ARCH_UPPER) -DARDUINO_MCU_$(ARD_MCU_UPPER) -DARDUINO_BOARD_$(ARD_BOARD_UPPER)" --pre-input="$(CEU_SRC_)"
The solution is simply put CEU_SRC_
(in lines 3 and 13 from the above code) between quotation marks.
--pre-input="$(CEU_SRC_)"
The error is generated in \repos\pico-ceu\Makefile
.
all:
$(CEU_EXE) --pre --pre-args="-I$(CEU_DIR)/include -I$(CEU_SDL_DIR)/include -I./include $(D_SERIAL) $(D_POSIX) -DCEUMAKER_PICO -DCEU_SRC=$(CEU_SRC_) $(CEU_ARGS)" \
--pre-input=pico.ceu \
--ceu --ceu-err-unused=pass --ceu-err-uninitialized=pass --ceu-line-directives=false \
--ceu-features-trace=true --ceu-features-exception=true \
--ceu-features-dynamic=true \
--ceu-features-pool=true \
--ceu-features-pause=true \
--ceu-features-os=true \
--ceu-features-async=true \
--env --env-types=$(CEU_DIR)/env/types.h \
--env-threads=$(CEU_DIR)/env/threads.h \
--env-main=$(CEU_DIR)/env/main.c \
--cc --cc-args="$(CC_ARGS) -g -lm -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lSDL2_net -lSDL2_gfx" \
--cc-output="$(dir $(CEU_SRC_))/$(OUT_SUB)/tmp.exe"
$(CP_EXE) tiny.ttf "$(dir $(CEU_SRC_))/$(OUT_SUB)/"
cd "$(dir $(CEU_SRC_))/$(OUT_SUB)/" && "$(dir $(CEU_SRC_))/$(OUT_SUB)/tmp.exe"
The solution is:
CEU_SRC_
(in line 2 from the above code) between quotation marks;
-DCEUMAKER_PICO -DCEU_SRC=\"$(CEU_SRC_)\" $(CEU_ARGS)"
ifneq ("$(wildcard "$(CEU_SRC)/main.ceu")","")
CEU_SRC_ = $(CEU_SRC)/main.ceu
endif
else
$(error missing `CEU_SRC` path to compile)
make-pico.bat
and pass it to the Makefile:
..\..\mingw\bin\make -f Makefile CEU_SRC=%1 CEU_SRC_DIR="%CEU_DIR%
make-pico.bat
, was also necessary put %CEU_SRC_%
between quotation marks:
if exist "%CEU_SRC%"\main.ceu set CEU_SRC=%CEU_SRC%\main.ceu
\repos\pico-ceu\Makefile
were changed to:
--cc-output="$(CEU_SRC_DIR)/$(OUT_SUB)/tmp.exe"
$(CP_EXE) tiny.ttf "$(CEU_SRC_DIR)/$(OUT_SUB)/"
cd "$(CEU_SRC_DIR)/$(OUT_SUB)/" && "$(CEU_SRC_DIR)/$(OUT_SUB)/tmp.exe"
If \repos\pico-ceu\Makefile
is not called from make-pico.bat
:
ifndef CEU_SRC_DIR
CEU_SRC_DIR = $(dir $(CEU_SRC_))
endif
The pico-Céu and Céu-Arduino Makefiles are supporting file paths with white spaces, but ceu.lua
don't. This is not a priority for now, so we are closing the issue.
Message error produced when compiling
word1 word2 word3.ceu
fileusing pico-Céu.exe:
using Céu-Arduino.exe: