Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

Another Ice Tube Clock Design for the Holidays
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Another Ice Tube Clock Design for the Holidays

by nix_clk_dd on Sun Jul 21, 2019 5:00 pm

Parts finally arrived after a few being backordered!
Group photo :-)

Image

nix_clk_dd
 
Posts: 37
Joined: Tue May 21, 2019 2:15 pm

Re: Another Ice Tube Clock Design for the Holidays

by jarchie on Sun Jul 21, 2019 9:14 pm

Those parts sure do look inviting... It makes me want to build another one of these. ;-)

Happy hacking!

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Another Ice Tube Clock Design for the Holidays

by nix_clk_dd on Mon Jul 22, 2019 12:35 am

jarchie wrote:Those parts sure do look inviting... It makes me want to build another one of these. ;-)

Happy hacking!


Having fun so far! I just stopped after installing the ATmega328p in the socket and the necessary software...if I have time tomorrow I will learn the flashing part.
Do you have the components for another clock?

nix_clk_dd
 
Posts: 37
Joined: Tue May 21, 2019 2:15 pm

Re: Another Ice Tube Clock Design for the Holidays

by jarchie on Mon Jul 22, 2019 1:54 am

nix_clk_dd wrote:Having fun so far! I just stopped after installing the ATmega328p in the socket and the necessary software...if I have time tomorrow I will learn the flashing part.

Excellent! The Wiki tutorial (Windows, MacOS) and firmware/README should be decent guides, even for a first-time programmer. But I'm happy to help if you run into trouble.

nix_clk_dd wrote:Do you have the components for another clock?

I think I have most of the parts, but might need to order a few. Anyway, it's been a while since I've done an electronics project, and I'd forgotten how much fun it is. Thank you and jsandlin for reminding me.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Another Ice Tube Clock Design for the Holidays

by nix_clk_dd on Mon Jul 22, 2019 5:29 pm

jarchie wrote:
nix_clk_dd wrote:Having fun so far! I just stopped after installing the ATmega328p in the socket and the necessary software...if I have time tomorrow I will learn the flashing part.

Excellent! The Wiki tutorial (Windows, MacOS) and firmware/README should be decent guides, even for a first-time programmer. But I'm happy to help if you run into trouble.

nix_clk_dd wrote:Do you have the components for another clock?

I think I have most of the parts, but might need to order a few. Anyway, it's been a while since I've done an electronics project, and I'd forgotten how much fun it is. Thank you and jsandlin for reminding me.


I can send you a set of the black PCBs that I had printed if you would like!
OK, here is my 1st attempt at compiling the code. I used the command documented here and received all kinds of errors.
The Makefile is unmodified and I made a couple edits to config.h (BDAY_ALARM_MONTH, BDAY_ALARM_DAY, GPS_TIMEKEEPING, GPS_LOST_ERROR_MSG).
The files that the command creates:
temp.d
gps.d
gps.o
usart.d
mode.d
buttons.d
display.d
piezo.d
alarm.d
time.d
system.d
icetube.d


Terminal:
Code: Select all | TOGGLE FULL SIZE
$ make
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o icetube.o icetube.c
In file included from icetube.c:19:
/opt/local/lib/gcc/avr/9.1.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
make: *** [icetube.o] Error 1
MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o icetube.o icetube.c
In file included from icetube.c:19:
/opt/local/lib/gcc/avr/9.1.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  icetube.c > icetube.d
MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o system.o system.c
system.c:18:10: fatal error: avr/interrupt.h: No such file or directory
   18 | #include <avr/interrupt.h> // for enabling and disabling interrupts
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  system.c > system.d
./util.pl time | xargs avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o time.o time.c
./util.pl time | xargs avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  time.c > time.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o alarm.o alarm.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  alarm.c > alarm.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o piezo.o piezo.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  piezo.c > piezo.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o display.o display.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  display.c > display.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o buttons.o buttons.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=800000MacBook-Pro--Os -Wall -DF_CPU=8000000  system.c > system.datmega328p -std=gnu99 
MacBook-Pro-2:firmware rbadm$ ./util.pl time | xargs avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o time.o time.c
time.c:7:10: fatal error: avr/eeprom.h: No such file or directory
    7 | #include <avr/eeprom.h>   // for storing data in eeprom memory
      |          ^~~~~~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ ./util.pl time | xargs avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  time.c > time.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o alarm.o alarm.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  alarm.c > alarm.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o piezo.o piezo.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  piezo.c > piezo.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o display.o display.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  display.c > display.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o buttons.o buttons.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  buttons.c > buttons.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o mode.o mode.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  mode.c > mode.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o usart.o usart.c
avr-gcc -MM -I. -mmcu=MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=aOs -Wall -DF_CPU=8000000  -o alarm.o alarm.c
alarm.c:7:10: fatal error: avr/io.h: No such file or directory
    7 | #include <avr/io.h>           // for using avr register names
      |          ^~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  alarm.c > alarm.d
MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o piezo.o piezo.c
piezo.c:9:10: fatal error: avr/io.h: No such file or directory
    9 | #include <avr/io.h>       // for using avr register names
      |          ^~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  piezo.c > piezo.d
MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o display.o display.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  display.c > display.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o buttons.o buttons.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  buttons.c > buttons.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o mode.o mode.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  mode.c > mode.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o usart.o usart.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  usart.c > usart.d
./util.pl time | xargs avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o gps.o gps.c
./util.pl time | xargs avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  gps.c > gps.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o temp.o temp.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  temp.c >display.c:30:10: fatal error: avr/io.h: No such file or directory
   30 | #include <avr/io.h>       // for using avr register names
      |          ^~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  display.c > display.d
MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o buttons.o buttons.c
buttons.c:16:10: fatal error: avr/io.h: No such file or directory
   16 | #include <avr/io.h>  // for using avr register names
      |          ^~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  buttons.c > buttons.d
MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o mode.o mode.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  mode.c > mode.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o usart.o usart.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  usart.c > usart.d
./util.pl time | xargs avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o gps.o gps.c
./util.pl time | xargs avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  gps.c > gps.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o temp.o temp.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  temp.c > temp.d
avr-gcc -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o icetube.elf icetube.o system.o time.o alarm.o piezo.o display.o buttons.o mode.o usart.o gps.o temp.o
avr-objcopy  -R.eeprom -R.fuse -R.lock -O ihex icetube.elf icetube_flash.hex
avr-objcopy  --change-section-lma .eeprom=0 -j .eeprom -O ihex icetube.elf icetube_eeprom.hex
avr-objcopy  -j.mode.c:8:10: fatal error: avr/pgmspace.h: No such file or directory
    8 | #include <avr/pgmspace.h> // for defining program memory strings with PSTR()
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  mode.c > mode.d
MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o usart.o usart.c
usart.c:8:10: fatal error: avr/io.h: No such file or directory
    8 | #include <avr/io.h>     // for using register names
      |          ^~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  usart.c > usart.d
MacBook-Pro-2:firmware rbadm$ ./util.pl time | xargs avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o gps.o gps.c
./util.pl time | xargs avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  gps.c > gps.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o temp.o temp.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  temp.c > temp.d
avr-gcc -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o icetube.elf icetube.o system.o time.o alarm.o piezo.o display.o buttons.o mode.o usart.o gps.o temp.o
avr-objcopy  -R.eeprom -R.fuse -R.lock -O ihex icetube.elf icetube_flash.hex
avr-objcopy  --change-section-lma .eeprom=0 -j .eeprom -O ihex icetube.elf icetube_eeprom.hex
avr-objcopy  -j.fuse -O ihex icetube.elf icetube_fuse.hex
avr-objcopy  -j.lock -O ihex icetube.elf icetube_lock.hexMacBook-Pro-2:firmware =atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  gps.c > gps.d
MacBook-Pro-2:firmware rbadm$ avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o temp.o temp.c
temp.c:10:10: fatal error: avr/io.h: No such file or directory
   10 | #include <avr/io.h>
      |          ^~~~~~~~~~
compilation terminated.
MacBook-Pro-2:firmware rbadm$ avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  temp.c > temp.d
MacBook-Pro-2:firmware rbadm$ avr-gcc -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o icetube.elf icetube.o system.o time.o alarm.o piezo.o display.o buttons.o mode.o usart.o gps.o temp.o
avr-gcc: error: icetube.o: No such file or directory
avr-gcc: error: system.o: No such file or directory
avr-gcc: error: time.o: No such file or directory
avr-gcc: error: alarm.o: No such file or directory
avr-gcc: error: piezo.o: No such file or directory
avr-gcc: error: display.o: No such file or directory
avr-gcc: error: buttons.o: No such file or directory
avr-gcc: error: mode.o: No such file or directory
avr-gcc: error: usart.o: No such file or directory
avr-gcc: error: temp.o: No such file or directory
MacBook-Pro-2:firmware rbadm$ avr-objcopy  -R.eeprom -R.fuse -R.lock -O ihex icetube.elf icetube_flash.hex
avr-objcopy: 'icetube.elf': No such file
MacBook-Pro-2:firmware rbadm$ avr-objcopy  --change-section-lma .eeprom=0 -j .eeprom -O ihex icetube.elf icetube_eeprom.hex
avr-objcopy: 'icetube.elf': No such file
avr-objcopy: --change-section-lma .eeprom=0x0000000000000000 never used
MacBook-Pro-2:firmware rbadm$ avr-objcopy  -j.fuse -O ihex icetube.elf icetube_fuse.hex
avr-objcopy: 'icetube.elf': No such file
MacBook-Pro-2:firmware rbadm$ avr-objcopy  -j.lock -O ihex icetube.elf icetube_lock.hex

nix_clk_dd
 
Posts: 37
Joined: Tue May 21, 2019 2:15 pm

Re: Another Ice Tube Clock Design for the Holidays

by jarchie on Mon Jul 22, 2019 9:55 pm

nix_clk_dd wrote:I can send you a set of the black PCBs that I had printed if you would like!

I still have a few of the boards from OSH Park, which should be okay. But I thank you for the very kind offer.

nix_clk_dd wrote:OK, here is my 1st attempt at compiling the code. I used the command documented here and received all kinds of errors.

It looks like some of the required header files are missing. Did you install CrossPack for the AVR tools? It gives working versions of avr-gcc, avr-libc, and others. If you've already installed it, try setting the PATH variable to use it before doing the "make".

Code: Select all | TOGGLE FULL SIZE
$ export PATH=/usr/local/CrossPack-AVR/bin:$PATH
$ make

One of the error messages mentioned avr-gcc version 9.1.0 and the latest version of CrossPack comes with version 4.8.1. Do you know where you obtained 9.1.0? I'd be curious if I can replicate the error on my system.

nix_clk_dd wrote:The Makefile is unmodified and I made a couple edits to config.h (BDAY_ALARM_MONTH, BDAY_ALARM_DAY, GPS_TIMEKEEPING, GPS_LOST_ERROR_MSG).

There are a number of changes to config.h required for the xmas redesign. The default values in the firmware/config.h are for the now discontinued Adafruit clock. The easiest way to get everything set up for the xmas redesign is to copy the hardware/config.h into the firmware/ directory.

By the way, the GPS stuff is only enabled by default because it does not cause problems if you don't have a GPS. But removing this feature will make the code smaller and eliminate a useless menu option for setting the time zone. That menu option is only applicable for setting time from the GPS.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Another Ice Tube Clock Design for the Holidays

by nix_clk_dd on Mon Jul 22, 2019 11:27 pm

jarchie wrote:
nix_clk_dd wrote:OK, here is my 1st attempt at compiling the code. I used the command documented here and received all kinds of errors.

It looks like some of the required header files are missing. Did you install CrossPack for the AVR tools? It gives working versions of avr-gcc, avr-libc, and others. If you've already installed it, try setting the PATH variable to use it before doing the "make".


Code: Select all | TOGGLE FULL SIZE
$ export PATH=/usr/local/CrossPack-AVR/bin:$PATH
$ make

One of the error messages mentioned avr-gcc version 9.1.0 and the latest version of CrossPack comes with version 4.8.1. Do you know where you obtained 9.1.0? I'd be curious if I can replicate the error on my system.

As a reminder, I really don't know what I'm doing (yet). lol :)
I used MacPorts and ran the commands to install "sudo port install avr-gcc" and avrdude.
Would you suggest that I install CrossPack AVR 20131216 instead?


jarchie wrote:
nix_clk_dd wrote:The Makefile is unmodified and I made a couple edits to config.h (BDAY_ALARM_MONTH, BDAY_ALARM_DAY, GPS_TIMEKEEPING, GPS_LOST_ERROR_MSG).

There are a number of changes to config.h required for the xmas redesign. The default values in the firmware/config.h are for the now discontinued Adafruit clock. The easiest way to get everything set up for the xmas redesign is to copy the hardware/config.h into the firmware/ directory.

By the way, the GPS stuff is only enabled by default because it does not cause problems if you don't have a GPS. But removing this feature will make the code smaller and eliminate a useless menu option for setting the time zone. That menu option is only applicable for setting time from the GPS.

I'm sorry, I should have been more clear.
I made these edits to the compile.h file located in ../hardware/ so all of the xmas redesign features are already enabled.
Thanks for the info regarding the GPS settings. I guess I will leave it disabled for now any maybe try to program some kind of text output once I get the hang of things. Might also look into enabling GPS in the future but I haven't seen very many cheap options for GPS.

Thanks!

EDIT:
I completely removed MacPorts and Xcode and installed the latest version of CrossPack.
Starting with a "make" command gave me an error that Xcode is not installed, but it was easily fixed with the "export PATH" command you supplied.

New output:
Code: Select all | TOGGLE FULL SIZE
MacBook-Pro-2:firmware rbadm$ export PATH=/usr/local/CrossPack-AVR/bin:$PATH
MacBook-Pro-2:firmware rbadm$ make
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o icetube.o icetube.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  icetube.c > icetube.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o system.o system.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  system.c > system.d
./util.pl time | xargs avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o time.o time.c
./util.pl time | xargs avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  time.c > time.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o alarm.o alarm.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  alarm.c > alarm.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o piezo.o piezo.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  piezo.c > piezo.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o display.o display.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  display.c > display.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o buttons.o buttons.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  buttons.c > buttons.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o mode.o mode.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  mode.c > mode.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o usart.o usart.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  usart.c > usart.d
./util.pl time | xargs avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o gps.o gps.c
./util.pl time | xargs avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  gps.c > gps.d
avr-gcc -c -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o temp.o temp.c
avr-gcc -MM -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  temp.c > temp.d
avr-gcc -I. -mmcu=atmega328p -std=gnu99 -Os -Wall -DF_CPU=8000000  -o icetube.elf icetube.o system.o time.o alarm.o piezo.o display.o buttons.o mode.o usart.o gps.o temp.o
avr-objcopy  -R.eeprom -R.fuse -R.lock -O ihex icetube.elf icetube_flash.hex
avr-objcopy  --change-section-lma .eeprom=0 -j .eeprom -O ihex icetube.elf icetube_eeprom.hex
avr-objcopy  -j.fuse -O ihex icetube.elf icetube_fuse.hex
avr-objcopy  -j.lock -O ihex icetube.elf icetube_lock.hex

ATMEGA328P/ATMEGA328 MEMORY USAGE SUMMARY

Program memory (FLASH):   83%    (27406/32768)
Preallocated SRAM:         9%    (  202/ 2048)
Allocated EEPROM:          6%    (   63/ 1024)

nix_clk_dd
 
Posts: 37
Joined: Tue May 21, 2019 2:15 pm

Re: Another Ice Tube Clock Design for the Holidays

by jarchie on Mon Jul 22, 2019 11:53 pm

nix_clk_dd wrote:I used MacPorts and ran the commands to install "sudo port install avr-gcc" and avrdude.
Would you suggest that I install CrossPack AVR 20131216 instead?

I would recommend it. Even though it's a bit old (2013), CrossPack provides everything you need to build and install the xmas firmware. A fair number of people have used it successfully, and it's what I'm still using on my Mac.

But I'll check out the MacPorts setup to see what the problem might be there. It could be that the package is broken, failed to install a required dependency, or something like that. I'll get back to you.

nix_clk_dd wrote:I'm sorry, I should have been more clear. I made these edits to the compile.h file located in ../hardware/ so all of the xmas redesign features are already enabled.

I thought that might be the case but just wanted to make sure. :-)

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Another Ice Tube Clock Design for the Holidays

by nix_clk_dd on Mon Jul 22, 2019 11:59 pm

jarchie wrote:
nix_clk_dd wrote:I used MacPorts and ran the commands to install "sudo port install avr-gcc" and avrdude.
Would you suggest that I install CrossPack AVR 20131216 instead?

I would recommend it. Even though it's a bit old (2013), CrossPack provides everything you need to build and install the xmas firmware. A fair number of people have used it successfully, and it's what I'm still using on my Mac.

But I'll check out the MacPorts setup to see what the problem might be there. It could be that the package is broken, failed to install a required dependency, or something like that. I'll get back to you.

nix_clk_dd wrote:I'm sorry, I should have been more clear. I made these edits to the compile.h file located in ../hardware/ so all of the xmas redesign features are already enabled.

I thought that might be the case but just wanted to make sure. :-)


Thanks for the quick reply! Check the edit to my previous post, I think that installing CrossPack solved the problem :)

nix_clk_dd
 
Posts: 37
Joined: Tue May 21, 2019 2:15 pm

Re: Another Ice Tube Clock Design for the Holidays

by jarchie on Tue Jul 23, 2019 1:23 am

Excellent! I'm glad you got compilation working.

In case you're curious, I think the problem with MacPorts was that you also needed the "avr-libc" package. If I recall correctly, this used to be installed automatically with the avr-gcc package, but apparently not anymore. I got the same compilation error that you did, and a "port install avr-libc" fixed it. Also, the newer version of avrdude required that fuses be programmed differently, so for programming to work, I needed change FUSE_OPT macro line in the Makefile to "FUSE_OPT ?= nostrip". So it looks like MacPorts could have been made to work, as it is working for me.

But I've done more testing with CrossPack than MacPorts, so I recommend sticking with CrossPack even though it's an older version of the tools. And the Makefile should work without modification.

Anyway, I just noticed that MacPorts is suggested in the firmware/README file, so I've changed that to CrossPack, which is what I recommended in the MacOS Wiki tutorial. Apologies if it was the firmware/README that led you down the MacPorts road.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Another Ice Tube Clock Design for the Holidays

by nix_clk_dd on Tue Jul 23, 2019 2:51 pm

jarchie wrote:Excellent! I'm glad you got compilation working.

In case you're curious, I think the problem with MacPorts was that you also needed the "avr-libc" package. If I recall correctly, this used to be installed automatically with the avr-gcc package, but apparently not anymore. I got the same compilation error that you did, and a "port install avr-libc" fixed it. Also, the newer version of avrdude required that fuses be programmed differently, so for programming to work, I needed change FUSE_OPT macro line in the Makefile to "FUSE_OPT ?= nostrip". So it looks like MacPorts could have been made to work, as it is working for me.

But I've done more testing with CrossPack than MacPorts, so I recommend sticking with CrossPack even though it's an older version of the tools. And the Makefile should work without modification.

Anyway, I just noticed that MacPorts is suggested in the firmware/README file, so I've changed that to CrossPack, which is what I recommended in the MacOS Wiki tutorial. Apologies if it was the firmware/README that led you down the MacPorts road.


Flashing the chip is done and beeps once when it gets power. :)
Before I continue, what are the correct test points for the step:
"Connect the 9v adaptor and verify that the boost circuit indeed provides 50-60 volts"?
When I test on GND and Vreg I get a reading of 5VDC or 10.4VAC - surely I'm missing something.

Image

nix_clk_dd
 
Posts: 37
Joined: Tue May 21, 2019 2:15 pm

Re: Another Ice Tube Clock Design for the Holidays

by jarchie on Tue Jul 23, 2019 3:51 pm

nix_clk_dd wrote:Before I continue, what are the correct test points for the step: "Connect the 9v adaptor and verify that the boost circuit indeed provides 50-60 volts"? When I test on GND and Vreg I get a reading of 5VDC or 10.4VAC - surely I'm missing something.

(Step 5) One easy place to make the measurement is across D5, the Zener diode. One side is attached to ground, the other is attached to the output of the boost circuit. This is a DC measurement.

jarchie
 
Posts: 595
Joined: Sun Jun 24, 2012 2:16 pm
Location: Santa Cruz, California, United States

Re: Another Ice Tube Clock Design for the Holidays

by adafruit_support_bill on Tue Jul 23, 2019 4:07 pm

Nice looking build so far! Great to see the Ice Tube kit taking on a life of its own.

Thanks as always jarchie for generously sharing your expertise with these clocks.

adafruit_support_bill
 
Posts: 77838
Joined: Sat Feb 07, 2009 10:11 am

Re: Another Ice Tube Clock Design for the Holidays

by nix_clk_dd on Tue Jul 23, 2019 4:11 pm

jarchie wrote:
nix_clk_dd wrote:Before I continue, what are the correct test points for the step: "Connect the 9v adaptor and verify that the boost circuit indeed provides 50-60 volts"? When I test on GND and Vreg I get a reading of 5VDC or 10.4VAC - surely I'm missing something.

(Step 5) One easy place to make the measurement is across D5, the Zener diode. One side is attached to ground, the other is attached to the output of the boost circuit. This is a DC measurement.

Thanks! It's within the range at ~ 56.8V :)
Maybe this is more of an advanced question, but how would I determine the test points by looking at the schematic?
Just making some guesses: +9V is the input and +UB is the output? So the test points would be between D3/D5 and some other spot? Why does C5 or C6 not come into play?

adafruit_support_bill wrote:Nice looking build so far! Great to see the Ice Tube kit taking on a life of its own.
Thanks as always jarchie for generously sharing your expertise with these clocks.

Thank you. I really appreciate the help from everyone here!

nix_clk_dd
 
Posts: 37
Joined: Tue May 21, 2019 2:15 pm

Re: Another Ice Tube Clock Design for the Holidays

by adafruit_support_bill on Tue Jul 23, 2019 4:40 pm

C5, C6 and D5 are all connected between UB and GND. I suspect jarchie just suggested the two ends of D5 because those points are easy to find on the top of the board.

The original tutorial had you measure between the ground tab of the voltage regulator and the cathode (striped end) of D3.
https://learn.adafruit.com/ice-tube-clo ... ep-1163330

adafruit_support_bill
 
Posts: 77838
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.