Segger Jlink flash download mechanism

211 views Asked by At

I'm using Rohitab's excellent API monitor tool to monitor the DLL calls that Keil uVision is making to Segger's JLinkARM.dll so that I can replicate them within an automated test environment.

As part of this I'm trying to understand the mechanism through which uVision communicates with the flash loader program to download the image being debugged.

I understand that uVision download's a flash loader program to the target device's RAM and that loader interacts with the onboard flash to erase it and download the new image, though I'm struggling to see the DLL calls which are made from uVision to actually stream the image down to the flash loader.

I would have expected to see a whole bunch of JLINKARM_WriteMem calls to stream the data down but I don't. I can see a bunch of JLINK_WriteReg and JLINK_ReadReg calls but not enough to comprise the image. My guess is they are for monitoring the flashing process. I know Jlink support a number of flash download related APIs but I don't see them used here. I don't see any paths being passed either. JLink's own log file is similarly unhelpful here. Is there some out of band mechanism I'm missing here?

1

There are 1 answers

0
Gregory Kuhn On

Sorry. I shouldn't be posting questions like this when I'm tired. JLINKARM_WriteMem is exactly the mechanism used. I don't know why I didn't see them the first time I tried it.