"make" fails. /bin/sh: sdcc: command not found

Hi have just installed the wixel SDK on fedora 19 as well as sdcc. When I try “make” (from the wixel-sdk directory) I get the following result:

$ make Compiling apps/wireless_adc_tx/wireless_adc_tx.rel /bin/sh: sdcc: command not found make: *** [apps/wireless_adc_tx/wireless_adc_tx.rel] Error 127
I even tried sudo make. No diff.

There are several scripts in /bin in the form sdcc-foo no sdcc by itself.

Has anybody else had this problem?
Does anybody know the solution?

Gordie.

Hello, Gordie.

The Wixel SDK Makefile expects there to be an executable named “sdcc” on the path and that is what you are supposed to get when you install SDCC, as far as I know. How did you install SDCC? What version did you install? What are those sdcc-* scripts in /bin?

If you have a suitable executable on your system that behaves like main sdcc compiler but happens to have a different name, you have a few options to get things working. Any one of these should work:

[ul]
[li]Make a symbolic link from /bin/sdcc to the executable.[/li]
[li]Edit the line at the top of the Wixel SDK Makefile that sets CC; set it to the path of the executable.[/li]
[li]When you run the Wixel’s Makefile, set the CC environment variable to the path of the executable.[/li][/ul]

–David

Hi David,

I installed it using Apper (the default fedora 19 KDE app manager, I believe) version 3.2.0-3.fc19
How do I check the path?
The script names aresdcc-as2gbmap sdcc-makebin sdcc-packihx sdcc-s51 sdcc-savr sdcc-sdar sdcc-sdas6808 sdcc-sdas8051 sdcc-sdasgb sdcc-sdasrab sdcc-sdasz80 sdcc-sdcc sdcc-sdcclib ...
sdcc-as2gbmap contains#!/bin/sh PATH=/usr/libexec/sdcc:$PATH /usr/libexec/sdcc/as2gbmap "$@"
sdcc-sdcc contains#!/bin/sh PATH=/usr/libexec/sdcc:$PATH /usr/libexec/sdcc/sdcc "$@"
There is an executable called sdcc in /usr/libexec/sdcc/ as well as ones matching all the otherssdcc]$ ls -1 as2gbmap makebin packihx s51 savr sdar sdas6808 sdas8051 sdasgb sdasrab sdasz80 sdcc sdcclib ...…except as2gbmap. That’s a python script.

Should I point the wixel SDK makefile there or, perhaps, add a script in /bin called sdcc? (A copy of sdcc-sdcc?)
Or modify the makefile so it adds ‘sdcc-’ in front of the current name? (Not sure how to do that, the makefile seems a bit cryptic to me.)

Sorry, I’m a bit of a user. I was a raging computer geek in highschool but carreer-wise have always been skirting computer science (PLCs, CNC programming, etc.) I have recently gotten into microcontrollers but Arduino is pretty hand-holdy so I have no experience with tool chain use or configuration. While I’m on the subject, could you recomend a good C tutorial or is just the same as the Arduino language?

Thanks in advance,
Gordie.

Hello, Gordie.

The Wixel Makefile can be pretty cryptic but it should be easy to modify the CC variable to point at the right thing. I recommend you find the line very close to the top of the Makefile that says:

CC := sdcc# C compiler: creates object files (.rel) from C files (.c)

And simply change it to:

CC := sdcc-sdcc

That seems like the easiest option to me, but another option would probably be to add /usr/libexec/sdcc to your PATH.

There is not really an “Arduino language” because the Arduino IDE basically just uses a C++ compiler and adds a few little things to make C++ easier to use. C is pretty much a subset of C++.

–David