CANBusTriple Compiling Error
  • 0
  • Hi guys!

    I received my CANBusTriple yesterday, and now I'm trying to follow "Getting Started", but when I click "Build and Upload" button, I get this:

    In file included from C:\Users\elieser.leao\Documents\Arduino\hardware\CANBus-Triple\avr\cores\arduino/Arduino.h:28:0,
    from C:\Users\elieser.leao\Documents\Arduino\hardware\CANBus-Triple\avr\libraries\SPI/SPI.h:17,
    from CANBusTriple.ino:9:
    SerialCommand.h: In member function 'void SerialCommand::printSystemDebug()':
    C:\Users\elieser.leao\Documents\Arduino\hardware\CANBus-Triple\avr\cores\arduino/WString.h:38:74: error: initializer fails to determine size of '__c'
    #define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
    ^
    SerialCommand.h:461:23: note: in expansion of macro 'F'
    activeSerial->print(F("{"event":"version", "name":""+String(BUILDNAME)+
    ^
    C:\Users\elieser.leao\Documents\Arduino\hardware\CANBus-Triple\avr\cores\arduino/WString.h:38:74: error: array must be initialized with a brace-enclosed initializer
    #define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
    ^
    SerialCommand.h:461:23: note: in expansion of macro 'F'
    activeSerial->print(F("{"event":"version", "name":""+String(BUILDNAME)+
    ^
    Error compiling.

    How to solve?

    Thanks.

  • 0
  • Actually I found a solution that worked for me.

    I changed the code from:

    <pre><code> activeSerial->print(F("{"event":"version", "name":""+String(BUILDNAME)+
    #ifdef BUILD_VERSION
    "", "version":""+String(BUILD_VERSION)+
    #endif
    "", "memory":""));</code></pre>

    to:

    <pre><code> activeSerial->print(F("{"event":"version", "name":""));
    activeSerial->print(String(BUILDNAME));
    #ifdef BUILD_VERSION
    activeSerial->print(F("", "version":""));
    activeSerial->print(String(BUILD_VERSION));
    #endif
    activeSerial->print(F("", "memory":""));</code></pre>

  • 0
  • Good you found a solution but it shouldn't be necessary to alter the code. What I did: download the Github programm from GitHub and cloned the program to my computer. It has to be in the document/arguino/hardware folder. Select the CanbusTriple from the boards list and the CanbusTriple sketch from the above folder.

    Compile and upload to CanbusTriple. That worked for me.

  • 0
  • Hi,
    I also do have a compile error while trying the Arduino IDE (1.6) method, but not the same:

    src\CANBus.cpp.o: In function CANBus::CANBus(int, int, unsigned int, String)': C:\Program Files (x86)\Arduino\hardware\CANBus-Triple-master\avr\libraries\SPI/SPI.h:217: multiple definition ofCANBus::CANBus(int, int, unsigned int, String)'
    CANBus\CANBus.cpp.o:C:\Program Files (x86)\Arduino\hardware\CANBus-Triple-master\avr\libraries\CANBus\src/CANBus.cpp:14: first defined here

    I guess the CLONE method, uses another source...

  • 0
  • Updates to the github repository do not automatically create new distribution archives.
    Thus, those may be out-of-date

  • 0
  • ok. How do I get the last stable version ?
    I tried the XLoader to manager the .hex files, with no luck.
    The Avrdude procedure seems complicated.
    I can manage Arduino IDE, if I can get the last distribution archive.

  • 0
  • Hi Folks,
    I finally get a Done Compiling message in Arduino IDE.
    Sorry bothering you.

  • 0
  • administrators

    Ah! Good news! No bother, that is what the forum is for.

  • 0
  • After downloading the latest build today, getting this error when try to compile.

    In file included from CANBusTriple.ino:30:0:
    AutoBaud.h: In static member function 'static int AutoBaud::baudDetect(byte, Stream*)':
    AutoBaud.h:66:28: error: 'MERRF' was not declared in this scope
    byte merrf = canintf & MERRF;

  • 0
  • @KidTurbo‌ - you need to grab the CanBus library that came with the latest build and update the library files in your Arduino working folder.

  • 0
  • Yeah that did it. Downloaded everything as zip and replaced all library files. All is well.
    Sorry guys, not used to whole git thing.... Wanta wirelessly link your car to a network on the other side of the globe, I'm your guy... lol

  • 0
  • Hi Guys,

    I got this error when verifying the CANBUS Triple scketch:

    Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Leonardo"

    CANBusTriple.ino:11:20: fatal error: CANBus.h: No such file or directory
    compilation terminated.
    Error compiling.

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.

    Please help,
    Thanks

  • 0
  • Ok, I found the instruction from this link for Arduino: 1.6.5:
    http://forum.canb.us/discussion/211/collect2-error#latest

  • 13
    Posts
  • 3002
    Views
  • Log in to reply