Week 7: Embedded Programming
This week, we learned about embedded programming by programming the simple board with an ATTiny44 microcontroller that we made a few weeks ago.
I began by compiling the make code for the basic code for “Hello World”:
make -f hello.ftdi.44.echo.c.make
My computer responded by throwing an error saying I needed to install avr-gcc. I tried installing it from ladyada.net. While it installed, it was not located in my $PATH. After troubleshooting this install, I then went back to installing it via Homebrew. Tomer Weller has some great instructions on how to do this here. Phew, the make code compiled.
I started with programming the basic code for “Hello World”, which at first did not work using my FabISP. So I switched to the AVRISP2 programmer.
Links for basic code: hello.ftdi.44.echo.c hello.ftdi.44.echo.c.make
I programmed the fuses using the command:
sudo make -f hello.ftdi.44.echo.c.make program-avrisp2-fuses
Note the change from usbtiny to avrisp2.
This worked! Onto the next step, I then prgrammed the board.
sudo make -f hello.ftdi.44.echo.c.make program-avrisp2
This gave me a weird timing error. So I tried re-flowing the solder around the resonator on my board. After doing this, I tried this command again. This time it worked great!
Next, I tried running the term.py code. It did not communicate with my board. I then tried it via screen. This also did not communicate with my board.
I re-flowed the entire board, and tried re-programming it, but this did not help. I also tried the blinky light code, but that would not compile on my board. After way too much time, I decided to give up.
Thanks to Tomer Weller and Dan Novy for all their help this week!