diff --git a/.cproject b/.cproject
index 7d5eb7b..5e3f56a 100644
--- a/.cproject
+++ b/.cproject
@@ -21,7 +21,7 @@
-
+
@@ -45,6 +45,366 @@
+
+
+
+ make
+
+ ram
+ true
+ true
+ true
+
+
+ make
+
+ clean
+ true
+ true
+ true
+
+
+ make
+
+ all
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -64,7 +424,7 @@
-
+
@@ -104,6 +464,366 @@
+
+
+
+ make
+
+ ram
+ true
+ true
+ true
+
+
+ make
+
+ clean
+ true
+ true
+ true
+
+
+ make
+
+ all
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
index 18fee7e..f516738 100644
--- a/.project
+++ b/.project
@@ -7,7 +7,6 @@
org.eclipse.cdt.managedbuilder.core.genmakebuilder
- clean,full,incremental,
?name?
@@ -39,7 +38,7 @@
org.eclipse.cdt.make.core.enableAutoBuild
- false
+ true
org.eclipse.cdt.make.core.enableCleanBuild
diff --git a/sources/s19reader.c b/sources/s19reader.c
index 3d2a50f..086e40b 100644
--- a/sources/s19reader.c
+++ b/sources/s19reader.c
@@ -297,10 +297,10 @@ err_t memcpy(uint8_t *dst, uint8_t *src, uint32_t length)
{
uint8_t *end = src + length;
- do {
+ do
+ {
*dst++ = *src++;
- }
- while (src < end);
+ } while (src < end);
return OK;
}
@@ -321,11 +321,11 @@ err_t verify(uint8_t *dst, uint8_t *src, uint32_t length)
{
uint8_t *end = src + length;
- do {
+ do
+ {
if (*src++ != *dst++)
return FAIL;
- }
- while (src < end);
+ } while (src < end);
return OK;
}
@@ -358,7 +358,23 @@ void flasher_load(char *flasher_filename)
{
/* next pass: verify */
err = read_srecords(flasher_filename, &start_address, &length, verify);
+ if (err == OK)
+ {
+ xprintf("target successfully written and verified\r\n");
+ }
+ else
+ {
+ xprintf("verification failed\r\n");
+ }
}
+ else
+ {
+ xprintf("copy memory pass failed\r\n");
+ }
+ }
+ else
+ {
+ xprintf("check file pass failed\r\n");
}
}
else