Problem with init() (in wiring.c) when my init of the UART (unsolved)

    // trigger on falling edge (default), noise cancel

// lower 3 bits is div, off,1,8,64,256,1024,extfall,extris ; CS12,11,10
    TCCR4B = _BV(ICNC1) | _BV(CS11);

// clear and enable Input Capture interrupt
    TIFR4 |= _BV(ICF4) | _BV(TOV4) | _BV(OCF4A) | _BV(OCF4B);
    TIMSK4 = _BV(ICIE4);        // enable input capture only

If you're going to re-initialize peripherals AFTER the arduino core functions (init()) have already set them up, you'll need to assume that none of the "initial values" from the datasheet are still correct. That means, in the worst case, that you should explicitly initialized ALL registers associated with a peripheral using "="; no assuming that certain bits are already in the correct state, no assuming that whole registers are set "right" for your application... Here (for example) you haven't done anything with TCCR4A, and you're assuming some state in TIFR4.

So, why are you bothering to use the Arduino IDE? Since you seem to be prepared to write your own from-scratch code, it sounds like you don't "need" the arduino libraries. Since you ARE using different initializations, I don't think you can count on other Arduino libraries continuing to work correctly. And I doubt that it's because of the wonderful Arduino editor! That leaves the "upload" button - did you know that you can upload arbitrary .hex files to an arduino board (via its bootloader) using the avrdude command?