You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/08/19 22:12:06 UTC

[07/12] incubator-mynewt-core git commit: boot/bootutil; remove debug console use from bootloader.

boot/bootutil; remove debug console use from bootloader.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/2331b503
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/2331b503
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/2331b503

Branch: refs/heads/develop
Commit: 2331b503e4421e82aa67033752e66b4c8ab3dd72
Parents: 1869d9b
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Fri Aug 19 10:45:44 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Fri Aug 19 15:11:50 2016 -0700

----------------------------------------------------------------------
 apps/boot/pkg.yml                 | 2 +-
 apps/boot/src/boot.c              | 2 --
 libs/bootutil/src/bootutil_misc.c | 6 ------
 3 files changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/2331b503/apps/boot/pkg.yml
----------------------------------------------------------------------
diff --git a/apps/boot/pkg.yml b/apps/boot/pkg.yml
index b877557..2cd19f5 100644
--- a/apps/boot/pkg.yml
+++ b/apps/boot/pkg.yml
@@ -33,7 +33,7 @@ pkg.deps:
     - libs/mbedtls
     - libs/os
     - libs/util
-    - libs/console/full
+    - libs/console/stub
 
 pkg.cflags: -DLOG_LEVEL=255
 pkg.cflags.NFFS:

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/2331b503/apps/boot/src/boot.c
----------------------------------------------------------------------
diff --git a/apps/boot/src/boot.c b/apps/boot/src/boot.c
index 37172ba..8ffcb1f 100755
--- a/apps/boot/src/boot.c
+++ b/apps/boot/src/boot.c
@@ -97,8 +97,6 @@ main(void)
 
     conf_init();
 
-    console_init(NULL);
-    console_printf("\nboot_loader\n");
 #ifdef BOOT_SERIAL
     /*
      * Configure a GPIO as input, and compare it against expected value.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/2331b503/libs/bootutil/src/bootutil_misc.c
----------------------------------------------------------------------
diff --git a/libs/bootutil/src/bootutil_misc.c b/libs/bootutil/src/bootutil_misc.c
index 22ac921..6539bdd 100644
--- a/libs/bootutil/src/bootutil_misc.c
+++ b/libs/bootutil/src/bootutil_misc.c
@@ -24,7 +24,6 @@
 #include <hal/flash_map.h>
 #include <hal/hal_bsp.h>
 #include <os/os.h>
-#include <console/console.h>
 #include "bootutil/image.h"
 #include "bootutil/bootutil_misc.h"
 #include "bootutil_priv.h"
@@ -248,20 +247,17 @@ boot_read_status(struct boot_status *bs)
     if (bit.bit_copy_start == BOOT_IMG_MAGIC && bit.bit_copy_done == 0xff) {
         boot_magic_loc(0, &flash_id, &off);
         boot_read_status_bytes(bs, flash_id, off);
-        console_printf("status in slot0, %lu/%u\n", bs->idx, bs->state);
         return 1;
     }
     boot_scratch_magic(&bit);
     if (bit.bit_copy_start == BOOT_IMG_MAGIC && bit.bit_copy_done == 0xff) {
         boot_scratch_loc(&flash_id, &off);
         boot_read_status_bytes(bs, flash_id, off);
-        console_printf("status in scratch, %lu/%u\n", bs->idx, bs->state);
         return 1;
     }
     return 0;
 }
 
-#include <hal/hal_system.h>
 
 /**
  * Writes the supplied boot status to the flash file system.  The boot status
@@ -291,8 +287,6 @@ boot_write_status(struct boot_status *bs)
     }
     off -= ((3 * bs->elem_sz) * bs->idx + bs->elem_sz * (bs->state + 1));
 
-    console_printf("status write, %lu/%u -> %lx\n", bs->idx, bs->state, off);
-
     val = bs->state;
     hal_flash_write(flash_id, off, &val, sizeof(val));