I'm trying to program both Secure bootloader and application code using J-Link, preferably as a single hex file. After reset board is stuck in bootloader. UICR is programmed correctly and I'm able to upload code via DFU so I guess proper configuration of bootloader settings page in flash is needed. For now it looks as follows:
λ nrfjprog --family nrf52 --memrd 0x0007F000 --n 352
0x0007F000: AC871054 00000001 00000000 00000000 |T...............|
0x0007F010: 00000000 00000000 00000000 00000000 |................|
0x0007F020: 00000000 00000000 00000000 00000000 |................|
0x0007F030: 00000000 00000000 00000000 00000000 |................|
0x0007F040: 00000000 00000000 00000000 00000000 |................|
0x0007F050: 00000000 00000000 00000000 00000000 |................|
0x0007F060: 00000000 00000000 00000000 00000000 |................|
0x0007F070: 00000000 00000000 00000000 00000000 |................|
0x0007F080: 00000000 00000000 00000000 00000000 |................|
0x0007F090: 00000000 00000000 00000000 00000000 |................|
0x0007F0A0: 00000000 00000000 00000000 00000000 |................|
0x0007F0B0: 00000000 00000000 00000000 00000000 |................|
0x0007F0C0: 00000000 00000000 00000000 00000000 |................|
0x0007F0D0: 00000000 00000000 00000000 00000000 |................|
0x0007F0E0: 00000000 00000000 00000000 00000000 |................|
0x0007F0F0: 00000000 00000000 00000000 00000000 |................|
0x0007F100: 00000000 00000000 00000000 00000000 |................|
0x0007F110: 00000000 00000000 00000000 00000000 |................|
0x0007F120: 00000000 00000000 00000000 00000000 |................|
0x0007F130: 00000000 00000000 00000000 00000000 |................|
0x0007F140: 00000000 00000000 00000000 00000000 |................|
0x0007F150: 00000000 00000000 00000000 FFFFFFFF |................|
and
λ nrfjprog --family nrf52 --memrd 0x10001014 --n 8
0x10001014: 00073000 0007E000 |.0......|
I guess that I have to tell the bootloader that application is flashed and recalculate crc but how should I do it?