sleemanj / optiboot

Small and Fast Bootloader for Arduino and other Atmel AVR chips
66 stars 13 forks source link

Compile error - PRR, BODS, BODSE not declared #4

Closed sgoetze closed 6 years ago

sgoetze commented 6 years ago

I tried to use your ATtiny core to compile a sketch for ATtiny13A which was previously compiled without problems for ATtiny85 using the ATTinyCore by Spence Konde V. 1.1.4.

I selected Board: ATtiny13 Millis, Tone Support: Millis Available, no Tone Miilis Accuracy: .... Default Processor Version ATtiny13A Print Support: .... Smallest Link Time Opt.: LTO Enabled Serial Support: Half duplex, Read + Write Use Bootloader: No Processor Speed: 9.6 MHz internal BOD Lovel: 1.8V

These header files are included in the sketch:

include <avr/io.h>

include <avr/sleep.h>

include <avr/wdt.h>

include <avr/interrupt.h>

include "arduino.h"

I got compiler errors missing declarations for PRR, BODS and BODSE.

Because I saw no way to get further on I was looking for another ATtiny13 core and tried the MicroCore by MCUDude V. 1.0.2. With this core the sketch was compiled without errors but a linker error came up: multiple definition of `__vector_8'.

If you want I can send you my sketch (minimal current using timer with watchdog sleep) per e-mail.

I hope you can find the problem.

sleemanj commented 6 years ago

Sounds like you are trying to set incorrect registers - that is, in your code somewhere for example you have written BODSE.

If you are sure that the incorrect BODSE reference (and others) are coming from the core and not from your code, then send your code.

But if it's your code that specified BODSE then you should consult the datasheet for Tiny13, for example BODSE is not a feature of the Tiny13 (but is of the Tiny85)