Anyone loaded the base firmware yet?
  • 0
  • I'm getting an error message trying to upload the code. Anyone else?

  • 0
  • It took some work, but I got it to flash and run OK. I am able to change program code at will now and observe changes via the LEDs, but I haven't tried CAN yet. I am able to connect CBT Bluetooth to my iPhone using the Lightblue app too, but I want to work towards an iOS app ASAP. What is your error message?

  • 0
  • Yes, I too cannot get any version to compile, I'm getting:
    <code>Arduino: 1.0.6 + Td: 1.20 (Linux), Board: "Arduino Leonardo"
    /home/linux/Devel/arduino-1.0.6/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DARDUINO=106 -I/home/linux/Devel/arduino-1.0.6/hardware/arduino/cores/arduino -I/home/linux/Devel/arduino-1.0.6/hardware/arduino/variants/leonardo -I/home/linux/Devel/arduino-1.0.6/libraries/SPI -I/home/linux/Devel/arduino-1.0.6/libraries/EEPROM -I/home/linux/Devel/arduino-1.0.6/libraries/CANBus/src -I/home/linux/Devel/arduino-1.0.6/libraries/QueueArray /tmp/build640169446550871912.tmp/CANBusTriple.cpp -o /tmp/build640169446550871912.tmp/CANBusTriple.cpp.o
    CANBusTriple:18: error: ‘CAN1SELECT’ was not declared in this scope
    CANBusTriple:18: error: ‘CAN1RESET’ was not declared in this scope
    CANBusTriple:19: error: ‘CAN2SELECT’ was not declared in this scope
    CANBusTriple:19: error: ‘CAN2RESET’ was not declared in this scope
    CANBusTriple:20: error: ‘CAN3SELECT’ was not declared in this scope
    CANBusTriple:20: error: ‘CAN3RESET’ was not declared in this scope
    In file included from CANBusTriple.ino:23:
    Settings.h: In static member function ‘static void Settings::firstbootSetup()’:
    Settings.h:184: warning: only initialized variables can be placed into program memory area
    Settings.h:188: error: ‘BOOT_LED’ was not declared in this scope
    In file included from ChannelSwap.h:2,
    from CANBusTriple.ino:24:
    Middleware.h: In member function ‘virtual Message Middleware::process(Message)’:
    Middleware.h:16: warning: no return statement in function returning non-void
    In file included from CANBusTriple.ino:25:
    SerialCommand.h: In member function ‘void SerialCommand::printMessageToSerial(Message)’:
    SerialCommand.h:202: warning: comparison between signed and unsigned integer expressions
    SerialCommand.h:203: warning: comparison between signed and unsigned integer expressions
    SerialCommand.h: In member function ‘void SerialCommand::settingsCall()’:
    SerialCommand.h:274: warning: unused variable ‘bytesRead’
    SerialCommand.h: In member function ‘void SerialCommand::setBluetoothFilter()’:
    SerialCommand.h:307: warning: unused variable ‘bytesRead’
    SerialCommand.h: In member function ‘void SerialCommand::getAndSaveEeprom()’:
    SerialCommand.h:364: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:366: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:370: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:374: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:376: warning: only initialized variables can be placed into program memory area
    SerialCommand.h: In member function ‘void SerialCommand::getAndSend()’:
    SerialCommand.h:387: warning: unused variable ‘bytesRead’
    SerialCommand.h: In member function ‘void SerialCommand::bluetooth()’:
    SerialCommand.h:422: error: ‘BOOT_LED’ was not declared in this scope
    SerialCommand.h:412: warning: unused variable ‘bytesRead’
    SerialCommand.h: In member function ‘int SerialCommand::getCommandBody(byte*, int)’:
    SerialCommand.h:444: warning: comparison between signed and unsigned integer expressions
    SerialCommand.h: In member function ‘void SerialCommand::printSystemDebug()’:
    SerialCommand.h:461: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:463: warning: only initialized variables can be placed into program memory area
    SerialCommand.h: In member function ‘void SerialCommand::printChannelDebug(CANBus)’:
    SerialCommand.h:479: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:481: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:483: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:485: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:487: warning: only initialized variables can be placed into program memory area
    SerialCommand.h:489: warning: only initialized variables can be placed into program memory area
    In file included from CANBusTriple.ino:26:
    ServiceCall.h: In member function ‘virtual Message ServiceCall::process(Message)’:
    ServiceCall.h:63: warning: comparison between signed and unsigned integer expressions
    In file included from CANBusTriple.ino:27:
    Naptime.h: In member function ‘virtual void Naptime::tick()’:
    Naptime.h:65: error: ‘BT_SLEEP’ was not declared in this scope
    Naptime.h:80: error: ‘BOOT_LED’ was not declared in this scope
    Naptime.h:169: error: ‘BOOT_LED’ was not declared in this scope
    CANBusTriple.ino: In function ‘void setup()’:
    CANBusTriple:76: error: ‘BT_SLEEP’ was not declared in this scope
    CANBusTriple:83: error: ‘BOOT_LED’ was not declared in this scope
    CANBusTriple:86: error: ‘CAN1INT_D’ was not declared in this scope
    CANBusTriple:87: error: ‘CAN2INT_D’ was not declared in this scope
    CANBusTriple:88: error: ‘CAN3INT_D’ was not declared in this scope
    CANBusTriple:89: error: ‘CAN1RESET’ was not declared in this scope
    CANBusTriple:90: error: ‘CAN2RESET’ was not declared in this scope
    CANBusTriple:91: error: ‘CAN3RESET’ was not declared in this scope
    CANBusTriple:92: error: ‘CAN1SELECT’ was not declared in this scope
    CANBusTriple:93: error: ‘CAN2SELECT’ was not declared in this scope
    CANBusTriple:94: error: ‘CAN3SELECT’ was not declared in this scope
    CANBusTriple.ino: In function ‘void loop()’:
    CANBusTriple:165: error: ‘CAN1INT_D’ was not declared in this scope
    CANBusTriple:166: error: ‘CAN2INT_D’ was not declared in this scope
    CANBusTriple:167: error: ‘CAN3INT_D’ was not declared in this scope
    CANBusTriple.ino: In function ‘boolean sendMessage(Message, CANBus)’:
    CANBusTriple:208: error: ‘BOOT_LED’ was not declared in this scope</code>

    I tried adding all the libs, still no dice, What am I overlooking?

  • 0
  • Well, after some digging, I'm overlooking the definitions in the file <code> pins_arduino.h</code>.

    I could not figure out how to include this, as it's got an <code>ifndef</code> that prevents it from redefining, so I just pasted this block from there at the top of the main sketch:

    <code>// CANBus Triple Rev F
    #define BOOT_LED 13
    #define BT_SLEEP 8

    #define CAN1INT 0
    #define CAN1INT_D 3
    #define CAN1SELECT 9
    #define CAN1RESET 4

    #define CAN2INT 1
    #define CAN2INT_D 2
    #define CAN2SELECT 10
    #define CAN2RESET 12

    #define CAN3INT 4
    #define CAN3INT_D 7
    #define CAN3SELECT 5
    #define CAN3RESET 11
    </code>
    Probably not the "right" way to do it, but I shouldn't have to screw around like this to get it to compile out-of-the-box.

  • 0
  • Oh... you're using Linux. I used Arduino 1.6.0 with Windows XP and it worked as prescribed here:
    http://canb.us/getting-started
    and here
    http://docs.canb.us/firmware/main.html

  • 0
  • Shouldn't matter between the two, strange.

  • 0
  • administrators

    That's weird, I'll look into it asap. Thanks Phil

  • 0
  • FWIW, we had the same issue compiling both on Windows and OS X, with the 1.6 Arduino IDE. We couldn't get the base firmware to compile unless we copied those pin definitions into the main Arduino code.

  • 0
  • I haven't encountered ANY problem compiling under the Arduino 1.6 IDE on Mac OS X 10.10 (Yosemite)
    Are you sure that you are using 1.6 and not 1.0.6? Did you restart the IDE after installing the hardware files?

  • 0
  • @Phil,

    Clearly, from the output that you posted above, you are using the older version of the IDE. Upgrade to the latest version and I think that you will have better results.

  • 0
  • Thanks Wacky, I guess I screwed up with my decimals! 1.0.6 != 1.6

  • 0
  • I'm getting same errors as @Phil‌ on my Arduino IDE v1.6.0. I'm on Windows 8.1 x64

  • 0
  • Figured out what caused my error. Solved creating a "hardware" subfolder in my Arduino sketchbook folder and putting CANBus-Triple folder into it. Then in the Arduino IDE I selected "CANBus Triple" from "Tools" -> "Board".
    Previously I had selected "Arduino Leonardo" as board, and "CANBus Triple" was not in the list.

    Now I've proposed a pull request to update http://docs.canb.us/firmware/main.html document, to reflect correct procedure described in https://canb.us/getting-started.

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

  • 0
  • This is still a issue; got mine today and having a little trouble.

    <blockquote>Arduino: 1.6.3 (Mac OS X), Board: "Arduino Leonardo"

    CANBusTriple.ino:24:16: error: 'CAN1SELECT' was not declared in this scope
    CANBusTriple.ino:24:28: error: 'CAN1RESET' was not declared in this scope
    CANBusTriple.ino:25:16: error: 'CAN2SELECT' was not declared in this scope
    CANBusTriple.ino:25:28: error: 'CAN2RESET' was not declared in this scope
    CANBusTriple.ino:26:16: error: 'CAN3SELECT' was not declared in this scope
    CANBusTriple.ino:26:28: error: 'CAN3RESET' was not declared in this scope
    In file included from CANBusTriple.ino:29:0:
    Settings.h: In static member function 'static void Settings::firstbootSetup()':
    Settings.h:203:19: error: 'BOOT_LED' was not declared in this scope
    digitalWrite( BOOT_LED, HIGH );
    ^
    In file included from CANBusTriple.ino:30:0:
    AutoBaud.h: In static member function 'static int AutoBaud::baudDetect(byte, Stream*)':
    AutoBaud.h:24:12: error: 'CAN1INT_D' was not declared in this scope
    io = CAN1INT_D;
    ^
    AutoBaud.h:27:12: error: 'CAN2INT_D' was not declared in this scope
    io = CAN2INT_D;
    ^
    AutoBaud.h:30:12: error: 'CAN3INT_D' was not declared in this scope
    io = CAN3INT_D;
    ^
    In file included from CANBusTriple.ino:31:0:
    SerialCommand.h: In member function 'void SerialCommand::bluetooth()':
    SerialCommand.h:445:20: error: 'BOOT_LED' was not declared in this scope
    digitalWrite(BOOT_LED, HIGH);
    ^
    In file included from CANBusTriple.ino:34:0:
    Naptime.h: In member function 'virtual void Naptime::tick()':
    Naptime.h:65:19: error: 'BT_SLEEP' was not declared in this scope
    digitalWrite( BT_SLEEP, LOW );
    ^
    Naptime.h:80:19: error: 'BOOT_LED' was not declared in this scope
    analogWrite(BOOT_LED, fade);
    ^
    Naptime.h:169:19: error: 'BOOT_LED' was not declared in this scope
    digitalWrite( BOOT_LED, LOW );
    ^
    CANBusTriple.ino: In function 'void setup()':
    CANBusTriple.ino:83:12: error: 'BT_SLEEP' was not declared in this scope
    CANBusTriple.ino:90:12: error: 'BOOT_LED' was not declared in this scope
    CANBusTriple.ino:93:12: error: 'CAN1INT_D' was not declared in this scope
    CANBusTriple.ino:94:12: error: 'CAN2INT_D' was not declared in this scope
    CANBusTriple.ino:95:12: error: 'CAN3INT_D' was not declared in this scope
    CANBusTriple.ino:96:12: error: 'CAN1RESET' was not declared in this scope
    CANBusTriple.ino:97:12: error: 'CAN2RESET' was not declared in this scope
    CANBusTriple.ino:98:12: error: 'CAN3RESET' was not declared in this scope
    CANBusTriple.ino:99:12: error: 'CAN1SELECT' was not declared in this scope
    CANBusTriple.ino:100:12: error: 'CAN2SELECT' was not declared in this scope
    CANBusTriple.ino:101:12: error: 'CAN3SELECT' was not declared in this scope
    CANBusTriple.ino: In function 'void loop()':
    CANBusTriple.ino:170:19: error: 'CAN1INT_D' was not declared in this scope
    CANBusTriple.ino:171:19: error: 'CAN2INT_D' was not declared in this scope
    CANBusTriple.ino:172:19: error: 'CAN3INT_D' was not declared in this scope
    CANBusTriple.ino: In function 'boolean sendMessage(Message, CANBus)':
    CANBusTriple.ino:210:17: error: 'BOOT_LED' was not declared in this scope
    Error compiling.

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

  • 16
    Posts
  • 3982
    Views
  • Log in to reply