tinyNoMillis

I need to replace the timer 0 overflow ISR and millis(), micros(), etc. I noticed this other core, "tinyNoMillis", but don't understand how it's supposed to be accessed. I tried adding a menu item to boards.txt but the IDE ignored my efforts. Then I modified the existing entry for my processor and changed the core to tinyNoMillis. But it didn't compile. So for now I'm just hacking wiring.c.

How was this intended to be used?

I'm not sure about that either, honestly. I've seen cores with no milliseconds (I think some are even in the ATTiny classic core in my sig), but I've never tried using any of them (it's quite possible that they don't work in that core).

I really really wish there was a way to use #defines from the sketch, and have them picked up by the core - that would be so awesome; you could have #defines for no millis, a #define that'd put the timers into 16 bit mode...

But as far as I can tell, #defines in the sketch aren't visible from the core.

Thanks. Maybe adding custom defines to wiring.c is the way to go. I just have to remember and reintegrate whenever the core is updated.

I also wish for defines in the sketch being noticed by the core. And libraries too. It is annoying to have to make global changes for a sketch. And then remember to change them back for other sketches.

Are there build method alternatives to the Arduino IDE worth considering?

DrAzzy:
I really really wish there was a way to use #defines from the sketch, and have them picked up by the core

There are two ways to include build options with a core. One is "variants". It works very well.

This is the other...

http://forum.arduino.cc/index.php?topic=329709.msg2279367#msg2279367

...through reply #7.

I believe @robert rozee (someone) published a slightly different version on the Developers List that made the options file optional. (Please do not use "options.h" or "buildoptions.h" as the filename. That is just asking for trouble.)

Ooo, nice. Thanks!

Wonderful!

So I can create an options file for a variant of the board I'm using that defines a switch for custom mods I have made in wiring.c. At the same time I can add an options file to an individual sketch. Do I have that right?

Yes.

I suggest first focusing exclusively on "variants". It is fairly well exercised. It is documented and supported. It has solved all build option needs I have encountered.

Variants. Do you mean like what is described here?

Does that basically mean cloning the core just to partially change one file?

Pardon me while I try to work this out. You know from previous electronic encounters with me that my IQ is not particularly high.

Yes. No. It means adding an entry to boards.txt, creating a directory, creating one or more header files. The header file(s) have to have meaning to the core source code.

Look in {ArduinoRoot}/hardware/arduino/avr/variants/ for examples. You will find references to those directories in {ArduinoRoot}/hardware/arduino/avr/boards.txt. The standard core is only interested in a header file name pins_arduino.h.

Okay, I think I got it now. Thanks.