SIMtrace MITM/emulator

Tom Schouten tom at zwizwa.be
Thu Jul 11 15:36:04 UTC 2013


>
> BTW, one thing I noticed in both firmwares is that the LMA in the 
> flash elf binaries is not set correctly.  I was using the plain "load" 
> command in gdb to flash the bootloader and app to my AT91SAM7-EK over 
> JTAG (segger blue box), but the app went to 0x0 instead of 0x4000.
>
>

Here's a fix:


[master] tom at zoo:~/at91work/at91lib/boards/simtrace/at91sam7s256$ git 
diff flash_dfu.lds
diff --git a/at91lib/boards/simtrace/at91sam7s256/flash_dfu.lds 
b/at91lib/boards/simtrace/at91sam7s256/flash_dfu.lds
index c228dcc..e3e5147 100644
--- a/at91lib/boards/simtrace/at91sam7s256/flash_dfu.lds
+++ b/at91lib/boards/simtrace/at91sam7s256/flash_dfu.lds
@@ -45,7 +45,7 @@ MEMORY
  SECTIONS
  {
      . = 0x000000000;
-    .fixed 0x00104000: AT ( 0x00000000 )
+    .fixed 0x00104000:
      {
          . = ALIGN(4);
          _sfixed = .;
@@ -55,7 +55,7 @@ SECTIONS
          _efixed = .;
      } >flash

-    .relocate 0x00200028: AT ( SIZEOF(.fixed) )
+    .relocate 0x00200028:
      {
          . = ALIGN(4);
          _srelocate = .;
@@ -64,7 +64,7 @@ SECTIONS
          *(.data)
          . = ALIGN(4);
          _erelocate = .;
-    } >sram
+    } >sram AT >flash

      .bss (NOLOAD) : {
          _szero = .;





More information about the simtrace mailing list