Maintenance notice: These forum archives are read-only, and will be removed shortly. Please visit our forums at their new location, https://www.evilmadscientist.com/forums/.

Problem trying to compile and upload V2 firmware on Alpha Clock Five

edited December 2012 in Clock Kits
Hello all,

I have a one year old Alpha Clock Five (wife got it for me last Christmas) that has the original V1 firmware on it. Since I bought a second clock to give as a present this year, this motivated me to update the firmware on my unit to the new V2. I have followed the directions in the wiki to the best of my ability but when I try to verify the new firmware sketch I get the following error:

core.a(main.cpp.o): In function `main':
/Applications/Arduino.app/Contents/Resources/Java/hardware/sanguino/cores/arduino/main.cpp:11: undefined reference to `setup'
/Applications/Arduino.app/Contents/Resources/Java/hardware/sanguino/cores/arduino/main.cpp:14: undefined reference to `loop'

I am running Mac OS X Lion. I downloaded the Arduino IDE version 1.01 (I used the exact version in the wiki rather than the newer 1.03) and installed the Time library and the Sanguino extensions. I made the necessary change in the boards.txt mentioned in the wiki in terms of the baud rate. I am obviously missing something but am scratching my head. Any assistance would be appreciated.

A few extra tidbits...in the firmware wiki entry the link to the forums points to the old archived forums, not the new one. The instructions also stop short of actually indicating the proper way of loading the firmware from Github into a sketch within the Arduino IDE. I just copied and pasted the raw version into the editor.  

Comments

  • I must apologize; that description for how to upload the firmware was utterly terrible; it was more applicable to the v1 firmware than to the current process.  I've updated it to say rather explicitly what you need to do.  First, install the Alpha Clock Five library for Arduino, and then open up the example file from the menu to upload it. 

    Please give that a try, according to the newly updated instructions, and let me know if you have any additional trouble.
  • Hi Windell,

    No apologies necessary. If that is the worst that happens life is good :-)

    I did try again using the revised instructions on the Wiki and got further but still failed. I added the Alpha Five library (as that seemed to be the missing component from before) and opened up the appropriate sketch. This time when I went to verify and compile, I got these errors:

    Alpha_20_ino.cpp: In function 'void checkButtons()':
    Alpha_20_ino:272: error: 'minute' was not declared in this scope
    Alpha_20_ino:273: error: 'hour' was not declared in this scope
    Alpha_20_ino:361: error: 'adjustTime' was not declared in this scope
    Alpha_20_ino:365: error: 'RTC' was not declared in this scope
    Alpha_20_ino:365: error: 'now' was not declared in this scope
    Alpha_20_ino:369: error: 'adjustTime' was not declared in this scope
    Alpha_20_ino:372: error: 'RTC' was not declared in this scope
    Alpha_20_ino:372: error: 'now' was not declared in this scope
    Alpha_20_ino:379: error: 'adjustTime' was not declared in this scope
    Alpha_20_ino:383: error: 'RTC' was not declared in this scope
    Alpha_20_ino:383: error: 'now' was not declared in this scope
    Alpha_20_ino:387: error: 'adjustTime' was not declared in this scope
    Alpha_20_ino:391: error: 'RTC' was not declared in this scope
    Alpha_20_ino:391: error: 'now' was not declared in this scope
    Alpha_20_ino:521: error: 'RTC' was not declared in this scope
    Alpha_20_ino:521: error: 'now' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void EndVCRmode()':
    Alpha_20_ino:928: error: 'now' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void setup()':
    Alpha_20_ino:951: error: 'RTC' was not declared in this scope
    Alpha_20_ino:951: error: 'setSyncProvider' was not declared in this scope
    Alpha_20_ino:952: error: 'timeStatus' was not declared in this scope
    Alpha_20_ino:952: error: 'timeSet' was not declared in this scope
    Alpha_20_ino:967: error: 'setTime' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void loop()':
    Alpha_20_ino:1073: error: 'second' was not declared in this scope
    Alpha_20_ino:1128: error: 'hour' was not declared in this scope
    Alpha_20_ino:1129: error: 'minute' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void processSerialMessage()':
    Alpha_20_ino:1221: error: 'time_t' was not declared in this scope
    Alpha_20_ino:1221: error: expected `;' before 'pctime'
    Alpha_20_ino:1225: error: 'pctime' was not declared in this scope
    Alpha_20_ino:1228: error: 'pctime' was not declared in this scope
    Alpha_20_ino:1228: error: 'setTime' was not declared in this scope
    Alpha_20_ino:1234: error: 'RTC' was not declared in this scope
    Alpha_20_ino:1234: error: 'now' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void UpdateDisplay(byte)':
    Alpha_20_ino:1676: error: 'adjustTime' was not declared in this scope
    Alpha_20_ino:1678: error: 'RTC' was not declared in this scope
    Alpha_20_ino:1678: error: 'now' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void AdjDayMonthYear(int8_t, int8_t, int8_t)':
    Alpha_20_ino:1766: error: 'year' was not declared in this scope
    Alpha_20_ino:1767: error: 'hour' was not declared in this scope
    Alpha_20_ino:1767: error: 'minute' was not declared in this scope
    Alpha_20_ino:1767: error: 'second' was not declared in this scope
    Alpha_20_ino:1767: error: 'day' was not declared in this scope
    Alpha_20_ino:1767: error: 'month' was not declared in this scope
    Alpha_20_ino:1767: error: 'setTime' was not declared in this scope
    Alpha_20_ino:1769: error: 'RTC' was not declared in this scope
    Alpha_20_ino:1769: error: 'now' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void TimeDisplay(byte, byte)':
    Alpha_20_ino:1783: error: 'second' was not declared in this scope
    Alpha_20_ino:1804: error: 'hour' was not declared in this scope
    Alpha_20_ino:1830: error: 'minute' was not declared in this scope
    Alpha_20_ino:1972: error: 'day' was not declared in this scope
    Alpha_20_ino:1974: error: 'month' was not declared in this scope
    Alpha_20_ino:2001: error: 'year' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void SerialPrintTime()':
    Alpha_20_ino:2088: error: 'hour' was not declared in this scope
    Alpha_20_ino:2089: error: 'minute' was not declared in this scope
    Alpha_20_ino:2090: error: 'second' was not declared in this scope
    Alpha_20_ino:2092: error: 'weekday' was not declared in this scope
    Alpha_20_ino:2092: error: 'dayStr' was not declared in this scope
    Alpha_20_ino:2094: error: 'day' was not declared in this scope
    Alpha_20_ino:2096: error: 'month' was not declared in this scope
    Alpha_20_ino:2096: error: 'monthShortStr' was not declared in this scope
    Alpha_20_ino:2098: error: 'year' was not declared in this scope
    Alpha_20_ino.cpp: In function 'void EESaveSettings()':
    Alpha_20_ino:2265: error: 'RTC' was not declared in this scope
    Alpha_20_ino:2265: error: 'now' was not declared in this scope

    After the failure I thought perhaps I needed to actually import the Time and Alpha Five libraries once the sketch was loaded before compiling. I tried that and the same errors occur. Sorry to be a bother but am I still just missing something simple?
  • edited January 2013
    It sounds like you do not have the Time library installed correctly. If I remove the Time library from its correct location, I get that same set of errors. 

    Your "libraries" folder should contain folders called "Time" and "alphafive," and you should restart Arduino (close and reopen the program) after double-checking this. Both should show up in the Sketch > Import Library menu, and you should not import either.
  • Okay, I rebooted into Windows to try again. I repeated the same steps and everything worked properly. I must have messed something up originally. Firmware is now updated successfully. Thanks for the help and for the great product.
  • Hooray!  And, *thank you* for pointing out that the directions were not clear.  (Hopefully, it will be a better experience for the next person to come this way.)
Sign In or Register to comment.