Repository navigation
Conversation
The Update firmware button ran FWUpdate without checking that it started, threw away its output and ignored a timeout. When FWUpdate was not installed, or did not finish in 30 seconds, the update was reported as complete although nothing was flashed. Every other failure showed the same "Confirm whether a PSOC debug board is connected" message. - Look for FWUpdate next to Device Catalog. When it is not installed, disable the button with a tooltip that says why, and report the folder that was searched if the update is started anyway. - Check that FWUpdate started, capture its output and show the exit code and output for each firmware variant that was tried. - Treat a timeout as a failure: stop FWUpdate, report it and do not try the next variant on a board in an unknown state. Allow 120 seconds instead of 30. - Report when the selected firmware version is not installed. - Docs: FWUpdate is not part of every installation; close TAC before updating the firmware. Signed-off-by: hangzqcom <hangz@qti.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In Device Catalog, Update firmware (
DeviceCatalog::on__firmwareUpdateBtn_clicked) runs the separateFWUpdateutility once for each firmware variant (LP030, then LP038), but:FWUpdatestarted. WhenFWUpdateis not installed,exitCode()of the process that never ran is0, so the button reports "Firmware Update Complete" although nothing was flashed;FWUpdateoutput and exit code;FWUpdateis reported as "Firmware Update Complete";FWUpdateis not built from this repository and is not included in every installation, so in those installations the button can never succeed.docs/getting-started/03-Test-Automation-Controller.mdalso says thatFWUpdatealways ships with QTAC.Root cause
Success was decided from
exitCode()alone (since 5eee72b).QProcess::exitCode()is also 0 when FWUpdate cannot be started or whenwaitForFinishedtimes out, and FWUpdate's output was discarded, so failures were reported as success or as one generic message.Fix
FWUpdateis looked up next to Device Catalog. If it is not there, the Update firmware button and the firmware selector stay disabled, with a tooltip explaining why. If the update is started anyway, the message names the folder that was searched.waitForStarted, merge stdout and stderr, and report the exit code and output for each variant that was tried.FWUpdateis stopped and no further variant is flashed. The timeout is raised from 30 to 120 seconds, because stopping a flash part way can leave the board unprogrammed.03-Test-Automation-Controller.mdand05-Device-Catalog.mdto say thatFWUpdatemay not be installed and that TAC should be closed before updating firmware.Testing
A test program compiles the real
DeviceCatalog.cppfrom each tree and runs it offscreen. It uses a fakeFWUpdate.exethat only records its arguments, and dummy firmware files in a temporary folder. No hardware is used.DeviceCatalogalso builds cleanly in the full Windows build.