I have a time of 500ms between reset and calling the main function. It is the function in start_c init_libc_array taking all this time? How to reduce this time? I created a test project for moving only one output to test this time.
All the programming of the internal registers which include components and wiring is done after stabilization of the clocks and PLL. All registers get a value, so setup time is independent of the components used,
In cydwr-file, System tab there is a "Device Configuration Mode" setting which allows for using more flash but faster setup.