I have a MCU with completely blank internal flash. Zero boot loaders or programs. The MCU can be only programmed through JTAG. I have SPI flash IC. The SPI flash contains the boot loader. How would I program the MCU with the bootloader on the SPI flash? What kinds of ICs would I use?


You could have specified the MCU but since you didn't, I'll stick to general terms.

Generally JTAG interfaces come with a UART, its slower but you can use the JTAG to load up an interm program that you write, then activate the UART and start transfering the info from the UART to the SPI flash

Here is what the wiki on JTAG's says:

JTAG programmers are also used to write software and data into flash memory. This is usually done using data bus access like the CPU would use, and is sometimes actually handled by a CPU, but in other cases memory chips have JTAG interfaces themselves. Some modern debug architectures provide internal and external bus master access without needing to halt and take over a CPU. In the worst case, it is usually possible to drive external bus signals using the boundary scan facility.

As a practical matter, when developing an embedded system, emulating the instruction store is the fastest way to implement the "debug cycle" (edit, compile, download, test, and debug).[citation needed] This is because the in-circuit emulator simulating an instruction store can be updated very quickly from the development host via, say, USB. Using a serial UART port and bootloader to upload firmware to Flash makes this debug cycle quite slow and possibly expensive in terms of tools; installing firmware into Flash (or SRAM instead of Flash) via JTAG is an intermediate solution between these extremes.

Here is an example for JTAG UARTS for the STM32F's


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.