aboutsummaryrefslogtreecommitdiff
path: root/flashstub/code-to-array.pl
diff options
context:
space:
mode:
authorMarc Singer2015-01-24 13:50:59 -0800
committerMarc Singer2015-03-08 16:25:22 -0700
commitbf1cb71eb7a3a679a6acf944283cd0f0ef53c077 (patch)
treefe0cb67833677720caec8bda1f23263b3d364b8e /flashstub/code-to-array.pl
parente0a8ce5a887cb31f38077cd22271fd894070e0e9 (diff)
Revisions on Gareth's comments.
o Implemented byte writes to EEPROM now that the emulator has a byte-wide target write. o Added comment describing the reason that mass erase doesn't work. o Removed all unused code. o Changed to Linux kernel indent style. o Changed to Linux kernel function to parenthesis style. o Stub generation doesn't use Perl, switched to sed. Also, only including the instructions instead of the source and the instructions. o Handling unaligned destination writes.
Diffstat (limited to 'flashstub/code-to-array.pl')
-rwxr-xr-xflashstub/code-to-array.pl24
1 files changed, 0 insertions, 24 deletions
diff --git a/flashstub/code-to-array.pl b/flashstub/code-to-array.pl
deleted file mode 100755
index 5333e31..0000000
--- a/flashstub/code-to-array.pl
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/perl
-#
-# Convert the output of objdump to an array of bytes are can include
-# into our program.
-
-while (<>) {
- if (m/^\s*([0-9a-fA-F]+):\s*([0-9a-fA-F]+)(.*)/) {
- my $addr = "0x$1";
- my $value = $2;
- if (length ($value) == 4) {
- print " [$addr/2] = 0x$value, // $_";
- }
- else {
- my $lsb = substr ($value, 4, 4);
- my $msb = substr ($value, 0, 4);
- print " [$addr/2] = 0x$lsb, // $_";
- print " [$addr/2 + 1] = 0x$msb,\n";
- }
- }
- else {
- print "// ", $_;
- }
-}
-