Hello, my name is Pavel, and I will be supporting you.
I have gone through the schematic of the MIMXRT1060-EVKB, where I found a JTAG (SWD) 20-pin connector labeled as J2. If I connect these pins directly to the MIMXRT1062DVJ6B processor, is it possible to flash the program directly using the Segger J-Link V2?
It is possible, but the JTAG connector is used as SWD as default, for changing the interface may need to do a rework on the EVK, if you want because the SWD works to flash too.
I am also gone through MKL02Z16VFG4 pre-programmed IC. but i don't want to use that IC in our custom board.
Sorry, I do not understand, your EVK has the MKL02? The EVK uses the LPC4322 as a debugger on board just to offer all-in-one and this is not recommended to put on the new design if you use an external debugger. Let me know if I understand well about the MKL02.
I also noticed in the MIMXRT1060-EVKB schematic that there is a default QSPI Flash. Does this QSPI Flash serve the purpose of storing our .hex code? If Yes, then do I need to develop any firmware on our custom board to interface with the QSPI Flash for storing the programming code? Or are there any hardware-side changes required to utilise the default QSPI Flash? Can it work directly for flashing using J-Link?
The RT1060 does not have internal Flash and uses the QSPI to store the .hex, some QSPI memory can execute in place you can see as XIP, for the communication NXP offers generic drivers SFDP you could test it on the SDK flexspi_nor_polling_transfer using the J-Link.
In the MIMXRT1060-EVKB Board, Switch SW4[3:4] is used to select the boot mode. Is it necessary to implement the same functionality in the custom board to switch between boot mode and main application mode before flashing the program?
Is necessary is using as back door when the RT1060 is halted in an unknown state, if this happens there is some thread to recovery the control.
Is there any reference design available for the same? please provide.
attached.
Best regards,
Pavel