All results were taken from the J-Link Commander output. Tests started with the flash either empty or erased, as flash erase times depend very much on the selected device. Sector sizes may grow for large devices. Please refer to the chip manual of the appropriate device to get information about erase times.
J-Link supports the programming of memory-mapped QSPI NOR flash via the standard methods described above.
In the beginning, SPI NOR flash was usually a custom connection and not standardized, with advanced MCUs and QSPI flash memory-mapped made visible in the MCU address space. However, it eventually became a full replacement and even successor of parallel NOR flash. With J-Link, all features known from internal flash are also available in memory-mapped QSPI flash:
Note: Hardware breakpoints are not usable in QSPI flash on many Cortex-M based devices. This makes J-Link + flash breakpoints the only real option to debug in QSPI flash on these devices.
A customized flash algorithm is needed to program these devices. Customers can do this themselves using J-Link Device Support Kit, or SEGGER can help. Please contact sa...@segger.com to request a quote.
SEGGER engineers have written, validated, and optimized the flash loaders, making sure they work reliably and deliver the best possible performance. SEGGER has hardware in-house for all supported devices and can re-test and give support to users.
All tests were performed by placing a 512 KB program into the flash memory of a blank STM32F417IG microcontroller connected via SWD interface. The SWD speed was selected at the maximum possible for each debug probe.
The J-Link also has the option of further software enhancements with the production flash programming utility (J-Flash). The ability to take full advantage of the development environment using the Unlimited Flash Breakpoint module also means you free your development from the hardware breakpoint restriction. In this test, J-Link is the clear winner.
J-Flash Lite is a free, simple graphical user interface which allows downloading into flash memory of target systems. J-Flash Lite is part of the J-Link Software and Documentation package, available for download here.
How to perform downloading into flash via J-Flash Lite:
Flasher is a programming tool for all common devices with internal or external flash memory. For a list of all supported devices click here. Flasher ARM is designed for programming flash targets with the J-Flash software or stand-alone.
J-Flash is an application that can program internal and external flash on ARM/Cortex devices. J-Flash can be used as a GUI-based application or in batch mode. It is available for Windows, Linux and macOS.
J-Flash is a PC software running on Windows (Windows 2000 and later) systems, Linux or macOS, which enables you to program the internal and external flash of your microcontroller via J-Link or Flasher.
Information on the performance values can be found in the tables below. Device series, program and program verification are indicated in the tables. They provide an illustration of example values with frequently used devices. This demonstrates the write performance for flash memory of J-Flash and J-Link.
Most modern MCUs have a dedicated QSPI unit on-chip that makes the QSPI flash memory mapped available in the MCU address space so that it can access the QSPI flash like parallel flash and directly execute instructions from it (execute-in-place, XiP). For most of such MCUs, QSPI flash programming is supported out-of-the-box. If it is supported for a specific MCU, please refer to the list of supported devices.
As SPI flash memories are not memory-mapped and can be connected to basically any SPI unit a MCU provides, there are no out-of-the-box algorithms available for that. However, customers can always add a flash bank and algorithm on their own for supporting such flashes by making use of the open flash loader functionality. For more information, please refer to the SEGGER Wiki.
There are no out-of-the-box algorithms available for that. However, customers can always add a flash bank and algorithm on their own for supporting such flashes by making use of the open flash loader functionality. For more information, please refer to the SEGGER Wiki.
As DataFlash memories are not memory-mapped and can be connected to basically any SPI unit a MCU provides, there are no out-of-the-box algorithms available for that. However, customers can always add a flash bank and algorithm on their own for supporting such flashes by making use of the open flash loader functionality. For more information, please refer to the SEGGER Wiki.
As NAND flash memories are not memory-mapped and can be connected in different ways to the MCU (dedicated NAND flash controller, just GPIOs, ...), there are no out-of-the-box algorithms available for that. However, customers can always add a flash bank and algorithm on their own for supporting such flashes by making use of the open flash loader functionality. For more information, please refer to the SEGGER Wiki.
J-Flash Lite is a flash programming application to program data images to the flash of a target device.In comparison to J-Flash, J-Flash Lite has a reduced feature set but does not require a J-Link PLUS or higher to operate (it is also available for J-Link BASE and EDU).
J-Flash Lite is part of the J-Link Software and Documentation Pack, which is available for download on the SEGGER webpage.
I just started working with mdek1001 kit. I am trying to dig into examples given in the on-board package. I read the DWM1001 Firmware User guide, I found that we can flash through 2 ways either using J-flash lite or by downloading into the target using Seggar.
What I understood from User Guide is that if we use J-Flash Lit whole partition on MCU is erased and reflashed i.e the full PANS library, SoftDevice, FW1, FW2, environment, bootloader.
I want to ask what happens when we flash by downloading into the target using Seggar. Does the whole partition is not erased in this case?
It shouldn't technically be that hard to make a Universal Programmer for most flash parts. They all self-identify, and the specific algorithms could be scripted. I think IAR tries to do this, with scripts and such. Seem to recall Segger having something similar but it's been a while since using their tools extensively.
Are you sure that flash can be programmed using just the two SWD signals (SWDIO, SWCLK), so basically jumper J29 1-2 and 3-4 of the EK-RA6M5 board could be removed? The evaluation board has in addition to the two SWD signals also P109 and P110 connected to the J-Link-OB which are the SCI serial programming interface pins. So my impression is that 4 signals rather 2 are needed for debugging and programming, even with the on-board J-Link.
When the RA6M5 is programmed via e2studio when debugging, the IDAU registers are programmed over the serial boot interface to setup the flash partitioning between secure and non-secure, then the device is debugged over the SWD interface.
However, the issue I have is with the Section Placement Macros. I am using SD 132 V2.0 and am on the pca10040. I have been scraping the App placement addresses from the armgcc .ld script (anyway, these don't change for the other BLE examples so I almost have it memorised). I thought if I set the script for the flash start to be 0x07A000 (top of the memory layout where the DFU Bootloader resides) that will be putting the Bootloader where it needs to go (I am using fu_single_bank_serial_s132). And if I leave Ram at 0x20002080 then at least I have left space for the SoftDevice. Already my logic is starting to flake.
1.) Yes this is possible. I was doing some DFU stuff and Embedded Studio was great because of how easy it was to flash the SoftDevice, Bootloader and application at once. (Remember when you flash the application along with the SD and BL instead of updating it via DFU you need to write a flag to tell the BL there is a valid application in flash already that it should run).
The tricky part: You can't just flash the SoftDevice, application and bootloader at once. The straight forward way I suggest you try first is flash the Softdevice and bootloader using nrfjprog or a similar tool. Then upload the application you compile in Embedded Studio to your board via the DFU process (using master control panel on PC or mobile app probably). This should work.
1.) Flash the softdevice, application and bootloader all at once (don't run the cpu yet though).2.) Write the flag in memory telling the bootloader a valid application is already present in flash and that it should run that. This is one word in flash. And this can be done either with nrfjprog or you can flash a hex file that programs the one word: github.com/.../bootloader_settings_nrf52.hex
So if you use the hex file I attached then you can automate your process nicely in Embedded Studio:flash the sd.hex, app.hex, bl.hex, bootloader_setting_nrf52.hex and then reset and run the program. It should work now! And remember in Debugger->Loader Options you can have 4 files loaded every time you program the board so this is perfect!
My application is somewhat ambitious using sensors that can be a little tricky, so for development and debugging purposes it is crucial I can flash straight through the IDE. Anyway, the logical workflow is to largely finish the development of the app and then introduce the boot loader at the end, I get that.
I was just trying to flash the boot loader itself for the moment (single_bank_serial_s132_) together with the SD. I have FLASH_START at 0x07A000 (end of memory region as you confirm) but I am unsure where to get the RAM_START from. Normally I scrape it from the .ld file in the armgcc folder but I notice for all of the boot loader examples the armgcc folder does not have an .ld. What is another way in which I can find out the RAM_START for the boot loader?
OK, I might know what's going on. On nRF52 the bootloader is reserved the flash at 0x7A000-0x80000. This is 24,576 bytes. In Keil, the bootloader project has optimizations configured to minimize code size and the compiled bootloader is small enough to fit in this section.
aa06259810