In the docs for build_board.f_cpu
at Platform options — PlatformIO latest documentation the wording gives the impression that this will “overclock” the CPU:
You can overclock a board by specifying a
board_build.f_cpu
value other than the default.
I would suggest changing this wording as that setting should only be used when the board has a different clock frequency to the default. Perhaps to:
If you have changed a board’s clock frequency, then you should specify a
board_build.f_cpu
value to match the change.
your Leonardo board’s details are at Arduino Leonardo — PlatformIO latest documentation, where again, it does rather give the impression that the ini file setting will overclock the board!
Cheers,
Norm.