Programming External SPI Flashes
The popularity of external SPI flashes has grown and becomes more and more attractive on custom hardware. They are used as additional data memory or even replace the internal flash. The J-Link software supports programming most common SPI / QSPI flashes in two different ways. Which way is the right one for you depends on your requirements or your hardware setup. Both have pros and cons.
In Direct Mode, the flash is programmed directly via J-Link using the SPI protocol, no CPU / MCU in between. The J-Link is connected directly to the SPI flash and communicates with the SPI flash itself. Further information regarding this as well as the interface / protocol description are available, please refer to the J-Flash SPI information page.
J-Link <--> SPI flash
No RAMCode is required
Additional adapter / interface is required on the hardware
In Indirect Mode, the flash is programmed indirectly through the CPU. The J-Link is connected to the debug interface of the CPU and the flash is connected to the CPU (e.g. through an SPI / QSPI peripheral controller), too. For this setup, a RAMCode is required which handles the programming procedure. For some CPUs, the J-Link software already includes RAMCodes. For a list of all supported CPUs, please refer to the J-Link Supported Device List on our website. If no RAMCode is available for the used CPU, you can create the RAMCode on your own using the Open Flashloader. Alternatively you can get in contact with SEGGER directly via e-mail to check if there are any plans to create a custom RAMCode for your setup.
J-Link <--> CPU <--> SPI flash
No additional adapter / interface is required on the hardware
A RAMCode is required