- 
                Notifications
    You must be signed in to change notification settings 
- Fork 16
Improve support for DISCO_L475VG_IOT01A #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Mbed OS builds .bin images by default for most targets, but many targets (e.g. ST targets running the latest ST-LINK firmware) also support .hex files, making this demo much easier to prepare. In case a target doesn't support .hex files, README.md already contains steps for merging .hex files into a single one and converting it to a .bin file.
The majority of flash devices support reading single bytes without alignment concerns. The config `mcuboot.read-granularity` enables additional code to handle read alignment, and it comes with a slight code size and performance overhead.
This matches the responding change in mbed-mcuboot-blinky.
| "mcuboot.scratch-size": "0x20000", | ||
| "mcuboot.max-img-sectors": "0x180", | ||
| "mcuboot.read-granularity": 1, | ||
| "qspif.QSPI_MIN_PROG_SIZE": 1 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There doesn't seem to be a default for this in targets.json. Could the absence of this cause bd r/w to fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default for all targets is defined to be 1 here: https://github.com/ARMmbed/mbed-os/blob/f6e165febec105c042137a4d1bf663a58968aac8/storage/blockdevice/COMPONENT_QSPIF/mbed_lib.json#L21
So DISCO_L475VG_IOT01A has it set to 1.
Also, we can remove the override for EP_AGORA and NRF52840_DK too, because they both inherit MCU_NRF52840 which is already set to 4: https://github.com/ARMmbed/mbed-os/blob/f6e165febec105c042137a4d1bf663a58968aac8/storage/blockdevice/COMPONENT_QSPIF/mbed_lib.json#L40
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a commit to further clean this up for MCU_NRF52840
| Unrelated to the PR: why exclude  | 
The latest Mbed OS already has `qspif.QSPI_MIN_PROG_SIZE` set to 4 for MCU_NRF52840 which is the base target of NRF52840_DK and EP_AGORA.
| 
 @AGlass0fMilk Presumably this is to reduce code size? MCUboot needs crypto APIs from mbedtls (which is in the  | 
| 
 @noonfom @LDong-Arm The nRF52840 CC310 driver has never worked properly for me and causes hard faults. If you can test it with CC310 enabled and do not encounter hard faults we can re-enable it. | 
Mbed OS builds .bin images by default for most targets, but many targets (e.g. ST targets running the latest ST-LINK firmware) also support .hex files, making this demo much easier to prepare. In case a target doesn't support .hex files, README.md already contains steps for merging .hex files into a single one and converting it to a .bin file.
The majority of flash devices support reading single bytes without alignment concerns. The config
mcuboot.read-granularityenables additional code to handle read alignment, and it comes with a slight code size and performance overhead. So disable it on DISCO_L475VG_IOT01A.Also update README for AGlass0fMilk/mbed-mcuboot-blinky#4.
@AGlass0fMilk