This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't get bootloader to log

Using SDK 12.2, I have compiled the secure bootloader successfully, tweaking the sdk_config and Makefile to use RTT for logging and turning on logging, and using the "_debug" linker script to place it at 0x75000. I used nrfutil to make a bootconfig.hex. I installed the bootloader, config, softdevice, and my app. Using JLinkExe, I can see all of them: SD at 0x0, my app at 0x1f000, bootloader at 0x75000 and config at 0x7f000.

When I boot the pca10040, LED3 comes on and stays on, but nothing is seen on the RTT console, I can't see the device advertising, and it appears hung. If I hold down button 4 while booting, LEDs 1 and 3 stay on, but still appears hung. Nothing ever shows on the RTT console.

It's hard to debug this if I can't see what's happening. Is there some reason the bootloader can't use RTT logging? Am I missing a step (for example, how does it know to look at 0x75000 instead of 0x78000)?

Parents
  • Hi Lee, When I mean "move" meanting instead of 0x78000, it is flashed at 0x75000 and the PC start from there (The MBR check 0x10001014 in UICR and forward the PC there).

    My suggestion is:

    • Test the stock bootloader example, make sure it works at address 0x78000 (don't enable RTT or anything). Try to DFU update an application.

    • Change the address to 0x75000 and check if it still work.

    • Don't change to O0, keep it as Os first, and enable RTT and check if it works. Don't copy the whole sdk_config.h from other project, only modify it to enable what you want.

    • If you want to remove optimization, use O0 and "move" the bootloader to something lower to get more space, for example 0x73000.

    • About your last question, the log showed that the application started, the bootloader is finished, that's why you see nothing after that.

Reply
  • Hi Lee, When I mean "move" meanting instead of 0x78000, it is flashed at 0x75000 and the PC start from there (The MBR check 0x10001014 in UICR and forward the PC there).

    My suggestion is:

    • Test the stock bootloader example, make sure it works at address 0x78000 (don't enable RTT or anything). Try to DFU update an application.

    • Change the address to 0x75000 and check if it still work.

    • Don't change to O0, keep it as Os first, and enable RTT and check if it works. Don't copy the whole sdk_config.h from other project, only modify it to enable what you want.

    • If you want to remove optimization, use O0 and "move" the bootloader to something lower to get more space, for example 0x73000.

    • About your last question, the log showed that the application started, the bootloader is finished, that's why you see nothing after that.

Children
No Data
Related