Companion now able to use .dfu files for flashing radio firmware
This commit is contained in:
@@ -124,7 +124,7 @@ void FlashFirmwareDialog::on_firmwareLoad_clicked()
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Firmware File"), g.flashDir(), FLASH_FILES_FILTER);
|
||||
if (!fileName.isEmpty()) {
|
||||
fwName = fileName;
|
||||
if (!fwName.isEmpty() && !FirmwareInterface(fwName).isValid()) {
|
||||
if (!fwName.isEmpty() && !fwName.endsWith(".dfu") && !FirmwareInterface(fwName).isValid()) {
|
||||
QMessageBox::warning(this, tr("Warning"), tr("%1 may not be a valid firmware file").arg(fwName));
|
||||
}
|
||||
updateUI();
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
|
||||
#define HEX_FILES_FILTER "HEX files (*.hex);;"
|
||||
#define BIN_FILES_FILTER "BIN files (*.bin);;"
|
||||
#define DFU_FILES_FILTER "DFU files (*.dfu);;"
|
||||
#define EEPE_FILES_FILTER "EEPE EEPROM files (*.eepe);;"
|
||||
#define EEPROM_FILES_FILTER "EEPE files (*.eepe *.bin *.hex);;" EEPE_FILES_FILTER BIN_FILES_FILTER HEX_FILES_FILTER
|
||||
#define FLASH_FILES_FILTER "FLASH files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
|
||||
#define FLASH_FILES_FILTER "FLASH files (*.bin *.hex *.dfu);;" BIN_FILES_FILTER HEX_FILES_FILTER DFU_FILES_FILTER
|
||||
#define EXTERNAL_EEPROM_FILES_FILTER "EEPROM files (*.bin *.hex);;" BIN_FILES_FILTER HEX_FILES_FILTER
|
||||
#define ER9X_EEPROM_FILE_TYPE "ER9X_EEPROM_FILE"
|
||||
#define EEPE_EEPROM_FILE_HEADER "EEPE EEPROM FILE"
|
||||
|
||||
@@ -62,18 +62,20 @@ QStringList getAvrdudeArgs(const QString &cmd, const QString &filename)
|
||||
|
||||
QStringList getDfuArgs(const QString & cmd, const QString & filename)
|
||||
{
|
||||
QStringList arguments;
|
||||
QStringList args;
|
||||
burnConfigDialog bcd;
|
||||
QString memory = "0x08000000";
|
||||
if (cmd == "-U") {
|
||||
memory.append(QString(":%1").arg(MAX_FSIZE));
|
||||
}
|
||||
arguments << bcd.getDFUArgs() << "--dfuse-address" << memory; // removed for Horus, is it really needed? << "-d" << "0483:df11";
|
||||
args << bcd.getDFUArgs();
|
||||
if (!filename.endsWith(".dfu")) {
|
||||
args << "--dfuse-address" << memory;
|
||||
}
|
||||
// removed for Horus, is it really needed? args << "-d" << "0483:df11";
|
||||
QString fullcmd = cmd + filename;
|
||||
|
||||
arguments << "" << fullcmd;
|
||||
|
||||
return arguments;
|
||||
args << "" << fullcmd;
|
||||
return args;
|
||||
}
|
||||
|
||||
QStringList getSambaArgs(const QString &tcl)
|
||||
|
||||
Reference in New Issue
Block a user