JLink debug. Breakpoint in main

Hi @Tuxford,

Note:
For the same question regarding GDB, please add your further questions in your previous post GDB server for KM4 .
You NEED NOT create a new topic for the same question.


  1. Please specify the requirement you would like to fulfill. Debug or upload an image (flash) to your RTL8720DN.
    make debug: is to enter the debug mode
    make flash: is to download all 3 necessary images to your flash chip

According to AN0400 Chapter 1.4.2 Setting Debugger - JLink, there is nowhere indicating that you need to start two JLink servers. Besides, there is not necessary to enter “monitor reset” and any other commands as you described. PLEASE STRICTLY FOLLOW THE APPLICATION NOTE STEP BY STEP!


  1. Steps to reset KM0 and KM4 are different.
  • For KM0, you need to use the “monitor reset” instruction in the corresponding rtl_gdb_debug.txt to reset it under debug. The default path of this file is under \project\realtek_amebaD_va0_example\GCC-RELEASE\project_lp\asdk\gnu_utility\gnu_script\rtl_gdb_debug.txt.

  • For KM4, you need to use the “monitor reset” instruction in the corresponding rtl_gdb_debug.txt first. Then, set the bit[25] of memory address 0x4800_03f8 to 1 because the boot process of KM4 is controlled by KM0. Without this operation, the KM4 can’t jump out of the boot function. Details of this operation are as follows:

    • After executing “make debug” instruction, a debug window pops up.

    • In this window. Set bit[25] to 1, then type “c”, the KM4 is reset.

      image

    Note: Only resetting KM0 may cause KM4 to work in an abnormal way because KM0 reboot will change some settings of KM4.

Please refer to AN0400 Chapter 1 for full details.


You are allowed to upload via both make flash and Image Tool. We recommend open source users to use Image Tool to upload the firmware.

Please refer to AN0400 Chapter 8 Image Tool


For anything that is not covered in the AN0400, you may proceed to ask for the NDA version of SDK and require further support from a dedicated FAE (Field Application Engineer).

Thank you.