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 2015/11/10 21:49:44 UTC
incubator-mynewt-larva git commit: Increase image header size to 32
bytes. objcopy does not produce correct .bin version when it was 28.
Repository: incubator-mynewt-larva
Updated Branches:
refs/heads/master cc420b96d -> ae8370a1c
Increase image header size to 32 bytes. objcopy does not produce
correct .bin version when it was 28.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/ae8370a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/ae8370a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/ae8370a1
Branch: refs/heads/master
Commit: ae8370a1cb9cf11f52518f46c02324a62365bbe1
Parents: cc420b9
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 10 12:45:47 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Nov 10 12:45:47 2015 -0800
----------------------------------------------------------------------
hw/bsp/olimex_stm32-e407_devboard/run_from_loader.ld | 6 +++---
libs/bootutil/include/bootutil/image.h | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/ae8370a1/hw/bsp/olimex_stm32-e407_devboard/run_from_loader.ld
----------------------------------------------------------------------
diff --git a/hw/bsp/olimex_stm32-e407_devboard/run_from_loader.ld b/hw/bsp/olimex_stm32-e407_devboard/run_from_loader.ld
index 9f706f6..7e02215 100755
--- a/hw/bsp/olimex_stm32-e407_devboard/run_from_loader.ld
+++ b/hw/bsp/olimex_stm32-e407_devboard/run_from_loader.ld
@@ -19,9 +19,9 @@
/* Linker script to configure memory regions. */
MEMORY
{
- FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 0x60000 /* First image slot. */
+ FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 384K /* First image slot. */
CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
- RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x20000
+ RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
}
/* Linker script to place sections and symbol values. Should be used together
@@ -64,7 +64,7 @@ SECTIONS
/* Reserve space at the start of the image for the header. */
.imghdr (NOLOAD):
{
- . = . + 0x1c;
+ . = . + 0x20;
} > FLASH
.text :
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/ae8370a1/libs/bootutil/include/bootutil/image.h
----------------------------------------------------------------------
diff --git a/libs/bootutil/include/bootutil/image.h b/libs/bootutil/include/bootutil/image.h
index ee4a563..55a5587 100644
--- a/libs/bootutil/include/bootutil/image.h
+++ b/libs/bootutil/include/bootutil/image.h
@@ -4,7 +4,7 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@@ -26,7 +26,7 @@
#define IMAGE_HEADER_CRC_OFFSET 4
-#define IMAGE_HEADER_SIZE 28
+#define IMAGE_HEADER_SIZE 32
struct image_version {
uint8_t iv_major;
@@ -43,6 +43,7 @@ struct image_header {
uint32_t ih_img_size; /* Does not include header. */
uint32_t ih_flags;
struct image_version ih_ver;
+ uint32_t _pad;
};
_Static_assert(sizeof(struct image_header) == IMAGE_HEADER_SIZE,