M-o-a-T / owslave

Master code for slave devices
GNU General Public License v3.0
18 stars 7 forks source link

Support for ATtiny84 #17

Open drtrigon opened 7 years ago

drtrigon commented 7 years ago

Here is my "project.cfg":

_include: world.cfg
env:
  prog: avrisp
devices:
  _default:
    _ref: defaults.target.t84
    types:
      _ref: defaults.types
    code: []
  try1:
    _doc: My very first 1wire slave device
    defs:
      is_onewire: ds2423
    onewire_id: x49ae6a524a39
targets:
- try1

I had to modify the "Makefile" as well:

$(AVRDUDE) -c $(PROG) -p $(MCU_PROG) -C +$$TF\

needed to be changed to

$(AVRDUDE) -c $(PROG) -p t84 -b 19200 -P /dev/ttyACM0 -C +$$TF\

With all this I can run through both make steps and successfully upload (burn) the code to an ATtiny84. However the device seems not to work and I assume this is because of a lack of support for the tiny84 in world.cfg as it runs as atmega88:

$ make CFG=project.cfg try1
make[1]: Entering directory `/home/osboxes/sketchbook/cli/owslave'
mkdir -p device/try1
MCU:atmega88
MCU_PROG:m88
PROG:avrisp
AVRDUDE:sudo avrdude
[...]

What can I do now? What values do I have to add to world.cfg to get support for t84?

smurfix commented 7 years ago

If you look at world.cfg you will see that there is no defaults.target.t84. You'll have to add it. That'll also fix avrdude's -p parameter. Send a pull request. ;-)

drtrigon commented 7 years ago

I don't know what I need to put into world.cfg. Can you explain the format?