AnsweredAssumed Answered

LPC55S69-EVK SEGGER JLink Flashing Problem

Question asked by Simon Ott on Sep 16, 2019
Latest reply on Oct 19, 2019 by Simon Ott

I used LPCScrypt to flash the newest SEGGER JLink Firmware for NXP on the LPC55S69-EVK. Unfortunately, it seems that in certain projects something goes wrong and parts of the flash get overwritten (whilie the exact same project is working when flashed on a board with original Link2 debugger). I slightly modified an SDK example project that should demonstrate the behaviour. It consists of three binaries: The first secure binary just jumps to the second secure binary, the second binary configures trustzone and then jumps to the non-secure application (these are the SDK examples,


The binaries are located in the flash as following:  

First Binary: 0x10000000 – 0x10010000 

Second Binary: 0x10011000 – 0x10027c00

Second Binary Veneer Table: 0x10072c00-0x28000

Third binary: 0x28000-0x38000


All three projects have a launch script for the Link2 and for the JLink. When I use a Link2-Board, everything is working. However, when I use a LPC55S69-EVK with the JLink as debugging firmware, the first projects can be flashed and runs. The second binary is also flashed correct to location 0x1028000 but  overwrites the contents of the first binary from 0x10000000. When I read out the memory afterwards, the flash area of the first binary contains 0xFF and at one point (0x10007c00) the veneer table. According to the Memory Regions and Linker Script, the veneer table should be located at 0x10027c00 so it seems as if it is just shifted by exactly 0x20000.


From this state, it is not possible to recover, I.e. flashing the first binary again does not have any effect, the flash at 0x10000000 stays 0xFF. The only way to recover the board is then to mass erase the flash with jumper J10 connected.