Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Can't Compile Wixel SDK


#1

Hello,

I’m having a hard time trying to get the Wixel SDK compiled on my x64 Windows 8 machine. I’ve downloaded the Wixel Development Bundle 120127, and installed everything to the default directories. When I CD into C:/wixel-sdk, “make VERBOSE=true” yields the following output.

sdcc -c apps/example_blink_led/example_blink_led.c -Wp,-MD,apps/example_blink_le
d/example_blink_led.d,-MT,apps/example_blink_led/example_blink_led.rel,-MP  -Ili
braries/include -Wa,-p --model-medium --debug -o apps/example_blink_led/example_
blink_led.rel
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
at 1: warning 190: ISO C forbids an empty source file
make: *** [apps/example_blink_led/example_blink_led.rel] Error 1

This seems to be the same issue as this post here. Apparently this is a problem with SDCC, according to that post. The solution used by the OP in this case was to reinstall the OS, which I would really prefer not to do. Would anyone have a solution to this problem? Thanks.

Geoff


#2

Hello, Geoff.

I just tried to reproduce your problem by installing everything from the wixel-dev-bundle-121027.exe (except Notepad++ because I already had it) onto my Windows 8 64-bit machine. When I ran “make VERBOSE=true” everything built fine. It worked in the normal Windows Command Prompt and also in another shell, Git Bash.

The two error messages you are seeing make me think that SDCC is trying to invoke its preprocessor utility but that utility is not found. SDCC is not really handling the error correctly and thinks that the preprocessor just had an empty output, so it is warning that ISO C forbids an empty source file.

If you just want to start on your project, the quickest solution is probably to uninstall SDCC and then reinstall it in a path with no spaces (e.g. C:/SDCC).

However, if I were in your situation I would want to make a nice bug report to the SDCC developers so they can fix it. I have attached a minimal SDCC project that builds without any errors on my machine. It also uses the --verbose option so we can get more information. It has two sdcc invocations: a simple one and one more like what is happening in the Wixel SDK. You can get it here:

test_sdcc1.zip (343 Bytes)

If you download it, extract it, and run build.bat in a Command Prompt, does it work for you? Do both SDCC invocations work?

What happens if you use the latest SDCC release from their sourceforge download page (3.3.0)? It probably doesn’t matter if you install the 64-bit or the 32-bit version. What happens if you install the latest SDCC snapshot build?

–David


#3

Hi David,

Your quick-fix worked, thanks! I’ll get back to you in a few days with the results of the various tests you proposed, and submit a bug report.

Geoff


#4

Hi David,

I ran those tests you suggested. I tried to compile your code with SDCC 3.3.0 (32 bit), as well as the recent snapshot sdcc-snapshot-x86_64-w64-mingw32-20130807-8804. Both of these cases generated the same output:

C:\Users\Geoff\Desktop\Downloads\test_sdcc1\test_sdcc>build.bat

C:\Users\Geoff\Desktop\Downloads\test_sdcc1\test_sdcc>sdcc -c test.c -Wp,-MD,tes
t.d,-MT,test.rel,-MP -Wa,-p --model-medium --debug -o test.rel --verbose
sdcc: Calling preprocessor...
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
sdcc: Generating code...
at 1: warning 190: ISO C forbids an empty source file

C:\Users\Geoff\Desktop\Downloads\test_sdcc1\test_sdcc>sdcc -c test.c -o test.rel
 --verbose
sdcc: Calling preprocessor...
sdcc: Generating code...
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
at 1: warning 190: ISO C forbids an empty source file

I’ll submit a bug report soon. Hope this helps!

Geoff


#5

Great! We have reported several different bugs to the SDCC team in the past and they have fixed all of them so far, so they will probably fix this one too. --David


#6

A follow up to this, A year later and a fresh install and I hit the same snag again, deja voodoo.
I can confirm that installing SDCC to a path with no spaces fixed it I.E. C:\SDCC. The “feature” is still present in the latest 64bit snapshot build.

When I did the fresh install last year I recall putting SDCC directly in C as I was using it with eclipse at the time and it seemed like the path was the issue. :mrgreen:


#7

This is partly my fault - I only just submitted the bug report today, upon seeing your post. Up until now, my academic/research responsibilities rather took over any of my free time. Hopefully this will be resolved soon.

Geoff


#8

So I tried the recommended fix of uninstalling it and isntalling it to C:\SDCC and this did not fix the problem. Below is the error:

Compiling apps/io_repeater/io_repeater.rel 'sdcc' is not recognized as an internal or external command, operable program or batch file. make: *** [apps/io_repeater/io_repeater.rel] Error 1 You may now close this window.

Any ideas on how to fix this? This is happening when I try to compile the wixel SDK


#9

It just sounds like the SDCC compiler is not part of your PATH variable. Can you open a terminal and tell us what you get when you run this command?:

If C:\SDCC\bin is not listed as part of the output you get, you can add it by doing:

Let us know how that works.

Geoff


#10

I went and manually checked that it was set as a PATH variable, but I’ll give the commands a try. Here’s the output from echo:

D:\Programs\Pololu\Wixel\bin;C:\Program Files\Common Files\Microsoft Shared\Wind ows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Pr ogram Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\P rogramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System 32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lucidlogix Technologies\VIRTU;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C :\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Liv e\Shared;D:\Programs\Pololu\GNU Build Utilities;\bin;D:\Programs\Pololu\Wixel\bi n;

Also tried the set command and still get the following error:

Compiling apps/io_repeater/io_repeater.rel 'sdcc' is not recognized as an internal or external command, operable program or batch file. make: *** [apps/io_repeater/io_repeater.rel] Error 1 You may now close this window.

Yet I see it here as the PATH variable in the attached screen shot.


#11

Hello.

Although the PATH variable for your user does include “C:\SDCC\bin”, it looks like Windows is not using that value when you start a Command Prompt. Could you try rebooting to see if that causes the PATH variable for your user to take effect? If that does not help, you should try adding “C:\SDCC\bin” to the system-wide PATH variable. In the screenshot you posted, the system-wide environment variables are shown in the lower half, and you can edit them there. Be sure to separate the paths with a semicolon.

If none of that fixes the problem, then you could add Geoff’s command (set PATH=%PATH%;C:\SDCC\bin) to the top of make_all.bat and then try compiling the Wixel SDK by double-clicking make_all.bat.

–David


#12

ok So i put the set PATH=%PATH%;C:\SDCC\bin at the beginning of the batch file and ran it and here’s the output:

Compiling  apps/io_repeater/io_repeater.rel
Compiling  libraries/src/dma/dma.rel
Creating   libraries/lib/dma.lib
Compiling  libraries/src/radio_mac/radio_mac.rel
Creating   libraries/lib/radio_mac.lib
Compiling  libraries/src/radio_queue/radio_queue.rel
Creating   libraries/lib/radio_queue.lib
Compiling  libraries/src/radio_registers/radio_registers.rel
Creating   libraries/lib/radio_registers.lib
Compiling  libraries/src/random/random.rel
Compiling  libraries/src/random/random_from_sernum.rel
Compiling  libraries/src/random/random_from_adc.rel
Creating   libraries/lib/random.lib
Compiling  libraries/src/usb/green_led.rel
Compiling  libraries/src/usb/usb.rel
Creating   libraries/lib/usb.lib
Compiling  libraries/src/usb_cdc_acm/usb_cdc_acm.rel
libraries/src/usb_cdc_acm/usb_cdc_acm.c:355: error 98: conflict with previous de
finition of 'usbComRxReceive' for attribute 'type'
from type 'void function ( const-unsigned-char xdata* fixed, unsigned-char fixed
) fixed'
  to type 'void function ( unsigned-char xdata* fixed, unsigned-char fixed) fixe
d'
make: *** [libraries/src/usb_cdc_acm/usb_cdc_acm.rel] Error 1
You may now close this window.

Still getting an error and this is the SDK downloaded from the zip file on github that I’m trying to compile. The interesting this is I did the exact same thing for the xDrip app and it compiled with no errors which means it has to be something with the SDK right?

Compiling apps/dexdrip/dexdrip.rel Compiling libraries/src/usb_cdc_acm/usb_cdc_acm.rel Creating libraries/lib/usb_cdc_acm.lib Compiling libraries/src/usb/usb.rel Compiling libraries/src/usb/green_led.rel Creating libraries/lib/usb.lib Compiling libraries/src/radio_mac/radio_mac.rel Creating libraries/lib/radio_mac.lib Compiling libraries/src/radio_queue/radio_queue.rel Creating libraries/lib/radio_queue.lib Compiling libraries/src/radio_registers/radio_registers.rel Creating libraries/lib/radio_registers.lib Compiling libraries/src/wixel/board.rel Compiling libraries/src/wixel/sleep.rel Compiling libraries/src/wixel/time.rel Assembling libraries/src/wixel/fixed.rel Assembling libraries/src/wixel/delay.rel Creating libraries/lib/wixel.lib Compiling libraries/src/dma/dma.rel Creating libraries/lib/dma.lib cp libraries/src/uart/core/uart.c libraries/src/uart/uart0.c Compiling libraries/src/uart/uart0.rel cp libraries/src/uart/core/uart.c libraries/src/uart/uart1.c Compiling libraries/src/uart/uart1.rel Creating libraries/lib/uart.lib Compiling libraries/src/gpio/gpio.rel Creating libraries/lib/gpio.lib Compiling libraries/src/random/random.rel Compiling libraries/src/random/random_from_sernum.rel Compiling libraries/src/random/random_from_adc.rel Creating libraries/lib/random.lib Compiling libraries/src/adc/adc.rel Compiling libraries/src/adc/millivolts.rel Creating libraries/lib/adc.lib Linking apps/dexdrip/dexdrip.hex Packaging apps/dexdrip/dexdrip.wxl packihx: read 443 lines, wrote 837: OK. You may now close this window.


#13

Hello.

We fixed the usbComRxReceive problem a while ago but forgot to update the “latest” git tag, so Github was giving you an older version when you downloaded the ZIP file. It is fixed now. If you download the SDK again, using the “Download ZIP” button, it should work. (You’ll just have to add that line of code to make_all.bat again.)

–David