forked from davidsaada/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project hawthorn -Binary size reduction (ARMmbed#76)
* Remove pal_crypto calls and call mbedtls api directly * Add the mbed-printf library By using this library, the code size of the bootloader will be smaller. For instructions on how to use it, check the README file of the library. * Use arm update client insecure rot * Use sd blockdevice as firmware storage (ARMmbed#60) Thus eliminating the need for a filesystem, reducing code size. Fix bug where we are hashing past the end of firmware * Trim buffer before read So that we don't attempt an read beyond the end of file. Remove no longer needed include. * Use mbed configuration system to configure blockdevice offset MBED_CONF_UPDATE_CLIENT_STORAGE_ADDRESS and MBED_CONF_UPDATE_CLIENT_STORAGE_SIZE Are used directly by the implementation pal-blockdevice This removes the need of slicing block device layer * Update mbed-printf to solve a compile error In c99 <stdbool.h> needs to be included explicitly to use the bool keyword on some platform which does not include this automatically, compilation fails. * In release script use custom compiler profile To use custom version of printf from mbed-printf * Remove PAL (ARMmbed#63) * Remove mbed client PAL dependency from bootloader * import update-client-common changes to remove pal refs * Remove mbed client PAL from bootloader (ARMmbed#65) * remove PAL from bootloader test * Fix/power cut tests (ARMmbed#66) * Trim buffer so we don't read beyond end of storage * Get around limitation of pal-blockdevice Where it cannot handle write buffer size which is not page size aligned correctly * Fix an bug when trimming buffers * Add blockdevice configuration to test mbed_app.json * Pull in fix for setting buffer size * Remove RTOS and other mbed-os components This PR removes the RTOS and other mbed-os components from the bootloader code: 1. .mbedignore contains a list of mbed-os directories that are now ignored. There are other components ignored besides the RTOS (for example mbed-printf). 2. "Mutex=PlatformMutex" in mbed_app.json is needed to fix an issue in the sd-driver library (see PelionIoT/sd-driver#68 for details). 3. the .lib updates contain fixes related to compiling the code in debug mode without mbed-printf. With these codes and using arm-none-eabi-gcc 4.9.3 (GCC ARM embedded) with the release profile in `mbed-printf/profiles/release.json`, the size of the bootloader binary image is 32328 bytes. * Allow greentea compilation (needed by tests) * greentea compilation fix for tests * Use the ARMCC fix for update-client-pal-flashiap * Enable nano.specs for GCC This will result in additional size savings. Also enable this new profile in both CircleCI and Jenkins. * Disable fflush Remove the fflush function from the image: - disable the "stdio flush at exit" option in mbed-os. - disable `tr_flush` if mbed-printf is used, since mbed-printf is not buffered. * Feature/depend on hub (ARMmbed#75) * Depend on update-client-hub which includes all relavent modules in this unified repo * Modify release script to take a compiler profile argument * Use buffer size member as indication of how many bytes need to be read. Updage firmware even if the version is the same, if the active firmware is corrupt. * Fix compilation for ODIN Clean up mbedtls config file and remove unnecessary algorithms * Set MBEDTLS_SHA256_SMALLER to reduce binary size saves 1.3k * Update hub to pull in: Conditional compilation of blockdevice IAR compilation fixes * Remove dependency on cloud client depend on update client hub directly * Use tiny.json as default build profile for release * Turn on blockdevice for power cut tests * Improve tests Build tests only for ARMCC profile Use ci raas user name and pass word Use domain name istead of ip for raas server * remove instructions on mbed-printf build profile replaced by tiny.json
- Loading branch information
Showing
25 changed files
with
225 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
*/test/* | ||
mbed-cloud-client-internal/factory-configurator-client/* | ||
mbed-cloud-client-internal/mbed-client/* | ||
mbed-cloud-client-internal/mbed-cloud-client/* | ||
mbed-cloud-client-internal/source/* | ||
mbed-cloud-client-internal/update-client-hub/source/* | ||
mbed-cloud-client-internal/update-client-hub/modules/atomic-queue/* | ||
mbed-cloud-client-internal/update-client-hub/modules/control-center/* | ||
mbed-cloud-client-internal/update-client-hub/modules/device-identity/* | ||
mbed-cloud-client-internal/update-client-hub/modules/firmware-manager/* | ||
mbed-cloud-client-internal/update-client-hub/modules/lwm2m-mbed/* | ||
mbed-cloud-client-internal/update-client-hub/modules/manifest-manager/* | ||
mbed-cloud-client-internal/update-client-hub/modules/monitor/* | ||
mbed-cloud-client-internal/update-client-hub/modules/source/* | ||
mbed-cloud-client-internal/update-client-hub/modules/source-http/* | ||
mbed-cloud-client-internal/update-client-hub/modules/source-http-socket/* | ||
mbed-cloud-client-internal/update-client-hub/modules/source-manager/* | ||
mbed-cloud-client-internal/update-client-hub/modules/common/source/arm_uc_scheduler.c | ||
mbed-os/rtos/* | ||
mbed-os/features/FEATURE_CLIENT/* | ||
mbed-os/features/FEATURE_COMMON_PAL/* | ||
mbed-os/features/FEATURE_UVISOR/* | ||
mbed-os/features/net/* | ||
mbed-os/features/netsocket/* | ||
mbed-os/features/storage/* | ||
mbed-os/events/* | ||
update-client-hub/source/* | ||
update-client-hub/modules/atomic-queue/* | ||
update-client-hub/modules/control-center/* | ||
update-client-hub/modules/firmware-manager/* | ||
update-client-hub/modules/manifest-manager/* | ||
update-client-hub/modules/pal-linux/* | ||
update-client-hub/modules/source/* | ||
update-client-hub/modules/source-http-socket/* | ||
update-client-hub/modules/device-identity/* | ||
update-client-hub/modules/lwm2m-mbed/* | ||
update-client-hub/modules/monitor/* | ||
update-client-hub/modules/pal-filesystem/* | ||
update-client-hub/modules/pal-target-specific/* | ||
update-client-hub/modules/source-http/* | ||
update-client-hub/modules/source-manager/* | ||
update-client-hub/modules/common/source/arm_uc_scheduler.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory contains two empty header files, meant as a temporary fix for greentea compilation when the RTOS is not enabled. See https://github.com/ARMmbed/mbed-bootloader-internal/pull/6 for more details. |
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/ARMmbed/mbed-printf/#613c02ed3eeb09b86c7d0c6c9ae0059bd0c31ae1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.