]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - tools/merge-srec.pl
Added LF frequency adjustments from d18c7db, cleaned up code,
[proxmark3-svn] / tools / merge-srec.pl
diff --git a/tools/merge-srec.pl b/tools/merge-srec.pl
new file mode 100644 (file)
index 0000000..852a96b
--- /dev/null
@@ -0,0 +1,18 @@
+# merge the code that initially executes out of flash with the RAM image\r
+\r
+($flashFile, $ramFile) = @ARGV;\r
+\r
+open(FLASH, $flashFile) or die "$flashFile: $!\n";\r
+\r
+while(<FLASH>) {\r
+       print if /^S3/;\r
+}\r
+\r
+open(RAM, $ramFile) or die "$ramFile: $!\n";\r
+\r
+while(<RAM>) {\r
+       if(/^S3(..)(........)(.*)/) {\r
+               $addr = sprintf('%08X', hex($2) - 0x00200000 + 0x200);\r
+               print "S3$1$addr$3\n";\r
+       }\r
+}\r
Impressum, Datenschutz