If you rename wiring.c and restart editor, you get main.cpp:5: undefined reference to `init' error, there is that "crappy" heart of arduino:
#include <WProgram.h>
int main(void)
{
init();
setup();
for (;;)
loop();
return 0;
}
WProgram.h starts with:
#ifndef WProgram_h
#define WProgram_h
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <avr/interrupt.h>
#include "core_build_options.h"
#include "core_pins.h"
#include "wiring.h"
...
And init of that ATtiny85 evn looks like this:
void init(void)
{
// clock calibration stuff
// recalibrate clock if it was calibrated by bootloader (like micronucleus)
#if F_CPU != 16500000L
if (OSCCAL != read_factory_calibration()) {
// adjust the calibration down from 16.5mhz to 16.0mhz
if (OSCCAL >= 128) {
// maybe 8 is better? oh well - only about 0.3% out anyway
OSCCAL -= 7;
} else {
OSCCAL -= 5;
}
}
#endif
// TODO: detect if fuses set to PLL, regular internal oscillator or external and change behaviour in this next section...
#if F_CPU < 16000000L
cli();
CLKPR = 0b10000000;
#if F_CPU == 8000000L
CLKPR = 1; // div 2
#elif F_CPU == 4000000L
CLKPR = 2 // div 4
#elif F_CPU == 2000000L
CLKPR = 3; // div 8
#elif F_CPU == 1000000L
CLKPR = 4; // div 16
#elif F_CPU == 500000L
CLKPR = 5; // div 32 = 500khz
#elif F_CPU == 250000L
CLKPR = 6; // div 64 = 250khz
#elif F_CPU == 125000L
CLKPR = 7; // div 128 = 125khz cpu clock
#else
#warning "Cannot prescale chip to specified F_CPU speed"
#endif
#endif
// this needs to be called before setup() or some functions won't work there
sei();
// In case the bootloader left our millis timer in a bad way
#if defined( HAVE_BOOTLOADER ) && HAVE_BOOTLOADER
MillisTimer_SetToPowerup();
#endif
// Use the Millis Timer for fast PWM
MillisTimer_SetWaveformGenerationMode( MillisTimer_(Fast_PWM_FF) );
// Millis timer is always processor clock divided by MillisTimer_Prescale_Value (64)
MillisTimer_ClockSelect( MillisTimer_Prescale_Index );
// Enable the overlow interrupt (this is the basic system tic-toc for millis)
MillisTimer_EnableOverflowInterrupt();
// Initialize the timer used for Tone
#if defined( INITIALIZE_SECONDARY_TIMERS ) && INITIALIZE_SECONDARY_TIMERS
initToneTimerInternal();
#endif
// Initialize the ADC
#if defined( INITIALIZE_ANALOG_TO_DIGITAL_CONVERTER ) && INITIALIZE_ANALOG_TO_DIGITAL_CONVERTER
ADC_PrescalerSelect( ADC_ARDUINO_PRESCALER );
ADC_Enable();
#endif
}