소스 검색

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*) */
 /* =============================================================== */