"recipe.c.o.pattern is missing" on compile

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
jemenake
Posts: 15
Joined: 01 Mar 2020 20:50

"recipe.c.o.pattern is missing" on compile

Post by jemenake »

Platform details:
I've tried this on:
- Intel MacBook Pro w/ Big Sur and Arduino 1.8.?.
- M1 Mac Mini w/ Big Sur 11.4 and Arduino 1.8.15
- M1 Mac Mini w/ Big Sur 11.4 and Arduino IDE 2.0.0-beta7

When I try to compile a sketch that had worked for me on my MacBook Pro in January, I now get a compiler error reporting "recipe.c.o.pattern pattern is missing"

I think I've tracked this down to $HOME/Library/Arduino15/packages/Z-Uno-hardware/zw8051/2.1.7/platform.txt having nothing for that key:

Code: Select all

recipe.c.o.pattern=
while $HOME/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/platform.txt has something more interesting like:

Code: Select all

recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "{source_file}" -o "{object_file}"
Figuring that something got messed up in one of the recent revisions, I've tried the following versions of the Z-Uno library:
2.1.7 - "recipe.c.o.pattern pattern is missing"
2.1.6 - "recipe.c.o.pattern pattern is missing"
2.1.5 - "Bad CPU type in executablePreprocessor"
2.1.4 - "Bad CPU type in executablePreprocessor"
2.1.3 - "Bad CPU type in executablePreprocessor"
2.1.1 - "Bad CPU type in executablePreprocessor"
2.0.5 - "recipe.preproc.macros pattern is missing"

I am able to compile something with

Code: Select all

"$HOME/Library/Arduino15/packages/Z-Uno/tools/zuno_toolchain/00.08.82/zuno_toolchain/compiler build $HOME/the_sketch.ino -r $HOME/Library/Arduino15/packages/Z-Uno/hardware/zw8051/2.1.7 -p $HOME/Library/Arduino15/packages/Z-Uno/tools/zuno_toolchain/00.08.82/zuno_toolchain/sdcc"
but it's unclear how to upload the object/binary after that.

Commenting out the "recipe.c.o.pattern=" line in platform.txt gave the same error.
Assigning some dummy program (like "recipe.c.o.pattern=/bin/echo") allows the compilation to think that it succeeded, and I can upload the sketch, but I just get a blinking LED, which I'm figuring is a fail-over default sketch when the uploaded sketch doesn't have the right format.

This is very disappointing, as I had been planning on making a YouTube video about how to make interesting Z-Wave devices with the Z-Uno, but, as things stand now, I can't do anything with it.
jemenake
Posts: 15
Joined: 01 Mar 2020 20:50

Re: "recipe.c.o.pattern is missing" on compile

Post by jemenake »

Confirming that this also happens with Debian Linux 10 x64 with Arduino 1.8.15 and Arduino 1.8.14.
jemenake
Posts: 15
Joined: 01 Mar 2020 20:50

Re: "recipe.c.o.pattern is missing" on compile

Post by jemenake »

Also confirming that this happens on Windows 10 with Arduino 1.8.15... even with the basic switch example sketch that comes with the Z-Uno library.
jemenake
Posts: 15
Joined: 01 Mar 2020 20:50

Re: "recipe.c.o.pattern is missing" on compile

Post by jemenake »

I was able to solve this by just copying the recipe.cpp.o.pattern to recipe.c.o.pattern:

Code: Select all

recipe.c.o.pattern="{runtime.tools.zuno_toolchain.path}/zuno_toolchain/compiler" dummy -t "{source_file}"
reubenb
Posts: 3
Joined: 20 Oct 2021 05:57

Re: "recipe.c.o.pattern is missing" on compile

Post by reubenb »

This was really helpful, but took me a little bit to work out what you meant.

For anyone else that might come across this, to fix this issue:

Edit the platforms.txt file for Z-uno here: "~/Library/Arduino15/packages/Z-Uno/hardware/zw8051/2.1.7/platforms.txt"

Copy the variable set in recipe.cpp.o.pattern to be the same for recipe.c.o.pattern
Post Reply