Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kousu/serlight
attiny13a Flashlight Firmware
https://github.com/kousu/serlight
Last synced: 9 days ago
JSON representation
attiny13a Flashlight Firmware
- Host: GitHub
- URL: https://github.com/kousu/serlight
- Owner: kousu
- License: gpl-3.0
- Created: 2015-03-09T05:55:30.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-09T06:49:15.000Z (almost 10 years ago)
- Last Synced: 2025-01-06T17:37:30.078Z (27 days ago)
- Language: C
- Size: 148 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
Serifus's Magical Dual-Mode AVR-controlled Flashlight
=====================================================Our starting point was Selene Scriven (@toykeeper)'s [GPL flashlight firmware](https://code.launchpad.net/~toykeeper/flashlight-firmware/).
Requirements
===========The avr toolchain:
```
sudo pacman -S avrdude avr-gcc avr-libc avr-binutils
```avr-gcc and friends is the cross-compiler. avrdude is for flashing the chip.
You might also want simavr and avr-gdb but that's up to you.
(and make sure you have make installed, of course)To test that you've gotten the toolchain working just use the Makefile:
```
[kousu@galleon serifuslight]$ make
avr-gcc -Wall -mmcu=attiny13 -std=c99 -g -Os -o serlight.o -c serlight.c
serlight.c: In function 'save':
serlight.c:212:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
eepos=(uint8_t*)cycle((uint16_t)eepos, EEPROM_SIZE);
^
serlight.c: At top level:
serlight.c:453:6: warning: return type of 'main' is not 'int' [-Wmain]
void main() { //returning void saves a couple bytes (it's not like there's anyone to return to)
^
avr-gcc -Wall -mmcu=attiny13 -std=c99 -g -Os -o serlight.elf serlight.o
avr-size -C --mcu=attiny13 serlight.elf
AVR Memory Usage
----------------
Device: attiny13Program: 942 bytes (92.0% Full)
(.text + .data + .bootloader)Data: 35 bytes (54.7% Full)
(.data + .bss + .noinit)avr-objcopy -O ihex serlight.elf serlight.hex
rm serlight.o serlight.elf
[kousu@galleon serifuslight]$
```If you see anything else you're probably missing a package or three.