summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Hodder <dave.hodder@focusrite.com>2017-10-24 15:17:26 +0100
committerGitHub <noreply@github.com>2017-10-24 15:17:26 +0100
commitaf0c758cceb310b69c9192d7cdc8133ba63a3f98 (patch)
tree50ec6f386c13b5be0be898e3d504e6cef236a202
parent284d2907c5ba0ccd6d2e2415a4e6f58a66a8a65c (diff)
parenta9154b433a36d06222ca7d42447130d864472a99 (diff)
downloadlaunchpad-polymaker-af0c758cceb310b69c9192d7cdc8133ba63a3f98.tar.gz
launchpad-polymaker-af0c758cceb310b69c9192d7cdc8133ba63a3f98.zip
Merge pull request #31 from stevenreddie/bugfix-version-offset
Corrected offset of firmware version within image [#30]
-rw-r--r--tools/hextosyx.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/hextosyx.cpp b/tools/hextosyx.cpp
index eb909e4..ec779d5 100644
--- a/tools/hextosyx.cpp
+++ b/tools/hextosyx.cpp
@@ -105,12 +105,12 @@ static void write_header(intelhex::hex_data& data, std::ofstream& ofs, size_t Ba
105 ofs.put(ID >> 8); 105 ofs.put(ID >> 8);
106 ofs.put(ID & 0x7f); 106 ofs.put(ID & 0x7f);
107 107
108 ofs.put(data[BaseAddress + 0x132] >> 4); 108 ofs.put(data[BaseAddress + 0x102] >> 4);
109 ofs.put(data[BaseAddress + 0x132] & 0x0f); 109 ofs.put(data[BaseAddress + 0x102] & 0x0f);
110 ofs.put(data[BaseAddress + 0x131] >> 4); 110 ofs.put(data[BaseAddress + 0x101] >> 4);
111 ofs.put(data[BaseAddress + 0x131] & 0x0f); 111 ofs.put(data[BaseAddress + 0x101] & 0x0f);
112 ofs.put(data[BaseAddress + 0x130] >> 4); 112 ofs.put(data[BaseAddress + 0x100] >> 4);
113 ofs.put(data[BaseAddress + 0x130] & 0x0f); 113 ofs.put(data[BaseAddress + 0x100] & 0x0f);
114 114
115 ofs.put(0xf7); 115 ofs.put(0xf7);
116} 116}
@@ -180,4 +180,4 @@ int main(int argc, char *argv[])
180 ofs.close(); 180 ofs.close();
181 181
182 return 0; 182 return 0;
183} \ No newline at end of file 183}