瀏覽代碼

RP2MCU: Add comment about using hbreak for debugging

I had not previously realized that using "hbreak" for hardware
breakpoints in GDB fixes the problem of RAM breakpoints not working.

Disabling RAM loading in linker script is then not needed, so I added
a comment there.
Petteri Aimonen 7 月之前
父節點
當前提交
335697a7db
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 3 0
      lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld
  2. 3 0
      lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld

+ 3 - 0
lib/ZuluSCSI_platform_RP2MCU/rp2040-template.ld

@@ -99,6 +99,9 @@ SECTIONS
          * Uncommenting this line puts all code in flash.
          * You may have to delete "firmware.elf" for the next build
          * to use this linker file's changes
+         *
+         * Alternatively, use "hbreak" in gdb to force hardware
+         * breakpoints instead of RAM breakpoints.
          */
         /* *(.text .text*) */
     } > FLASH

+ 3 - 0
lib/ZuluSCSI_platform_RP2MCU/rp23xx-template.ld

@@ -82,6 +82,9 @@ SECTIONS
     Uncomment the EXCLUDE_FILE line below and comment the EXCLUDE_FILE line above for debug to work properly,
     the initial break point to main seems to get clobbered when everything is in SRAM.
     You may have to delete the "firmware.elf" file so the next build links with newly modified linker script
+
+    Alternatively, use "hbreak" in gdb to force hardware
+    breakpoints instead of RAM breakpoints.
     ------------------------------------------------------------*/
         /* *(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .text*) */
 /* =============================================================== */