Skip to content

Commit

Permalink
Added config for device code (flash load)
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Apr 30, 2024
1 parent 0c326ed commit 8d8cf76
Show file tree
Hide file tree
Showing 6 changed files with 333 additions and 267 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,8 @@ add_executable(${PROJECT_NAME}
${VSCP_PATH}/src/vscp/common/vscp_bootdevice.cpp
${VSCP_PATH}/src/vscp/common/vscp_bootdevice_pic1.h
${VSCP_PATH}/src/vscp/common/vscp_bootdevice_pic1.cpp
${VSCP_PATH}/src/vscp/common/vscp_bootdevice_vscp.h
${VSCP_PATH}/src/vscp/common/vscp_bootdevice_vscp.cpp
${VSCP_PATH}/src/vscp/common/vscpunit.h
${VSCP_PATH}/src/vscp/common/vscpunit.cpp
${VSCP_PATH}/src/common/sockettcp.h
Expand Down
4 changes: 3 additions & 1 deletion src/bootloaderwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ void
CWizardPageFlash::flashDevice(void)
{
int rv;
vscpworks* pworks = (vscpworks*)QCoreApplication::instance();

// Lets rock'n roll
spdlog::info("Starting flash device process.");
Expand Down Expand Up @@ -1150,7 +1151,8 @@ CWizardPageFlash::flashDevice(void)
spdlog::info("Init remote device");
addStatusMessage("Init remote device.");
QApplication::setOverrideCursor(Qt::WaitCursor);
if (VSCP_ERROR_SUCCESS != (rv = boot.deviceInit())) {
cguid our_guid;
if (VSCP_ERROR_SUCCESS != (rv = boot.deviceInit(our_guid, 0, pworks->m_firmware_devicecode_required))) {
QApplication::restoreOverrideCursor();
spdlog::error("Failed to set device into boot mode rv={}", rv);
addStatusMessage(QString("Failed to init remote device: rv = {%0}.").arg(rv));
Expand Down
Loading

0 comments on commit 8d8cf76

Please sign in to comment.