-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
west: flash: stm32cubeprogrammer: Reset command line argument is wrong #53487
Comments
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Can you verify ? Here is a test sample (skipping parameters that are not of interest for current issue)
So test is configuring However, I can see that all board descriptions which provide stm32cubeprogrammer runner configuration are put as:
which seems indeed incorrect at first sight. Though, I've just made some tests and it seems to be a python courtesy to accept shorten parameter names:
So:
Did I miss something ? |
@mbolivar this seems like a bug, why is python allowing the command line arguments to be shortened? |
Seems you are right, this flag is enabled by default: https://docs.python.org/3/library/argparse.html#allow-abbrev |
@nordicjm Closing as this is not the bug you're looking for. |
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This adds supports for specifying if boards should be reset or not after an image has been flashed, this is most useful for sysbuild where multiple images are flashed and having one boot before all are flashed causes the debug interface to be disabled or faults, preventing correct operation of the firmware. Existing reset priority of runners that supported it has been maintained. This can be enabled per-board by creating a `flash_runner.yml` file in the board directory with a list named `board_delay_reset`, e.g. to delay an nRF5340 board from resetting whilst network core images are being flashed, or whilst application core images (secure and non-secure combined) are being flashed, the file contents would be similar to: board_delay_reset: - [ nrf5340dk_nrf5340_cpuapp, nrf5340dk_nrf5340_cpuapp_ns, ] - [ nrf5340dk_nrf5340_cpunet, ] Also fixes zephyrproject-rtos#53487 by using the correct argument for the stm32cubeprogrammer tests of "--reset-mode" instead of "--reset". Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Describe the bug
The tests for the stm32cubeprogrammer control reset by specifying
--reset <mode>
, however this is invalid, the actual argument is--reset-mode <mode>
therefore one can assume that the tests are not properly checking this argument as if they were, the tests would be failing. @erwango I will leave it to you to decide if you think this is a deficiency in the tests that need adding, however this bug is just for fixing the argument itself (which is failing due to a PR I have)Expected behavior
Command line argument should be correct (this bug)
Tests should actually validate the reset mode (not part of this bug)
Impact
Showstopper
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: