-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
boards: st: Minimize usage of "--erase" stm32cubeprogrammer option #69582
Comments
As a follow up action:
|
The real solution should be that flashing never erases the full flash of the device (just the sectors being programmed) unless the |
Makes sense. The issue is that erase is required in CI, at least in specific tests. So we need to check how to do this first. |
@PerMac was asking about this recently and my opinion it's wrong for any test to not do a full erase, it contaminates the test with undefined data. If you have 2 tests, one writes something and another checks for data in a certain area and there's no erase in-between, that test case is not valid because you cannot be sure the previous test isn't giving a false positive/negative |
We're in line. This is why we have these commands in the first place. So before removing the default "--erase" in boards.cmake, we need to find how to force them with twister. This wasn't possible when we looked at it, but potentially this is now possible |
CONFIG_BOOTLOADER_MCUBOOT=n
We run twister in CI with extra: |
I was thinking that maybe marking only tests that require an erase in their yamls might be the way to go, so that stuff like mcuboot or sysbuild are not screwed in a common run, but I also understand the reasoning behind getting the clean state every time. Then sysbuild is to be fixed first and |
A `west flash` with STLink must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. zephyrproject-rtos#69582
A `west flash` with STLink must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. zephyrproject-rtos#69582
A `west flash` with STLink must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. zephyrproject-rtos#69582
A `west flash` with STLink must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. zephyrproject-rtos#69582
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. zephyrproject-rtos#69582
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 *note: This is my first contribution to the project* Signed-off-by: Alex Fabre <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 *note: This is my first contribution to the project* Signed-off-by: Alex Fabre <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 *note: This is my first contribution to the project* Signed-off-by: Alex Fabre <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 *note: This is my first contribution to the project* Signed-off-by: Alex Fabre <[email protected]>
@PerMac About this, I've been trying to use Also, it seems that it all depends on runner supporting --erase, which isn't the case for openocd, but which should work for stm32cubeprogrammer which is easy to switch to (if |
@erwango we also use using the same twister's command but having |
@PerMac Ok, it seems the only issue was coming from openocd not supporting |
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 *note: This is my first contribution to the project* Signed-off-by: Alex Fabre <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 Due to CI tests errors, the correction is not applied on eval board `b_u585i_iot02a`. See following issue: zephyrproject-rtos#75164 Signed-off-by: Alex Fabre <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: #69582 Due to CI tests errors, the correction is not applied on eval board `b_u585i_iot02a`. See following issue: #75164 Signed-off-by: Alex Fabre <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos/zephyr#69582 Due to CI tests errors, the correction is not applied on eval board `b_u585i_iot02a`. See following issue: zephyrproject-rtos/zephyr#75164 (cherry picked from commit 9b9d455) Original-Signed-off-by: Alex Fabre <[email protected]> GitOrigin-RevId: 9b9d455 Change-Id: I255ff9585942b264d0cd87092e5bf6890c96bd75 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5672378 Reviewed-by: Fabio Baltieri <[email protected]> Tested-by: ChromeOS Prod (Robot) <[email protected]> Reviewed-by: Eric Yilun Lin <[email protected]> Commit-Queue: Fabio Baltieri <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 Due to CI tests errors, the correction is not applied on eval board `b_u585i_iot02a`. See following issue: zephyrproject-rtos#75164 Signed-off-by: Alex Fabre <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 Due to CI tests errors, the correction is not applied on eval board `b_u585i_iot02a`. See following issue: zephyrproject-rtos#75164 Signed-off-by: Alex Fabre <[email protected]>
Problem: When flashing a multi-image project with STLink through sysbuild, the flash utility is told to erase the whole flash between each single image flash. Resulting in a partial flash where only the last image is effectively stored on flash... Correction: A `west flash` must not implicitly perform a mass erase on its own. If a flash erase is required, the option has to be passed manually. The problem is discussed in the following issue: zephyrproject-rtos#69582 Due to CI tests errors, the correction is not applied on eval board `b_u585i_iot02a`. See following issue: zephyrproject-rtos#75164 Signed-off-by: Alex Fabre <[email protected]>
Fixed: #74627 |
Is your enhancement proposal related to a problem? Please describe.
On stm32 boards, following stm32cubeprogrammer configuration is commonly found:
This raises an issue when flashing back to back a bootloader and an application image.
Describe the solution you'd like
Use the following:
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or graphics (drag-and-drop an image) about the feature request here.
The text was updated successfully, but these errors were encountered: