Hi Fabrizo
The open source version didn't have serial loader targets for the KEA boards so I just copied them in to it - if you synchronise to Git Hub you should be able to use FRDM_KEAZ64Q64 target as reference - this also has an 8MHz crystal.
The trick to using the oscillator is to choose an input divider to divide the crystal frequency to a frequency in the range 31.25kHz..39.06525kHz. In addition, the oscillator also needs to be enabled. The FLL will then operate at about 40MHz. Since the bus/flash clock is limited to 24MHz this needs to be divided by 2 to remain within specification.
This is the configuration (hw_app_kinetis.h) to do this:
#define CRYSTAL_FREQUENCY 8000000 // 8 MHz crystal
//#define RUN_FROM_EXTERNAL_CLOCK // run directly from external 8MHz clock (without FLL)
#define _EXTERNAL_CLOCK CRYSTAL_FREQUENCY
#define CLOCK_DIV 256 // input must be divided to 31.25kHz..39.06525kHz range (/1, 2, 4, 8, 16, 32, 64, 128, 256, 512 or 1024 possible)
// this input is multiplied by 1280 to 40MHz..50MHz at the FLL output
#define SYSTEM_CLOCK_DIVIDE 1 // divide the clock output to give the system clock (maximum 48MHz) (/1, 2, 4, 8, 16, 32, 64 or 128 possible)
#if defined RUN_FROM_EXTERNAL_CLOCK
#define BUS_CLOCK_DIVIDE 1 // divide by 1 or 2 to give bus and flash clock (maximum 24MHz)
#else
#define BUS_CLOCK_DIVIDE 2 // divide by 1 or 2 to give bus and flash clock (maximum 24MHz)
#endif
Beware that I also updated kinetis.c since it otherwise was not using the correct register for the KEA64 to set the bus/flash divide.
Good luck
Regards
Mark