As per the Teensyduino 1.48 release thread.
T3.x sketches could compile that had int mai() {} and not void() and setup():
So simply copied over setup.cpp from T3 folder of cores, and then changed setup.c to call main, which simply calls setup and loops calling loop/yield.
Added another endless loop after the call to main() to hang there if the users main returns.
Tested with simple sketch
```
#include <arduino.h>
int main (void) {
pinMode(13, OUTPUT);
for(;;) {
digitalWriteFast(13, HIGH);
delay(250);
digitalWriteFast(13, LOW);
delay(250);
}
}
```
tried it on T3.6 verified before compile failed and now works. Also compiled and run a normal app to just make sure it was not totally busted
Edited here on the web - copied to local machine and it built as tested : https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=209959&viewfull=1#post209959
Proposed add locations for startup_early_hook(); and startup_late_hook(); just before two existing waiting while()'s.
With debug 'PRINT_DEBUG_STUFF' disabled the three T4B2's here hit the EARLY code about 1.2 ms and LATE at about 45.3 ms after the systick is started.
Where the current printf_debug_init() call is might be critical at some point adjust 'something' as you did enabling the Serial4 port for debug - before clocks and other things are started perhaps startup_reset_hook()
Comment out some of the main programs debug print statements plus add yield call to main loop.
yield can now call SerialEvent.
Put hack in that if the user has not overwritten the SerialEvent function, the weak linked one will turn off calling itself...
This fixes the PFDs for PLL2 - by default, it has totally wrong values. This sets the frequencies according to the diagram on Page 676.
The same fix is needed for PLL3 - I have code (same structure), but it does not work - Do have have any hints for me?
Is PLL3 even running? I not, can we start it? Or, if i is running - at which frequency, and is there any non-std config?