-
Notifications
You must be signed in to change notification settings - Fork 515
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
[Gen 3] 256KB application support #2322
Conversation
constexpr uint32_t BUF_SIZE = 250 * 1024;
const uint8_t buf[BUF_SIZE] = {};
void setup() {
for (uint32_t i = 0; i < BUF_SIZE; i++) {
Serial.printf("%d", buf[i]);
}
}
Also, after updating the bootloader, system part1 and the 256K user application, their module version isn't bumped. Should we bump the versions in this branch or postpone to when we cut a release? |
fetch_module(module, bounds, false, MODULE_VALIDATION_INTEGRITY); | ||
if (bounds->module_function == MODULE_FUNCTION_USER_PART && user_module_found) { | ||
// Make sure that we report only single user part (either 128KB or 256KB) in the | ||
// list of modules. |
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.
Let's make it clear in this comment that if both user modules are present, the compatibility one will take precedence and be the only user module returned in the modules info.
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
{ | ||
return module_user_part_validated; | ||
return system_mode() != SAFE_MODE; |
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.
👍
@@ -368,23 +368,31 @@ int FLASH_CopyMemory(flash_device_t sourceDeviceID, uint32_t sourceAddress, | |||
return FLASH_ACCESS_RESULT_BADARG; | |||
} | |||
#if SOFTDEVICE_MBR_UPDATES | |||
if (module_function == MODULE_FUNCTION_BOOTLOADER && destinationAddress == USER_FIRMWARE_IMAGE_LOCATION) { | |||
if (module_function == MODULE_FUNCTION_BOOTLOADER && destinationAddress == USER_FIRMWARE_IMAGE_LOCATION_COMPAT) { |
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.
Note that verify_module()
still checks that the bootloader's destination address is USER_FIRMWARE_IMAGE_LOCATION
and not USER_FIRMWARE_IMAGE_LOCATION_COMPAT
.
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.
Good catch, thanks!
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.
Double checked bootloader updates. Works fine with system-part out of this branch and older releases as well.
…ence of both legacy and 256KB applications
Description
Refer to the SDD
NOTE: this PR also enables LTO on all Gen 3 platforms when building system parts.
NOTE: do not use current version of CLI to flash new 256KB binaries over DFU, this will fail
Steps to Test
NOTE:
3.1.0-alpha.1
and3.1.0-alpha.2
releases available on staging can be used for testing (test/v3.1.0-alpha.1
andtest/v3.1.0-alpha.2
are the respective branches). The releases are fully available on staging and appropriate version of DS is also deployed there.particle serial inspect
should correctly report either type of an application (index = 1, 128KB max) (index = 2, 256KB max)Example App
N/A
References
Completeness