Well, aekteully...
Modern chips sometimes almost always have "bootloaders" (that's what the thing is called you are referring to) that grant the user/software/hardware-master ability to flash a new firmware onto the selected region using different tools: external flash memory and various protocols. But those exact bootloaders are located in far-away chips that won't get started if they were overwritten and most of the time they have a special protected region which can't be erased using regular tools (JTAG will do). So: flashing a ROM using I2C/SPI flasher is useless.
Also: no protected communication, except relativity-based one (also not promised to work securely, thanks to gray state fagolas).
>>886460
Almost there, arduino boy! NO.
JTAG is the most common protocol that is currently used to flash almost every chip on the market (even modern cpus have this exact protocol pinout). I still can easily name its pins from the top of my head: TMS, TCK, TDI, TDO. It's preferable because (most of manufacturers) allow in-system debug using specifically this type of protocol, which also allows to use clocks such as: (CPU_Clock >> 4), allowing you (if you pick short wires and have good hw buffers) speed up to 10MHz which is okay for most applications. Also modern mcus allow taking a "snapshot" (if you add a (while(1)) line in the HWFailure_Handler) of their failure state, which can be later viewed using JTAG. In short: JTAG allows to view and control most(sometimes all of it) of peripheral of a given mcu.
Cortex (f.e. ST Cortex-M0/M3) still sometimes uses I2C-styled SWD programming protocol with the following lines: SWDIO (data in-out) and SWCLK (data clock). It's slow, outdated and generally not recommended if you are to write firmware bigger than just a led flasher.
AVR (now owned by filthy pajeet microchip) uses "AVR ISP" on their 8-bit series. Not a bad mcu for a starter, but now is in a process of being eaten alive by pajeets and chinks. Looks like pajeet ceo paid chink to produce shit quality atmega8/16 in grand mass, which lowers users opinion about once great mcu. Attiny10/8 series uses I2C-styled "Micro-programming interface".
Microchip 8-bits SUCK BALLS. 2 BLOODY CYCLES PER OP! AND EVEN THAT IS NOT PROMISED! Also GIANT LIST OF 20 OP CODES! WHO THE FUCK WOULD USE THAT?!
>>888881
> It's SPI, brainlet
Not entirely correct, previous cool arduino boy meant "AVR ISP", which is in-system programming; it looks like usual "spi" (thanks to reset, mosi, miso and sclk), but you have to give up additional software overhead to flash simple 24C02 using "AVR ISP".
> JTAG can't be used to flash chips
> JTAG CAN'T BE USED TO FLASH
CIA NIGGER! GIT OUT
I SWEAR ON ME MUM
IM GONNA FLASH MAH FIRMWARE IN YOUR ASS
AND DEBUG IT ON THE FLY
P.S.: Score 2 for the good guys.