mbed-os-examples
/
mbed-os-example-mbed5-bootloader
.
Revision 34:bd38c669daa1, committed 2017-12-12
- Comitter:
- mbed_official
- Date:
- Tue Dec 12 16:30:15 2017 +0000
- Parent:
- 33:d2fe6e7ac404
- Child:
- 35:dc886a2245ff
- Commit message:
- Error if restrict_size is not set in json
If the target override restrict_size is not set in targets.json then
trigger an error when compiling. This gives a clear error message
to users rather than failing with only linker errors.
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-bootloader
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Dec 04 17:00:15 2017 +0000 +++ b/main.cpp Tue Dec 12 16:30:15 2017 +0000 @@ -5,6 +5,10 @@ #define SD_MOUNT_PATH "sd" #define FULL_UPDATE_FILE_PATH "/" SD_MOUNT_PATH "/" MBED_CONF_APP_UPDATE_FILE +#if !defined(POST_APPLICATION_ADDR) +#error "target.restrict_size must be set for your target in mbed_app.json" +#endif + //Pin order: MOSI, MISO, SCK, CS SDBlockDevice sd(MBED_CONF_APP_SD_CARD_MOSI, MBED_CONF_APP_SD_CARD_MISO, MBED_CONF_APP_SD_CARD_SCK, MBED_CONF_APP_SD_CARD_CS);