Error when Compiling - Broken Pipe

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
oddvarness
Posts: 1
Joined: 08 Jan 2017 18:57

Error when Compiling - Broken Pipe

Post by oddvarness »

Hi All,

I'm trying to make a simple sketch for 4 binary outputs (triggering relays) and 4 binary inputs. I'm not sure what I do wrong, but I get the below error when compiling. I use Arduino 1.6.5, use AVRISP II programmer. I've also attached my code at the end if it can be of any help. Hope somewone can point me in the right direction.

Error:

Code: Select all

C:\Users\Oddvar\AppData\Roaming\Arduino15\packages\Z-Uno\tools\zuno_toolchain\00.08.20/zuno_toolchain/compiler build C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp/ZUnoHDL.cpp -r C:\Users\Oddvar\AppData\Roaming\Arduino15\packages\Z-Uno\hardware\zw8051\2.0.7 

	************* Building Arduino Sketch *************
	C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp/ZUnoHDL.cpp
	***************************************************

Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\Print.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\Print_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\Stream.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\Stream_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\HardwareSerial.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\HardwareSerial_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\HLCore.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\HLCore_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\_ZUnoHDL.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\_ZUnoHDL_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\Print.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\Print_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\Stream.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\Stream_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\HardwareSerial.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\HardwareSerial_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\HLCore.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\HLCore_sdcpp_.cpp ...
Preprocessing file: C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\_ZUnoHDL.cpp with SDCPP... 
Compiling C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\_ZUnoHDL_sdcpp_.cpp ...Compiling file "C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\LLCore_arduino.c" by means of SDCC...
sdcc: Calling preprocessor...
sdcc: sdcpp.exe -nostdinc -Wall -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_5_0 -DSDCC=350 -D__SDCC_REVISION=9253 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem "C:\Users\Oddvar\AppData\Roaming\ARDUIN~1\packages\Z-Uno\tools\ZUNO_T~1\0008~1.20\ZUNO_T~1/sdcc/\bin\..\include\mcs51" -isystem "C:\Users\Oddvar\AppData\Roaming\ARDUIN~1\packages\Z-Uno\tools\ZUNO_T~1\0008~1.20\ZUNO_T~1/sdcc/\bin\..\include"  "C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\LLCore_arduino.c" 
sdcc: Generating code...
sdcpp.exe: fatal error: when writing output to : Broken pipe
C:\Users\Oddvar\AppData\Local\Temp\build8136507042314739747.tmp\/Custom.h:16: syntax error: token -> ',' ; column 746
Error. SDCC returned: 1

Error compiling.
Sketch based on the 10 channel example:

Code: Select all

/*
 * This scretch was certified by the Z-Wave Alliance as one of the two reference Z-Uno sketches.
 *
 * 4 Binary Outputs
 * 4 Binary Inputs
 */

// Pins definitions
#define Din1 9
#define Din2 10
#define Din3 11
#define Din4 12
#define Dout1 13
#define Dout2 14
#define Dout3 15
#define Dout4 16

#define SWITCH_ON 0xff
#define SWITCH_OFF 0

// Global variables to store data reported via getters
byte lastDinValue1 = 0;
byte lastDinValue2 = 0;
byte lastDinValue3 = 0;
byte lastDinValue4 = 0;
byte lastDoutValue1 = 0;
byte lastDoutValue2 = 0;
byte lastDoutValue3 = 0;
byte lastDoutValue4 = 0;


ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE);

ZUNO_SETUP_ASSOCIATIONS(ZUNO_ASSOCIATION_GROUP_SET_VALUE); // Send Basic Set to association group

// Set up 10 channels
ZUNO_SETUP_CHANNELS(
  ZUNO_SENSOR_BINARY_GENERAL_PURPOSE (getterDin1),
  ZUNO_SENSOR_BINARY_GENERAL_PURPOSE (getterDin2),
  ZUNO_SENSOR_BINARY_GENERAL_PURPOSE (getterDin3),
  ZUNO_SENSOR_BINARY_GENERAL_PURPOSE (getterDin4),
  ZUNO_SWITCH_BINARY(getterDout1, setterDout1),
  ZUNO_SWITCH_BINARY(getterDout2, setterDout2),
  ZUNO_SWITCH_BINARY(getterDout3, setterDout3),
  ZUNO_SWITCH_BINARY(getterDout4, setterDout4),
);

void setup()
{
  pinMode(Din1, INPUT_PULLUP);
  pinMode(Din2, INPUT_PULLUP);
  pinMode(Din3, INPUT_PULLUP);
  pinMode(Din4, INPUT_PULLUP);
  pinMode(Dout1, OUTPUT);
  pinMode(Dout2, OUTPUT);
  pinMode(Dout3, OUTPUT);
  pinMode(Dout4, OUTPUT);
}

void loop()
{
  byte currentDinValue1;
  byte currentDinValue2;
  byte currentDinValue3;
  byte currentDinValue4;

  //Binary Input 1
  currentDinValue1 = digitalRead(Din1);
  if (currentDinValue1 != lastDinValue1)
  {
    lastDinValue1 = currentDinValue1;
    zunoSendReport(1);
  }

  //Binary Input 2
  currentDinValue2 = digitalRead(Din2);
  if (currentDinValue2 != lastDinValue2)
  {
    lastDinValue2 = currentDinValue2;
    zunoSendReport(2);
  }

  //Binary Input 3
  currentDinValue3 = digitalRead(Din3);
  if (currentDinValue3 != lastDinValue3)
  {
    lastDinValue3 = currentDinValue3;
    zunoSendReport(3);
  }

  //Binary Input 4
  currentDinValue4 = digitalRead(Din4);
  if (currentDinValue4 != lastDinValue4)
  {
    lastDinValue4 = currentDinValue4;
    zunoSendReport(4);
  }
}

// Getters and setters

byte getterDin1(void)
{
  return lastDinValue1 ? 0xff : 0;
}

byte getterDin2(void)
{
  return lastDinValue2 ? 0xff : 0;
}

byte getterDin3(void)
{
  return lastDinValue3 ? 0xff : 0;
}

byte getterDin4(void)
{
  return lastDinValue4 ? 0xff : 0;
}

void setterDout1(byte value)
{
  digitalWrite(Dout1, (value > 0) ? HIGH : LOW);
  lastDoutValue1 = value;
}

byte getterDout1()
{
  return lastDoutValue1;
}

void setterDout2(byte value)
{
  digitalWrite(Dout2, (value > 0) ? HIGH : LOW);
  lastDoutValue2 = value;
}

byte getterDout2()
{
  return lastDoutValue2;
}

void setterDout3(byte value)
{
  digitalWrite(Dout3, (value > 0) ? HIGH : LOW);
  lastDoutValue3 = value;
}

byte getterDout3()
{
  return lastDoutValue3;
}

void setterDout4(byte value)
{
  digitalWrite(Dout4, (value > 0) ? HIGH : LOW);
  lastDoutValue4 = value;
}

byte getterDout4()
{
  return lastDoutValue4;
}
User avatar
PoltoS
Posts: 7579
Joined: 26 Jan 2011 19:36

Re: Error when Compiling - Broken Pipe

Post by PoltoS »

Please remove the last "," in ZUNO_SETUP_CHANNELS
Post Reply