├── qavrdude ├── devicedb.sqlite ├── icons │ ├── fuse-64.png │ ├── Qt-logo.svg_.png │ ├── icons.qrc │ ├── Usb-svg.svg │ ├── go-previous.svg │ ├── go-next.svg │ ├── edit-delete.svg │ ├── help-about.svg │ ├── gtk-info.svg │ ├── utilities-terminal.svg │ ├── edit-clear.svg │ ├── locked.svg │ ├── gconf-editor.svg │ └── avr.svg ├── partdeschandler.cpp ├── partdeschandler.h ├── hexlineedit.h ├── build_package.sh ├── TODO.txt ├── main.cpp ├── settings.h ├── qavrdude.pro ├── dudeparts.txt ├── avrpart.h ├── fusemodel.h ├── avrprogrammer.h ├── settings.cpp ├── bitfielddelegate.h ├── fusedelegate.h ├── mainwindow.h ├── bitfieldmodel.h ├── bitfielddelegate.cpp ├── fusedelegate.cpp ├── bitfieldmodel.cpp └── fusemodel.cpp ├── xml_converter ├── README ├── xml_converter.pro ├── main.cpp ├── sql.sql ├── mainwindow.h ├── xmlconverter.h ├── mainwindow.cpp ├── mainwindow.ui └── xmlconverter.cpp ├── .gitignore └── README.md /qavrdude/devicedb.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/avrdude-qt-gui/master/qavrdude/devicedb.sqlite -------------------------------------------------------------------------------- /qavrdude/icons/fuse-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/avrdude-qt-gui/master/qavrdude/icons/fuse-64.png -------------------------------------------------------------------------------- /qavrdude/icons/Qt-logo.svg_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/probonopd/avrdude-qt-gui/master/qavrdude/icons/Qt-logo.svg_.png -------------------------------------------------------------------------------- /xml_converter/README: -------------------------------------------------------------------------------- 1 | The XML_converter is an application for converting the Atmel provided part description XML files to an SQLITE database 2 | -------------------------------------------------------------------------------- /qavrdude/partdeschandler.cpp: -------------------------------------------------------------------------------- 1 | #include "partdeschandler.h" 2 | 3 | PartDescHandler::PartDescHandler(QObject *parent) : 4 | QObject(parent) 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /qavrdude/partdeschandler.h: -------------------------------------------------------------------------------- 1 | #ifndef PARTDESCHANDLER_H 2 | #define PARTDESCHANDLER_H 3 | 4 | #include 5 | #include 6 | class PartDescHandler : public QObject 7 | { 8 | Q_OBJECT 9 | 10 | private: 11 | QDomDocument xmlFile; 12 | public: 13 | explicit PartDescHandler(QObject *parent = 0); 14 | 15 | 16 | signals: 17 | 18 | public slots: 19 | 20 | }; 21 | 22 | #endif // PARTDESCHANDLER_H 23 | -------------------------------------------------------------------------------- /qavrdude/hexlineedit.h: -------------------------------------------------------------------------------- 1 | #ifndef HEXLINEEDIT_H 2 | #define HEXLINEEDIT_H 3 | 4 | #include 5 | 6 | class HexLineEdit : public QLineEdit 7 | { 8 | Q_OBJECT 9 | public: 10 | HexLineEdit(QWidget * parent = 0) : QLineEdit(parent) {} 11 | protected: 12 | void mousePressEvent(QMouseEvent *event) {emit clicked(); QLineEdit::mousePressEvent(event);} 13 | signals: 14 | void clicked(); 15 | }; 16 | 17 | #endif // HEXLINEEDIT_H 18 | -------------------------------------------------------------------------------- /qavrdude/build_package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | qmake 4 | make 5 | 6 | cp -r package package_build 7 | find package_build \( -name ".svn" -o -name "*~" \) -exec rm -rf {} + 8 | cp bin/qavrdude package_build/usr/bin/qavrdude 9 | echo "Installed-Size:"`du -sx --exclude DEBIAN package_build/ | sed -e 's/\([0-9]*\).*/\1/g'` >> package_build/DEBIAN/control 10 | chmod -R 555 package_build/DEBIAN/* 11 | dpkg-deb --build package_build qavrdude.deb 12 | rm -rf package_build 13 | 14 | -------------------------------------------------------------------------------- /qavrdude/TODO.txt: -------------------------------------------------------------------------------- 1 | Working: 2 | - Signature reading matching. 3 | - Reading the flash memory 4 | - Writing the flash memory 5 | - Verifying the flash memory 6 | - Reading the fuse bits 7 | - Reading writing verifyin the EEPROM 8 | 9 | Programmer related tasks 10 | - Easy programmer and port choosing 11 | 12 | Basic programming tasks: 13 | - Read HEX file 14 | - Write HEX file 15 | - Verify HEX file 16 | - Erase device 17 | - Get device signature 18 | 19 | FUSE related tasks: 20 | - Read write raw FUSE bits 21 | - Easy gui to modify fuses 22 | 23 | -------------------------------------------------------------------------------- /xml_converter/xml_converter.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2011-12-10T19:48:04 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui sql xml 8 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 9 | 10 | OBJECTS_DIR = build 11 | MOC_DIR = build 12 | UI_DIR = build 13 | DESTDIR = bin 14 | TARGET = xml_converter 15 | TEMPLATE = app 16 | 17 | 18 | SOURCES += main.cpp\ 19 | mainwindow.cpp \ 20 | xmlconverter.cpp 21 | 22 | HEADERS += mainwindow.h \ 23 | xmlconverter.h 24 | 25 | FORMS += mainwindow.ui 26 | 27 | 28 | -------------------------------------------------------------------------------- /qavrdude/icons/icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | edit-clear.svg 4 | gconf-editor.svg 5 | gtk-info.svg 6 | locked.svg 7 | utilities-terminal.svg 8 | edit-delete.svg 9 | preferences-system.svg 10 | fuse-64.png 11 | read_avr.svg 12 | write_avr.svg 13 | avr.svg 14 | Usb-svg.svg 15 | help-about.svg 16 | Qt-logo.svg_.png 17 | 18 | 19 | -------------------------------------------------------------------------------- /qavrdude/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "mainwindow.h" 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 9 | QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); 10 | QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); 11 | #endif 12 | 13 | QCoreApplication::setOrganizationName("MM"); 14 | QCoreApplication::setApplicationName("QAvrdude"); 15 | QCoreApplication::setApplicationVersion("0.1"); 16 | 17 | QApplication a(argc, argv); 18 | MainWindow w; 19 | w.show(); 20 | return a.exec(); 21 | } 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # C++ objects and libs 2 | 3 | *.slo 4 | *.lo 5 | *.o 6 | *.a 7 | *.la 8 | *.lai 9 | *.so 10 | *.dll 11 | *.dylib 12 | 13 | # Qt-es 14 | 15 | object_script.*.Release 16 | object_script.*.Debug 17 | *_plugin_import.cpp 18 | /.qmake.cache 19 | /.qmake.stash 20 | *.pro.user 21 | *.pro.user.* 22 | *.qbs.user 23 | *.qbs.user.* 24 | *.moc 25 | moc_*.cpp 26 | moc_*.h 27 | qrc_*.cpp 28 | ui_*.h 29 | *.qmlc 30 | *.jsc 31 | Makefile* 32 | *build-* 33 | 34 | # Qt unit tests 35 | target_wrapper.* 36 | 37 | # QtCreator 38 | 39 | *.autosave 40 | 41 | # QtCtreator Qml 42 | *.qmlproject.user 43 | *.qmlproject.user.* 44 | 45 | # QtCtreator CMake 46 | CMakeLists.txt.user* 47 | 48 | 49 | -------------------------------------------------------------------------------- /xml_converter/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "mainwindow.h" 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 9 | QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); 10 | QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); 11 | #endif 12 | 13 | QCoreApplication::setOrganizationName("MM"); 14 | QCoreApplication::setApplicationName("QAvrdude-xml-converter"); 15 | QCoreApplication::setApplicationVersion("0.1"); 16 | 17 | QApplication a(argc, argv); 18 | MainWindow w; 19 | w.show(); 20 | 21 | return a.exec(); 22 | } 23 | -------------------------------------------------------------------------------- /xml_converter/sql.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE "devices" 3 | ( 4 | "id" INTEGER PRIMARY KEY AUTOINCREMENT, 5 | "name" TEXT 6 | ); 7 | 8 | CREATE TABLE "device_register_types" 9 | ( 10 | "id" INTEGER PRIMARY KEY AUTOINCREMENT, 11 | "name" TEXT 12 | ); 13 | 14 | 15 | CREATE TABLE "devices_registers" 16 | ( 17 | "id" INTEGER PRIMARY KEY AUTOINCREMENT, 18 | "device_id" INT , 19 | "type_id" INT 20 | ); 21 | 22 | CREATE TABLE "bitfields_enums" 23 | ( 24 | "id" INTEGER PRIMARY KEY AUTOINCREMENT, 25 | "name" TEXT , 26 | "mask" INT , 27 | "value" INT 28 | ); 29 | 30 | 31 | CREATE TABLE "bitfields" 32 | ( 33 | "id" INTEGER PRIMARY KEY AUTOINCREMENT, 34 | "enum_id" INT , 35 | "mask" INT , 36 | "register_id" INT 37 | ); 38 | 39 | 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This program is a cross platform graphical interface to the Avrdude programmer. I wanted to make it very similar to the AVRStudio's programming dialog. It only uses Qt so It should run fine on Linux, Windows, Mac Os, and may other OS's which supported by Qt. The program uses the xml files provided with the AVR Studio, to provide easy interface to modify the fuse bits for example. In the revisions > 27 there is a support for using an SQLite database extracted from the AVR studio XML files. 2 | 3 | The project is very early status, so I do not released anything to the downloads yet. 4 | As soon as it achieve the release status I will make Debian packages and static Windows builds to it. Until then you could checkout the latest code from the svn repo and compile it for yourself. 5 | 6 | -------------------------------------------------------------------------------- /xml_converter/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | 7 | #include "xmlconverter.h" 8 | 9 | namespace Ui { 10 | class MainWindow; 11 | } 12 | 13 | class MainWindow : public QMainWindow 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit MainWindow(QWidget *parent = 0); 19 | ~MainWindow(); 20 | 21 | private slots: 22 | void on_pushButtonGo_clicked(); 23 | 24 | void on_pushButtonBrowseSQLITE_clicked(); 25 | 26 | void on_pushButtonBrowseXML_clicked(); 27 | 28 | void logMessage(QString str); 29 | 30 | void on_pushButton_clicked(); 31 | 32 | private: 33 | Ui::MainWindow *ui; 34 | QSettings settings; 35 | XMLConverter converter; 36 | }; 37 | 38 | #endif // MAINWINDOW_H 39 | -------------------------------------------------------------------------------- /qavrdude/settings.h: -------------------------------------------------------------------------------- 1 | #ifndef SETTINGS_H 2 | #define SETTINGS_H 3 | 4 | #include 5 | #include 6 | class Settings : public QObject 7 | { 8 | Q_OBJECT 9 | public: 10 | enum DeviceDataType { 11 | DeviceDb_XML = 0, 12 | DeviceDb_SQLite 13 | }; 14 | 15 | explicit Settings(QObject *parent = 0); 16 | ~Settings(); 17 | QString dudePath; 18 | QString xmlsPath, sqlitePath; 19 | bool showAvrDudeOutPut; 20 | bool particularProgOptions; 21 | QString programmerOptions; 22 | QString programmerName; 23 | QString programmerPort; 24 | QString partName; 25 | QString flashHexFile; 26 | QString eepromHexFile; 27 | bool rememberLastTab; 28 | int defaultTabIndex; 29 | int lastTabIndex; 30 | bool noicons; 31 | DeviceDataType deviceData; 32 | private: 33 | QSettings *settingsIni; 34 | signals: 35 | 36 | public slots: 37 | 38 | }; 39 | 40 | #endif // SETTINGS_H 41 | -------------------------------------------------------------------------------- /xml_converter/xmlconverter.h: -------------------------------------------------------------------------------- 1 | #ifndef XMLCONVERTER_H 2 | #define XMLCONVERTER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | 14 | class XMLConverter : public QObject 15 | { 16 | Q_OBJECT 17 | public: 18 | explicit XMLConverter(QObject *parent = 0); 19 | bool convert(QString sqlite, QString xmlsDir); 20 | bool truncate(QString sqlite); 21 | 22 | QString error() const {return errorString;} 23 | signals: 24 | void logMessage(QString msg); 25 | public slots: 26 | 27 | private: 28 | bool sqlError(QSqlQuery *query); 29 | bool parseFile(QString file); 30 | 31 | QFile domFile; 32 | QDomDocument domDoc; 33 | QString errorString; 34 | QSqlDatabase database; 35 | 36 | QTime startTime; 37 | 38 | void parseRegisterDetailsFromNode(QDomNode registersNode, int deviceId, QSqlQuery &query); 39 | void printTimeElapsed(); 40 | }; 41 | 42 | #endif // XMLCONVERTER_H 43 | -------------------------------------------------------------------------------- /qavrdude/qavrdude.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2009-10-12T12:12:02 4 | # 5 | #------------------------------------------------- 6 | 7 | TARGET = qavrdude 8 | TEMPLATE = app 9 | QT += xml sql 10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 11 | 12 | OBJECTS_DIR = build 13 | MOC_DIR = build 14 | UI_DIR = build 15 | RCC_DIR=build 16 | DESTDIR = bin 17 | 18 | SOURCES += main.cpp\ 19 | partdeschandler.cpp \ 20 | settings.cpp \ 21 | avrprogrammer.cpp \ 22 | avrpart.cpp \ 23 | mainwindow.cpp \ 24 | # fusemodel.cpp \ 25 | # fusedelegate.cpp \ 26 | bitfieldmodel.cpp \ 27 | bitfielddelegate.cpp 28 | 29 | HEADERS += \ 30 | partdeschandler.h \ 31 | settings.h \ 32 | avrprogrammer.h \ 33 | avrpart.h \ 34 | mainwindow.h \ 35 | # dudepartnos.h \ 36 | hexlineedit.h \ 37 | # fusemodel.h \ 38 | # fusedelegate.h \ 39 | bitfieldmodel.h \ 40 | bitfielddelegate.h 41 | 42 | FORMS += \ 43 | mainwindow.ui 44 | 45 | RESOURCES += \ 46 | icons/icons.qrc 47 | 48 | OTHER_FILES += \ 49 | TODO.txt 50 | -------------------------------------------------------------------------------- /xml_converter/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | MainWindow::MainWindow(QWidget *parent) : 9 | QMainWindow(parent), 10 | ui(new Ui::MainWindow) 11 | { 12 | ui->setupUi(this); 13 | ui->lineEditSQLITE->setText(settings.value("sqlitepath").toString()); 14 | ui->lineEditXMLDir->setText(settings.value("xmlspath").toString()); 15 | connect(&converter,SIGNAL(logMessage(QString)), this, SLOT(logMessage(QString))); 16 | } 17 | 18 | MainWindow::~MainWindow() 19 | { 20 | settings.setValue("sqlitepath", ui->lineEditSQLITE->text()); 21 | settings.setValue("xmlspath", ui->lineEditXMLDir->text()); 22 | delete ui; 23 | } 24 | 25 | void MainWindow::on_pushButtonGo_clicked() 26 | { 27 | converter.convert(ui->lineEditSQLITE->text(), ui->lineEditXMLDir->text()); 28 | qWarning() << "done"; 29 | } 30 | 31 | void MainWindow::on_pushButtonBrowseSQLITE_clicked() 32 | { 33 | QString ret = QFileDialog::getOpenFileName(this, 34 | tr("Select the SQLITE database"), 35 | settings.value("sqlitepath").toString(), 36 | "*.*"); 37 | if (ret != "") { 38 | ui->lineEditSQLITE->setText(ret); 39 | settings.setValue("sqlitepath", ui->lineEditSQLITE->text()); 40 | } 41 | } 42 | 43 | void MainWindow::on_pushButtonBrowseXML_clicked() 44 | { 45 | QString ret = QFileDialog::getExistingDirectory(this, 46 | tr("Select the directory containing avrstudio xmls"), 47 | settings.value("xmlspath").toString()); 48 | if (ret != "") { 49 | QDir dir(ret); 50 | if (dir.entryList(QStringList("*.xml")).isEmpty()) { 51 | QMessageBox::critical(this, 52 | tr("Could not find any XMLs"), 53 | tr("I cannot find any XMLs in the specified directory\n")); 54 | } else { 55 | ui->lineEditXMLDir->setText(ret); 56 | settings.setValue("xmlspath", ui->lineEditXMLDir->text()); 57 | } 58 | } 59 | } 60 | 61 | void MainWindow::logMessage(QString str) 62 | { 63 | ui->textEdit->append(str); 64 | } 65 | 66 | void MainWindow::on_pushButton_clicked() 67 | { 68 | converter.truncate(ui->lineEditSQLITE->text()); 69 | } 70 | -------------------------------------------------------------------------------- /qavrdude/dudeparts.txt: -------------------------------------------------------------------------------- 1 | "AT90S1200": "1200", 2 | "AT90S2313": "2313", 3 | "AT90S2333": "2333", 4 | "AT90S2343": "2343", 5 | "ATTINY22": "2343", 6 | "AT90S4414": "4414", 7 | "AT90S4433": "4433", 8 | "AT90S4434": "4434", 9 | "AT90S8515": "8515", 10 | "AT90S8535": "8535", 11 | "AT90CAN128": "c128", 12 | "AT90CAN32": "c32", 13 | "AT90CAN64": "c64", 14 | "ATmega103": "m103", 15 | "ATmega128": "m128", 16 | "ATmega1280": "m1280", 17 | "ATmega1281": "m1281", 18 | "ATmega1284P": "m1284p", 19 | "ATmega128RFA1": "m128rfa1", 20 | "ATmega16": "m16", 21 | "ATmega161": "m161", 22 | "ATmega162": "m162", 23 | "ATmega163": "m163", 24 | "ATmega164": "m164", 25 | "ATmega164P": "m164p", 26 | "ATmega168": "m168", 27 | "ATmega169": "m169", 28 | "ATmega2560": "m2560", 29 | "ATmega2561": "m2561", 30 | "ATmega32": "m32", 31 | "ATmega324P": "m324p", 32 | "ATmega325": "m325", 33 | "ATmega3250": "m3250", 34 | "ATmega328P": "m328p", 35 | "ATmega329": "m329", 36 | "ATmega3290": "m3290", 37 | "ATmega329P": "m329p", 38 | "ATmega3290P": "m3290p", 39 | "ATmega32U4": "m32u4", 40 | "ATmega48": "m48", 41 | "ATmega64": "m64", 42 | "ATmega640": "m640", 43 | "ATmega644P": "m644p", 44 | "ATmega644": "m644", 45 | "ATmega645": "m645", 46 | "ATmega6450": "m6450", 47 | "ATmega649": "m649", 48 | "ATmega6490": "m6490", 49 | "ATmega8": "m8", 50 | "ATmega8515": "m8515", 51 | "ATmega8535": "m8535", 52 | "ATmega88": "m88", 53 | "AT90PWM2": "pwm2", 54 | "AT90PWM2B": "pwm2b", 55 | "AT90PWM3": "pwm3", 56 | "AT90PWM3B": "pwm3b", 57 | "ATtiny10": "t10", 58 | "ATtiny11": "t12", 59 | "ATtiny12": "t12", 60 | "ATtiny13": "t13", 61 | "ATtiny15": "t15", 62 | "ATtiny2313": "t2313", 63 | "ATtiny25": "t25", 64 | "ATtiny26": "t26", 65 | "ATtiny261": "t261", 66 | "ATtiny4": "t4", 67 | "ATtiny44": "t44", 68 | "ATtiny45": "t45", 69 | "ATtiny461": "t461", 70 | "ATtiny5": "t5", 71 | "ATtiny84": "t84", 72 | "ATtiny85": "t85", 73 | "ATtiny861": "t861", 74 | "ATtiny88": "t88", 75 | "ATtiny9": "t9", 76 | "AT32uca0512": "ucr2", 77 | "ATmega1286": "usb1286", 78 | "ATmega1287": "usb1287", 79 | "ATmega162": "usb162", 80 | "ATmega647": "usb646", 81 | "ATmega647": "usb647", 82 | "ATmega82": "usb82", 83 | "ATxmega128A1": "x128a1", 84 | "ATxmega128A1revD": "x128a1d", 85 | "ATxmega128A3": "x128a3", 86 | "ATxmega128A4": "x128a4", 87 | "ATxmega16A4": "x16a4", 88 | "ATxmega192A1": "x192a1", 89 | "ATxmega192A3": "x192a3", 90 | "ATxmega256A1": "x256a1", 91 | "ATxmega256A3": "x256a3", 92 | "ATxmega256A3B": "x256a3b", 93 | "ATxmega32A4": "x32a4", 94 | "ATxmega64A1": "x64a1", 95 | "ATxmega64A3": "x64a3", 96 | "ATxmega64A4": "x64a4" 97 | -------------------------------------------------------------------------------- /qavrdude/avrpart.h: -------------------------------------------------------------------------------- 1 | #ifndef AVRPART_H 2 | #define AVRPART_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "settings.h" 15 | #include "bitfieldmodel.h" 16 | 17 | class AvrPart : public QObject 18 | { 19 | Q_OBJECT 20 | public: 21 | AvrPart(Settings *sa, QString name, QObject *parent = 0); 22 | QString getPartName() const {return m_partNameStr;} 23 | bool setPartName(QString pn); 24 | 25 | 26 | QString getSignature() const; 27 | QString error() const {return errorString;} 28 | QString getAvrDudePartNo(QString name) const; 29 | quint8 sign0, sign1, sign2; // signature bytes 30 | 31 | QString findDeviceWithSignature(quint8 s0, quint8 s1, quint8 s2); 32 | 33 | 34 | QStringList getSupportedFuses(); 35 | 36 | // FIXME make PPP 37 | QList fuseRegs; 38 | QList lockBytes; 39 | 40 | RegistersModel* fusesModel() const {return m_fusesModel;} 41 | RegisterFieldsModel *fuseFieldsModel() const {return m_fuseFieldsModel;} 42 | 43 | RegistersModel* lockByteModel() const {return m_lockBytesModel;} 44 | RegisterFieldsModel *lockByteFieldsModel() const {return m_lockByteFieldsModel;} 45 | 46 | void fusesChanged(); 47 | 48 | private: 49 | 50 | bool setPartNameFromXML(QString pn); 51 | bool setPartNameFromSqlite(QString pn); 52 | 53 | QString findDeviceWithSignatureXML(quint8 s0, quint8 s1, quint8 s2); 54 | QString findDeviceWithSignatureSqlite(quint8 s0, quint8 s1, quint8 s2); 55 | 56 | // avr related variables 57 | QString m_partNameStr; // teh normal name of the controller (for e.g Atmega8) 58 | QString m_avrdudePartNo; // the partname in avrdude option stlyle representation (for e.g. m8 for Atmega8) 59 | 60 | QString errorString; 61 | 62 | // misc xml handling variables 63 | QDomDocument domDoc; 64 | QFile domFile; 65 | 66 | bool fillFuseAndLockData(); 67 | bool fillFuseAndLockDataFromXML(); 68 | bool fillFuseAndLockDataFromSQLite(); 69 | bool findXml(QString); 70 | QMap dudePartNos; 71 | Settings *settings; 72 | 73 | RegistersModel *m_fusesModel; 74 | RegisterFieldsModel *m_fuseFieldsModel; 75 | 76 | RegistersModel *m_lockBytesModel; 77 | RegisterFieldsModel *m_lockByteFieldsModel; 78 | 79 | QSqlDatabase db; 80 | }; 81 | 82 | #endif // AVRPART_H 83 | -------------------------------------------------------------------------------- /qavrdude/fusemodel.h: -------------------------------------------------------------------------------- 1 | #ifndef FUSEMODEL_H 2 | #define FUSEMODEL_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "avrpart.h" 9 | 10 | class AvrPart; 11 | 12 | class FuseBitField // represent a fusebitgroup (like CLKSEL) 13 | { 14 | public: 15 | FuseBitField() : mask(0), value(0), isEnum(false) {} 16 | QString shortName, text; 17 | int mask; 18 | int value; // value is similar like in the XML file (right aligned) 19 | bool isEnum; 20 | QMap enumValues;// predefined group values & their name 21 | }; 22 | 23 | Q_DECLARE_METATYPE(FuseBitField) 24 | 25 | class FuseRegister // represents a fuse byte (high,low, extended) 26 | { 27 | public: 28 | FuseRegister(QString name, int offset, int size) :name(name), offset(offset), size(size){} 29 | QList bitFields; 30 | quint8 value; 31 | QString name; 32 | int offset; 33 | int size; 34 | }; 35 | 36 | class RegisterFieldsModel : public QAbstractTableModel 37 | { 38 | Q_OBJECT 39 | public: 40 | RegisterFieldsModel(QObject *parent = 0) : QAbstractTableModel(parent) {} 41 | int rowCount(const QModelIndex &parent) const; 42 | int columnCount(const QModelIndex &parent) const; 43 | QVariant data(const QModelIndex &index, int role) const; 44 | bool setData(const QModelIndex &index, const QVariant &value, int role); 45 | QVariant headerData(int section, Qt::Orientation orientation, int role) const; 46 | Qt::ItemFlags flags(const QModelIndex &index) const; 47 | void reloadModel(); 48 | signals: 49 | void changed(); 50 | }; 51 | 52 | class RegisterValueModel : public QAbstractTableModel 53 | { 54 | Q_OBJECT 55 | public: 56 | RegisterValueModel(QObject *parent = 0) : QAbstractTableModel(parent){} 57 | int rowCount(const QModelIndex &parent) const; 58 | int columnCount(const QModelIndex &parent) const; 59 | QVariant data(const QModelIndex &index, int role) const; 60 | bool setData(const QModelIndex &index, const QVariant &value, int role); 61 | QVariant headerData(int section, Qt::Orientation orientation, int role) const; 62 | Qt::ItemFlags flags(const QModelIndex &index) const; 63 | void reloadModel(); 64 | signals: 65 | void changed(); 66 | }; 67 | 68 | class LockBitsModel : public QAbstractTableModel 69 | { 70 | Q_OBJECT 71 | public: 72 | LockBitsModel(AvrPart *pa, QObject *parent = 0) : QAbstractTableModel(parent), part(pa) {} 73 | AvrPart *part; 74 | int rowCount(const QModelIndex &parent) const; 75 | int columnCount(const QModelIndex &parent) const; 76 | QVariant data(const QModelIndex &index, int role) const; 77 | bool setData(const QModelIndex &index, const QVariant &value, int role); 78 | QVariant headerData(int section, Qt::Orientation orientation, int role) const; 79 | Qt::ItemFlags flags(const QModelIndex &index) const; 80 | void reloadModel(); 81 | }; 82 | 83 | #endif // FUSEMODEL_H 84 | -------------------------------------------------------------------------------- /qavrdude/icons/Usb-svg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /xml_converter/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 433 10 | 315 11 | 12 | 13 | 14 | AVR XML2SQLite 15 | 16 | 17 | 18 | 19 | 20 | 21 | ... 22 | 23 | 24 | 25 | 26 | 27 | 28 | Clear 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | XML's dir: 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | ... 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | Qt::Horizontal 59 | 60 | 61 | 62 | 321 63 | 24 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | SQLITE file: 72 | 73 | 74 | 75 | 76 | 77 | 78 | Truncate 79 | 80 | 81 | 82 | 83 | 84 | 85 | Convert 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | pushButton_4 97 | clicked() 98 | textEdit 99 | clear() 100 | 101 | 102 | 348 103 | 271 104 | 105 | 106 | 307 107 | 223 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /qavrdude/avrprogrammer.h: -------------------------------------------------------------------------------- 1 | #ifndef AVRPROGRAMMER_H 2 | #define AVRPROGRAMMER_H 3 | #include 4 | #include 5 | #include 6 | 7 | #include "avrpart.h" 8 | #include "settings.h" 9 | 10 | typedef enum 11 | { 12 | PortTypeUnknown = 0, 13 | PortTypeNotNeeded = 1, 14 | PortTypeSpecial = 2, 15 | PortTypeSerial = 3, 16 | PortTypeParallel = 4, 17 | PortTypeUSB = 5, 18 | 19 | } PortType; 20 | 21 | typedef enum 22 | { 23 | DudeTaskNone , 24 | DudeTaskReadSignature, 25 | DudeTaskErase, 26 | DudeTaskWriteFlash, 27 | DudeTaskReadFlash, 28 | DudeTaskVerifyFlash, 29 | DudeTaskReadFuse, 30 | DudeTaskWriteFuse, 31 | DudeTaskVerifyFuse, 32 | DudeTaskReadEEPROM, 33 | DudeTaskWriteEEPROM, 34 | DudeTaskVerifyEEPROM, 35 | DudeTaskReadLock, 36 | DudeTaskWriteLock, 37 | DudeTaskVerifyLock, 38 | DudeTaskReadVoltages, 39 | DudeTaskSetVoltages, 40 | DudeTaskGetVoltages 41 | 42 | } CurrentDudeTask; 43 | 44 | class AvrProgrammer : public QObject 45 | { 46 | Q_OBJECT 47 | public: 48 | AvrProgrammer(Settings *sa, AvrPart *part, QObject *parent = 0); 49 | QString getFriendlyName() const {return friendlyName;} 50 | QString getDudeName() const {return avrDudeName;} 51 | PortType getPortType() const {return portType;} 52 | void readSignature(); 53 | void eraseDevice(); 54 | 55 | void programFlash(QString hexFileName, bool verifyAfter = true, bool eraseBefore = true); 56 | void verifyFlash(QString hexFileName); 57 | void readFlash(QString hexFileName); 58 | 59 | void programEEPROM(QString hexFileName); 60 | void verifyEEPROM(QString hexFileName); 61 | void readEEPROM(QString hexFileName); 62 | 63 | void programFuses(); 64 | void readFuses(QStringList fuseList); 65 | void verifyFuses(); 66 | 67 | void programLockByte(); 68 | void readLockByte(); 69 | void verifyLockByte(); 70 | 71 | bool isWorking() const {return currentDudeTask == DudeTaskNone;} 72 | 73 | void setVoltagesSTK500(double vtarget, double aref0, double aref1); 74 | void getVoltagesSTK500(); 75 | 76 | signals: 77 | void signatureReadSignal(quint8 sign0, quint8 sing1, quint8 sign2); 78 | void progressStep(); 79 | void avrDudeOut(QString out); 80 | void taskFinishedOk(QString); 81 | void taskFailed(QString); 82 | void fusesReaded(); 83 | void lockBitReaded(); 84 | void verifyMismatch(QString what, int offset, int value_read, int value_file); 85 | 86 | private: 87 | PortType portType; 88 | QString friendlyName; 89 | QString avrDudeName; 90 | AvrPart *currentPart; 91 | QProcess *avrDudeProcess; 92 | Settings *settings; 93 | QFile *signatureFile; 94 | QStringList fusesToRead, fuseNamesToRead; 95 | CurrentDudeTask currentDudeTask; 96 | QString staticProgrammerCommand(); 97 | 98 | QString getAvrDudeFuseNameFromXMLName(QString fuseName); 99 | 100 | int getFirstHexNumberFromStr(QString str, bool & success, int & numberEnd); 101 | 102 | bool isTerminalMode; 103 | double vTarget, aref0, aref1; 104 | int setVoltageStepCnt; 105 | bool getValueCMDSent; 106 | 107 | private slots: 108 | void readyReadDudeOutPut(); 109 | void processErrorSlot(QProcess::ProcessError error); 110 | void dudeFinished(int retcode); 111 | }; 112 | 113 | #endif // AVRPROGRAMMER_H 114 | -------------------------------------------------------------------------------- /qavrdude/icons/go-previous.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 14 | 16 | 20 | 24 | 25 | 35 | 37 | 41 | 45 | 46 | 55 | 57 | 61 | 65 | 66 | 75 | 76 | 78 | 83 | 87 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /qavrdude/settings.cpp: -------------------------------------------------------------------------------- 1 | #include "settings.h" 2 | 3 | Settings::Settings(QObject *parent) : 4 | QObject(parent) 5 | { 6 | settingsIni = new QSettings("MM", "QAvrdude", this); 7 | settingsIni->beginGroup("misc"); 8 | partName = settingsIni->value("partName", "m8").toString(); 9 | showAvrDudeOutPut = settingsIni->value("showAvrDudeOutPut", false).toBool(); 10 | deviceData = (DeviceDataType)settingsIni->value("deviceData", DeviceDb_SQLite).toInt(); 11 | settingsIni->endGroup(); 12 | 13 | settingsIni->beginGroup("paths"); 14 | #ifdef Q_OS_LINUX 15 | dudePath = settingsIni->value("dudePath", "/usr/bin/avrdude").toString(); 16 | xmlsPath = settingsIni->value("xmlsPath", "/usr/share/avrxmls").toString(); // FIXME check avrstudio default installation path 17 | sqlitePath = settingsIni->value("sqlitePath", "/usr/share/qavrdude/devicedb.sqlite").toString(); 18 | #elif defined(Q_OS_WIN32) 19 | dudePath = settingsIni->value("dudePath", "C:\\winavr\\bin\\avrdude").toString(); 20 | xmlsPath = settingsIni->value("xmlsPath", "").toString(); // FIXME check avrstudio default installation path 21 | sqlitePath = settingsIni->value("sqlitePath", "/usr/share/qavrdude/devicedb.sqlite").toString(); 22 | #else 23 | dudePath = settingsIni->value("dudePath", "").toString(); // FIXMEE 24 | xmlsPath = settingsIni->value("xmlsPath", "/usr/share/avrxmls").toString(); // FIXME check avrstudio default installation path 25 | sqlitePath = settingsIni->value("sqlitePath", "/usr/share/qavrdude/devicedb.sqlite").toString(); 26 | #endif 27 | 28 | flashHexFile = settingsIni->value("flashHexFile").toString(); 29 | eepromHexFile = settingsIni->value("eepromHexFile").toString(); 30 | settingsIni->endGroup(); 31 | 32 | settingsIni->beginGroup("gui"); 33 | rememberLastTab = settingsIni->value("rememberLastTab", true).toBool(); 34 | defaultTabIndex = settingsIni->value("defaultTabIndex", 0).toInt(); 35 | lastTabIndex = settingsIni->value("lastTabIndex", 0).toInt(); 36 | noicons = settingsIni->value("noicons", false).toBool(); 37 | settingsIni->endGroup(); 38 | 39 | settingsIni->beginGroup("programmerOptions"); 40 | particularProgOptions = settingsIni->value("particularProgOptions", false).toBool(); 41 | programmerOptions = settingsIni->value("programmerOptions", "-c stk500 -P /dev/ttyUSB0").toString(); 42 | programmerPort = settingsIni->value("programmerPort", "/dev/ttyUSB0").toString(); 43 | programmerName = settingsIni->value("programmerName", "stk500").toString(); 44 | settingsIni->endGroup(); 45 | } 46 | 47 | Settings::~Settings() 48 | { 49 | settingsIni->beginGroup("misc"); 50 | settingsIni->setValue("partName", partName); 51 | settingsIni->setValue("showAvrDudeOutPut", showAvrDudeOutPut); 52 | settingsIni->setValue("deviceData", deviceData); 53 | settingsIni->endGroup(); 54 | 55 | settingsIni->beginGroup("paths"); 56 | settingsIni->setValue("dudePath", dudePath); 57 | settingsIni->setValue("xmlsPath", xmlsPath); 58 | settingsIni->setValue("sqlitePath", sqlitePath); 59 | settingsIni->setValue("flashHexFile", flashHexFile); 60 | settingsIni->setValue("eepromHexFile", eepromHexFile); 61 | settingsIni->endGroup(); 62 | 63 | settingsIni->beginGroup("gui"); 64 | settingsIni->setValue("rememberLastTab", rememberLastTab); 65 | settingsIni->setValue("defaultTabIndex", defaultTabIndex); 66 | settingsIni->setValue("lastTabIndex", lastTabIndex); 67 | settingsIni->setValue("noicons", noicons); 68 | settingsIni->endGroup(); 69 | 70 | settingsIni->beginGroup("programmerOptions"); 71 | settingsIni->setValue("particularProgOptions", particularProgOptions); 72 | settingsIni->setValue("programmerOptions", programmerOptions); 73 | settingsIni->setValue("programmerName", programmerName); 74 | settingsIni->setValue("programmerPort", programmerPort); 75 | settingsIni->endGroup(); 76 | settingsIni->sync(); 77 | } 78 | -------------------------------------------------------------------------------- /qavrdude/icons/go-next.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 14 | 16 | 20 | 24 | 25 | 35 | 37 | 41 | 45 | 46 | 55 | 57 | 61 | 65 | 66 | 75 | 76 | 79 | 84 | 88 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /qavrdude/bitfielddelegate.h: -------------------------------------------------------------------------------- 1 | #ifndef BITFIELDDELEGATE_H 2 | #define BITFIELDDELEGATE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "bitfieldmodel.h" 13 | 14 | class BitFieldCheckBox: public QCheckBox 15 | { 16 | Q_OBJECT 17 | public: 18 | BitFieldCheckBox(QWidget *parent = 0) : QCheckBox(parent) 19 | { 20 | connect(this, SIGNAL(toggled(bool)), this, SLOT(toggledSlot(bool))); 21 | } 22 | private slots: 23 | void toggledSlot(bool) {emit commitDataSignal(this);} 24 | signals: 25 | void commitDataSignal(QWidget *widget); 26 | }; 27 | 28 | class BitFieldComboBox : public QComboBox 29 | { 30 | Q_OBJECT 31 | public: 32 | BitFieldComboBox(QWidget *parent = 0) : QComboBox(parent) 33 | { 34 | connect(this, SIGNAL(activated(int)), this, SLOT(on_activated(int))); 35 | } 36 | private slots: 37 | void on_activated(int) {emit commitDataSignal(this);} 38 | signals: 39 | void commitDataSignal(QWidget *editor); 40 | }; 41 | 42 | class BitFieldDelegate : public QStyledItemDelegate 43 | { 44 | Q_OBJECT 45 | public: 46 | explicit BitFieldDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {} 47 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 48 | const QModelIndex &index) const; 49 | 50 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 51 | void setModelData(QWidget *editor, QAbstractItemModel *model, 52 | const QModelIndex &index) const; 53 | 54 | void updateEditorGeometry(QWidget *editor, 55 | const QStyleOptionViewItem &option, const QModelIndex &) const 56 | { 57 | editor->setGeometry(option.rect); 58 | } 59 | 60 | private slots: 61 | void commitSlot(QWidget *editor) {commitData(editor);} 62 | signals: 63 | 64 | }; 65 | 66 | 67 | class RegisterValueSpinBox : public QSpinBox 68 | { 69 | Q_OBJECT 70 | public: 71 | enum InputType { 72 | Decimal = 10, 73 | HexaDecimal = 16, 74 | Binary = 2 75 | }; 76 | 77 | RegisterValueSpinBox(QWidget *parent = 0); 78 | void setInputType(RegisterValueSpinBox::InputType type); 79 | InputType inputType() const {return m_inputType;} 80 | protected: 81 | QValidator::State validate(QString &input, int &pos) const; 82 | int valueFromText(const QString &text) const; 83 | QString textFromValue(int val) const; 84 | 85 | private: 86 | InputType m_inputType; 87 | QRegExpValidator *validator; 88 | 89 | private slots: 90 | void valueChangedSlot(int) {emit commitDataSignal(this);} 91 | signals: 92 | void commitDataSignal(QWidget*); 93 | }; 94 | 95 | 96 | class RegisterValueDelegate : public QStyledItemDelegate 97 | { 98 | Q_OBJECT 99 | public: 100 | explicit RegisterValueDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {} 101 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 102 | const QModelIndex &index) const; 103 | 104 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 105 | void setModelData(QWidget *editor, QAbstractItemModel *model, 106 | const QModelIndex &index) const; 107 | 108 | void updateEditorGeometry(QWidget *editor, 109 | const QStyleOptionViewItem &option, const QModelIndex &) const 110 | { 111 | editor->setGeometry(option.rect); 112 | } 113 | void setInputType(RegisterValueSpinBox::InputType type) {m_inputType = type;} 114 | 115 | private: 116 | RegisterValueSpinBox::InputType m_inputType; 117 | private slots: 118 | void commitSlot(QWidget *editor) {commitData(editor);} 119 | signals: 120 | 121 | }; 122 | 123 | #endif // BITFIELDDELEGATE_H 124 | -------------------------------------------------------------------------------- /qavrdude/fusedelegate.h: -------------------------------------------------------------------------------- 1 | #ifndef FUSEDELEGATE_H 2 | #define FUSEDELEGATE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "bitfieldmodel.h" 10 | 11 | class FuseCheckBox: public QCheckBox 12 | { 13 | Q_OBJECT 14 | public: 15 | FuseCheckBox(QWidget *parent = 0) : QCheckBox(parent) 16 | { 17 | connect(this, SIGNAL(toggled(bool)), this, SLOT(toggledSlot(bool))); 18 | } 19 | private slots: 20 | void toggledSlot(bool) {emit commitDataSignal(this);} 21 | signals: 22 | void commitDataSignal(QWidget *widget); 23 | }; 24 | 25 | class FuseComboBox : public QComboBox 26 | { 27 | Q_OBJECT 28 | public: 29 | FuseComboBox(QWidget *parent = 0) : QComboBox(parent) 30 | { 31 | connect(this, SIGNAL(activated(int)), this, SLOT(on_activated(int))); 32 | } 33 | private slots: 34 | void on_activated(int) {emit commitDataSignal(this);} 35 | signals: 36 | void commitDataSignal(QWidget *editor); 37 | }; 38 | 39 | class FuseValueLineEdit : public QLineEdit 40 | { 41 | Q_OBJECT 42 | public: 43 | FuseValueLineEdit(QWidget *parent = 0) : QLineEdit(parent) 44 | { 45 | connect(this, SIGNAL(textEdited(QString)), this, SLOT(on_textEdited(QString))); 46 | } 47 | private slots: 48 | void on_textEdited(QString) {emit commitDataSignal(this);} 49 | signals: 50 | void commitDataSignal(QWidget *editor); 51 | }; 52 | 53 | class FuseDelegate : public QStyledItemDelegate 54 | { 55 | Q_OBJECT 56 | public: 57 | explicit FuseDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {} 58 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 59 | const QModelIndex &index) const; 60 | 61 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 62 | void setModelData(QWidget *editor, QAbstractItemModel *model, 63 | const QModelIndex &index) const; 64 | 65 | void updateEditorGeometry(QWidget *editor, 66 | const QStyleOptionViewItem &option, const QModelIndex &) const 67 | { 68 | editor->setGeometry(option.rect); 69 | } 70 | 71 | private slots: 72 | void commitSlot() {} 73 | signals: 74 | 75 | }; 76 | 77 | typedef enum { 78 | Hexadecimal = 0, 79 | Binary = 1, 80 | Decimal = 2 81 | } FuseValueDisplayMode; 82 | 83 | class FuseValueDelegate : public QStyledItemDelegate 84 | { 85 | Q_OBJECT 86 | public: 87 | explicit FuseValueDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {currentDisplayMode = Hexadecimal;} 88 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 89 | const QModelIndex &index) const; 90 | 91 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 92 | void setModelData(QWidget *editor, QAbstractItemModel *model, 93 | const QModelIndex &index) const; 94 | 95 | void updateEditorGeometry(QWidget *editor, 96 | const QStyleOptionViewItem &option, const QModelIndex &) const 97 | { 98 | editor->setGeometry(option.rect); 99 | } 100 | 101 | void setDisplayMode(FuseValueDisplayMode mode); 102 | private: 103 | FuseValueDisplayMode currentDisplayMode; 104 | signals: 105 | }; 106 | 107 | class LockDelegate : public QStyledItemDelegate 108 | { 109 | Q_OBJECT 110 | public: 111 | explicit LockDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {} 112 | QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, 113 | const QModelIndex &index) const; 114 | 115 | void setEditorData(QWidget *editor, const QModelIndex &index) const; 116 | void setModelData(QWidget *editor, QAbstractItemModel *model, 117 | const QModelIndex &index) const; 118 | 119 | void updateEditorGeometry(QWidget *editor, 120 | const QStyleOptionViewItem &option, const QModelIndex &) const 121 | { 122 | editor->setGeometry(option.rect); 123 | } 124 | signals: 125 | 126 | public slots: 127 | 128 | }; 129 | 130 | 131 | #endif // FUSEDELEGATE_H 132 | -------------------------------------------------------------------------------- /qavrdude/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include "avrprogrammer.h" 15 | #include "settings.h" 16 | #include "avrpart.h" 17 | #include "bitfielddelegate.h" 18 | #include "bitfieldmodel.h" 19 | 20 | 21 | namespace Ui { 22 | class MainWindow; 23 | } 24 | 25 | class MainWindow : public QMainWindow 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | explicit MainWindow(QWidget *parent = 0); 31 | ~MainWindow(); 32 | 33 | protected: 34 | void changeEvent(QEvent *e); 35 | 36 | private: 37 | Ui::MainWindow *ui; 38 | AvrPart *avrPart; 39 | AvrProgrammer *avrProgrammer; 40 | QStringList deviceNames; 41 | QCompleter *nameCompleter; 42 | Settings *settings; 43 | QButtonGroup *dataSourceButtonGroup; 44 | 45 | QLabel *statusBarLabel; 46 | 47 | BitFieldDelegate *lockFieldDelegate, *fuseFieldDelegate; 48 | RegisterValueDelegate *fuseValueDelegate; 49 | 50 | QCompleter *programmerArgumentsCompleter; 51 | 52 | void fillDeviceList(); 53 | void calculateArgumentsLabelText(); 54 | void fillDefaultTabComboBox(); 55 | void programmerSelected(); 56 | 57 | QProcess *m_programmerListQueryProcess; 58 | QString signatureToString(quint8 s0, quint8 s1, quint8 s2); 59 | 60 | private slots: 61 | void on_horizontalSliderVTarget_sliderMoved(int position); 62 | void on_pushButtonProgramLockbits_clicked(); 63 | void on_pushButtonReadLockbits_clicked(); 64 | void on_checkBoxNoIcons_toggled(bool checked); 65 | void on_comboBoxFuseDisplaymode_activated(int index); 66 | void on_textEditMessages_anchorClicked(QUrl ); 67 | void on_pushButtonReadReadEEPROM_clicked(); 68 | void on_pushButtonVerifyEEPROM_clicked(); 69 | void on_pushButtonProgramEEPROM_clicked(); 70 | void on_comboBoxDefaultTab_activated(int index); 71 | void on_checkBoxLastTabRemember_toggled(bool checked); 72 | void on_pushButtonAboutQt_clicked(); 73 | void on_pushButtonReadFuses_clicked(); 74 | void on_pushButtonProgramFuses_clicked(); 75 | void on_pushButtonReadReadFlash_clicked(); 76 | void on_pushButtonVerifyFlash_clicked(); 77 | void on_pushButtonProgramFlash_clicked(); 78 | void on_lineEditEEPROMHex_textEdited(QString ); 79 | void on_lineEditFlashHex_textEdited(QString ); 80 | void on_pushButtonErase_clicked(); 81 | void on_comboBoxDevice_activated(int index); 82 | void on_comboBoxProgrammer_activated(int index); 83 | void on_lineEditProgrammerPort_textEdited(QString ); 84 | void on_lineEditProgOptions_textEdited(QString ); 85 | void on_checkBoxOverrideProgrammersOptions_toggled(bool checked); 86 | void on_pushButtonReadSignature_clicked(); 87 | void on_pushButtonAvrDude_clicked(); 88 | void on_lineEditAvrDudePath_textEdited(QString ); 89 | void on_lineEditXmlsPath_textEdited(QString ); 90 | void on_pushButtonBrowseXmls_clicked(); 91 | void on_checkBoxShowAvrDudeOutput_toggled(bool checked); 92 | void on_pushButtonClearAvrDudeOutput_clicked(); 93 | void showFlashHexFileBrowse(); 94 | void showEEPROMHexFileBrowse(); 95 | void clearMessages(); 96 | void avrDudeOut(QString str); 97 | void signatureRead(quint8 s0, quint8 s1, quint8 s2); 98 | void logMessage(QString msg); 99 | void logError(QString msg); 100 | void progressStep(); 101 | void verifyFailed(QString what, int offset, int value_read, int value_waited); 102 | void deviceChanged(); // a slot to open all delegate on the fuse and lockbytefield tableviews 103 | void on_pushButtonVerifyFuses_clicked(); 104 | void on_pushButtonReadVoltages_clicked(); 105 | void on_pushButtonWriteVoltages_clicked(); 106 | void on_radioButtonUseXML_clicked(); 107 | void on_radioButtonUseSqlite_clicked(); 108 | void on_pushButtonBrowseSqlite_clicked(); 109 | void on_lineEditProgOptions_editingFinished(); 110 | void on_textEditMessages_customContextMenuRequested(const QPoint &pos); 111 | void programmerQueryFinished(int status, QProcess::ExitStatus exitStatus); 112 | }; 113 | 114 | #endif // MAINWINDOW_H 115 | -------------------------------------------------------------------------------- /qavrdude/bitfieldmodel.h: -------------------------------------------------------------------------------- 1 | #ifndef BITFIELDMODEL_H 2 | #define BITFIELDMODEL_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | /* 9 | 10 | Class for representing 1 or more bits in a register. 11 | If it is a single bit it could be represented in the GUI as a single checkbox. 12 | For multi bit bitfields you can use an enumeration for displaying purposes. 13 | 14 | */ 15 | 16 | class BitField 17 | { 18 | public: 19 | BitField() : 20 | m_mask(0), m_value(0), m_isEnum(false) {} 21 | BitField(QString name_a, QString shortName_a, int mask_a, int value_a, bool isEnum_a) : 22 | m_text(name_a), m_shortName(shortName_a), m_mask(mask_a), m_value(value_a), m_isEnum(isEnum_a) 23 | { 24 | //qWarning() << "new bf name" << m_text << "isenum" << isEnum_a << "mask" << mask_a << "val" << value_a; 25 | } 26 | ~BitField() {} 27 | 28 | QString name() const {return m_text;} 29 | QString shortName() const {return m_shortName;} 30 | 31 | int mask() const {return m_mask;} 32 | bool isEnum() const {return m_isEnum;} 33 | void setEnum(bool e) {m_isEnum = e;} 34 | 35 | void setValue(int value) {m_value = value;} 36 | int value() const {return m_value;} 37 | 38 | void addEnumValue(int id, QString name) {enumValues[id] = name;} 39 | 40 | QString text() const {return m_text;} 41 | 42 | // FIXME PPP 43 | QMap enumValues;// predefined group values & their name 44 | 45 | private: 46 | QString m_text, m_shortName; 47 | int m_mask; 48 | int m_value; // value is similar like in the XML file (right aligned), holds the masked value 49 | bool m_isEnum; 50 | 51 | }; 52 | 53 | Q_DECLARE_METATYPE(BitField) 54 | 55 | /* 56 | 57 | Class for representing a single byte configuration word 58 | It has name, short name, value and it can have many bitfields 59 | As extra it has an offset field 60 | */ 61 | 62 | class Register 63 | { 64 | public: 65 | Register(QString name, int offset, int size) : m_name(name), m_offset(offset), m_size(size), m_value(0) 66 | { 67 | //qWarning() << "New register " << name << "of:" << offset << "size:" << size; 68 | } 69 | ~Register() {} 70 | void setValue(quint8 val); 71 | void setMaskedValue(quint8 mask, quint8 value); 72 | quint8 value() const {return m_value;} 73 | QString name() const {return m_name;} 74 | 75 | // bitfield 76 | 77 | int bitFieldCount() const {return bitFields.count();} 78 | void addBitField(BitField fl) {bitFields.append(fl);} 79 | BitField bitFieldAt(int i) {return bitFields[i];} 80 | QList bitFields; // FIXME PPP 81 | 82 | private: 83 | QString m_name, m_shortName; 84 | int m_offset; 85 | int m_size; 86 | quint8 m_value; 87 | 88 | }; 89 | 90 | class RegistersModel : public QAbstractTableModel 91 | { 92 | Q_OBJECT 93 | public: 94 | RegistersModel(QObject *parent = 0) : QAbstractTableModel(parent), m_registers(NULL), m_registerCnt(0) {} 95 | 96 | void setRegisters(QList* regs); 97 | 98 | int rowCount(const QModelIndex &parent = QModelIndex()) const; 99 | int columnCount(const QModelIndex &parent = QModelIndex()) const; 100 | QVariant data(const QModelIndex &index, int role) const; 101 | bool setData(const QModelIndex &index, const QVariant &value, int role); 102 | QVariant headerData(int section, Qt::Orientation orientation, int role) const; 103 | Qt::ItemFlags flags(const QModelIndex &index) const; 104 | 105 | void emitChanged() {emit changed();} 106 | private: 107 | QList *m_registers; 108 | int m_registerCnt; 109 | 110 | public slots: 111 | void refresh(); 112 | 113 | signals: 114 | void changed(); 115 | }; 116 | 117 | 118 | class RegisterFieldsModel : public QAbstractTableModel 119 | { 120 | Q_OBJECT 121 | public: 122 | RegisterFieldsModel(QObject *parent = 0) : QAbstractTableModel(parent), m_registers(NULL) {} 123 | 124 | void clear(); 125 | void setRegisters(QList *regs); 126 | 127 | int rowCount(const QModelIndex &parent = QModelIndex()) const; 128 | int columnCount(const QModelIndex &parent = QModelIndex()) const; 129 | QVariant data(const QModelIndex &index, int role) const; 130 | bool setData(const QModelIndex &index, const QVariant &value, int role); 131 | QVariant headerData(int section, Qt::Orientation orientation, int role) const; 132 | Qt::ItemFlags flags(const QModelIndex &index) const; 133 | 134 | private: 135 | QList *m_registers; 136 | 137 | signals: 138 | void changed(); 139 | }; 140 | 141 | #endif // BITFIELDMODEL_H 142 | -------------------------------------------------------------------------------- /qavrdude/bitfielddelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "bitfielddelegate.h" 2 | 3 | 4 | 5 | QWidget *BitFieldDelegate::createEditor(QWidget *parent, 6 | const QStyleOptionViewItem & option, 7 | const QModelIndex & index) const 8 | { 9 | BitField field = index.model()->data(index, Qt::UserRole).value(); 10 | if (field.isEnum()) { 11 | BitFieldComboBox *editor = new BitFieldComboBox(parent); 12 | connect(editor, SIGNAL(commitDataSignal(QWidget*)), this, SLOT(commitSlot(QWidget*))); 13 | editor->setAutoFillBackground(true); 14 | int current = 0; 15 | QMapIterator i(field.enumValues); 16 | while (i.hasNext()) { 17 | i.next(); 18 | editor->addItem(i.value(), i.key()); 19 | if (field.value() == i.key()) 20 | current = i.key(); 21 | } 22 | editor->setCurrentIndex(current); 23 | return editor; 24 | } else { 25 | BitFieldCheckBox *editor = new BitFieldCheckBox(parent); 26 | connect(editor, SIGNAL(commitDataSignal(QWidget*)), this, SIGNAL(commitData(QWidget*))); 27 | editor->setAutoFillBackground(true); 28 | editor->setChecked(field.value() == 0); 29 | return editor; 30 | } 31 | return QStyledItemDelegate::createEditor(parent, option, index); 32 | } 33 | 34 | 35 | void BitFieldDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 36 | { 37 | BitField field = index.model()->data(index, Qt::UserRole).value(); 38 | if (field.isEnum()) { 39 | BitFieldComboBox *cb = static_cast(editor); 40 | cb->setAutoFillBackground(true); 41 | cb->setCurrentIndex(cb->findData(field.value())); 42 | } else { 43 | BitFieldCheckBox *cb = static_cast(editor); 44 | cb->setAutoFillBackground(true); 45 | cb->setChecked(field.value() != 0); 46 | } 47 | } 48 | 49 | 50 | void BitFieldDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, 51 | const QModelIndex &index) const 52 | { 53 | int value = 0; 54 | BitField field = index.model()->data(index, Qt::UserRole).value(); 55 | if (field.isEnum()) { 56 | BitFieldComboBox *cb = static_cast(editor); 57 | value = cb->itemData(cb->currentIndex()).toInt(); 58 | } else { 59 | BitFieldCheckBox *cb = static_cast(editor); 60 | if (cb->isChecked()) 61 | value = 1; 62 | } 63 | model->setData(index, value, Qt::EditRole); 64 | } 65 | 66 | RegisterValueSpinBox::RegisterValueSpinBox(QWidget *parent) 67 | : QSpinBox(parent) 68 | { 69 | setRange(0, 255); 70 | validator = new QRegExpValidator(this); 71 | setInputType(HexaDecimal); 72 | connect(this, SIGNAL(valueChanged(int)), this, SLOT(valueChangedSlot(int))); 73 | } 74 | 75 | void RegisterValueSpinBox::setInputType(RegisterValueSpinBox::InputType type) 76 | { 77 | switch (type) { 78 | case Decimal: 79 | validator->setRegExp(QRegExp("[0-9]{1,3}")); 80 | setPrefix(""); 81 | break; 82 | case HexaDecimal: 83 | setPrefix("0x"); 84 | validator->setRegExp(QRegExp("[0-9A-Fa-f]{1,2}")); 85 | break; 86 | case Binary: 87 | setPrefix("0b"); 88 | validator->setRegExp(QRegExp("[0-1]{1,8}")); 89 | break; 90 | } 91 | m_inputType = type; 92 | } 93 | 94 | QValidator::State RegisterValueSpinBox::validate(QString &input, int &pos) const 95 | { 96 | return validator->validate(input, pos); 97 | } 98 | 99 | QString RegisterValueSpinBox::textFromValue(int val) const 100 | { 101 | return QString::number(val, (int)m_inputType); 102 | } 103 | 104 | int RegisterValueSpinBox::valueFromText(const QString &text) const 105 | { 106 | bool ok; 107 | return text.toInt(&ok, (int)m_inputType); 108 | } 109 | 110 | 111 | QWidget * RegisterValueDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const 112 | { 113 | RegisterValueSpinBox *editor = new RegisterValueSpinBox(parent); 114 | qWarning() << m_inputType; 115 | editor->setInputType(m_inputType); 116 | connect(editor, SIGNAL(commitDataSignal(QWidget*)), this, SIGNAL(commitData(QWidget*))); 117 | editor->setAutoFillBackground(true); 118 | return editor; 119 | } 120 | 121 | void RegisterValueDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 122 | { 123 | RegisterValueSpinBox *cb = static_cast(editor); 124 | cb->setInputType(m_inputType); 125 | cb->setValue(index.model()->data(index).toInt()); 126 | } 127 | 128 | void RegisterValueDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const 129 | { 130 | RegisterValueSpinBox *cb = static_cast(editor); 131 | model->setData(index, cb->value(), Qt::EditRole); 132 | } 133 | -------------------------------------------------------------------------------- /qavrdude/icons/edit-delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 14 | 16 | 20 | 24 | 25 | 35 | 37 | 41 | 45 | 46 | 55 | 57 | 61 | 65 | 69 | 73 | 74 | 84 | 86 | 90 | 94 | 95 | 104 | 106 | 110 | 114 | 115 | 123 | 124 | 126 | 130 | 134 | 138 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /qavrdude/icons/help-about.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 14 | 16 | 20 | 24 | 25 | 35 | 37 | 41 | 45 | 46 | 55 | 57 | 61 | 65 | 66 | 75 | 77 | 81 | 85 | 89 | 90 | 99 | 101 | 105 | 109 | 110 | 119 | 120 | 122 | 127 | 131 | 135 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /qavrdude/icons/gtk-info.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 14 | 16 | 20 | 24 | 25 | 35 | 37 | 41 | 45 | 46 | 55 | 57 | 61 | 65 | 69 | 73 | 74 | 84 | 86 | 90 | 94 | 95 | 104 | 105 | 107 | 111 | 115 | 119 | 122 | 126 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /qavrdude/fusedelegate.cpp: -------------------------------------------------------------------------------- 1 | #include "fusedelegate.h" 2 | 3 | 4 | QWidget *FuseDelegate::createEditor(QWidget *parent, 5 | const QStyleOptionViewItem & option, 6 | const QModelIndex & index) const 7 | { 8 | BitField field = index.model()->data(index, Qt::UserRole).value(); 9 | if (field.isEnum()) { 10 | FuseComboBox *editor = new FuseComboBox(parent); 11 | connect(editor, SIGNAL(activated(int)), this, SLOT(commitSlot())); 12 | editor->setAutoFillBackground(true); 13 | int current = 0; 14 | QMapIterator i(field.enumValues); 15 | while (i.hasNext()) { 16 | i.next(); 17 | editor->addItem(i.value(), i.key()); 18 | if (field.value() == i.key()) 19 | current = i.key(); 20 | } 21 | editor->setCurrentIndex(current); 22 | return editor; 23 | } else { 24 | FuseCheckBox *editor = new FuseCheckBox(parent); 25 | connect(editor, SIGNAL(commitDataSignal(QWidget*)), this, SIGNAL(commitData(QWidget*))); 26 | editor->setAutoFillBackground(true); 27 | editor->setChecked(field.value() == 0); 28 | return editor; 29 | } 30 | return QStyledItemDelegate::createEditor(parent, option, index); 31 | } 32 | 33 | 34 | void FuseDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 35 | { 36 | BitField field = index.model()->data(index, Qt::UserRole).value(); 37 | if (field.isEnum()) { 38 | FuseComboBox *cb = static_cast(editor); 39 | cb->setAutoFillBackground(true); 40 | cb->setCurrentIndex(cb->findData(field.value())); 41 | } else { 42 | FuseCheckBox *cb = static_cast(editor); 43 | cb->setAutoFillBackground(true); 44 | cb->setChecked(field.value() == 0); 45 | } 46 | } 47 | 48 | 49 | void FuseDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, 50 | const QModelIndex &index) const 51 | { 52 | int value = 0; 53 | BitField field = index.model()->data(index, Qt::UserRole).value(); 54 | if (field.isEnum()) { 55 | FuseComboBox *cb = static_cast(editor); 56 | value = cb->itemData(cb->currentIndex()).toInt(); 57 | } else { 58 | FuseCheckBox *cb = static_cast(editor); 59 | if (cb->isChecked()) 60 | value = 1; 61 | } 62 | model->setData(index, value, Qt::EditRole); 63 | } 64 | 65 | QWidget *FuseValueDelegate::createEditor(QWidget *parent, 66 | const QStyleOptionViewItem & /*option*/, 67 | const QModelIndex & index) const 68 | { 69 | FuseValueLineEdit *editor = new FuseValueLineEdit(parent); 70 | int value = index.model()->data(index).toInt(); 71 | editor->setAutoFillBackground(true); 72 | switch (currentDisplayMode) { 73 | case Hexadecimal: 74 | editor->setInputMask("0x>HH;_"); 75 | editor->setText("0x"+QString::number(value, 16).rightJustified(2, '0').toUpper()); 76 | break; 77 | case Decimal: 78 | editor->setInputMask("000;_"); 79 | editor->setText(QString::number(value, 10)+"d"); 80 | break; 81 | case Binary: 82 | editor->setInputMask("\0\bBBBBBBBB;_"); 83 | editor->setText("0b"+QString::number(value, 2).rightJustified(8, '0')); 84 | break; 85 | } 86 | return editor; 87 | } 88 | 89 | 90 | void FuseValueDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 91 | { 92 | int value = index.model()->data(index).toInt(); 93 | FuseValueLineEdit *cb = static_cast(editor); 94 | switch (currentDisplayMode) { 95 | case Hexadecimal: 96 | cb->setInputMask("0xHH;_"); 97 | cb->setText("0x"+QString::number(value, 16).rightJustified(2, '0').toUpper()); 98 | break; 99 | case Decimal: 100 | cb->setInputMask("000;_"); 101 | cb->setText(QString::number(value, 10)+"d"); 102 | break; 103 | case Binary: 104 | cb->setInputMask("\0\bBBBBBBBB;_"); 105 | cb->setText("0b"+QString::number(value, 2).rightJustified(8, '0')); 106 | break; 107 | } 108 | } 109 | 110 | 111 | void FuseValueDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, 112 | const QModelIndex &index) const 113 | { 114 | int value = 0; 115 | bool ok = false; 116 | FuseValueLineEdit *le = static_cast(editor); 117 | QString valueText = le->text(); 118 | switch (currentDisplayMode) { 119 | case Hexadecimal: 120 | valueText = valueText.mid(2); 121 | value = valueText.toInt(&ok, 16); 122 | break; 123 | case Decimal: 124 | valueText = valueText.left(valueText.size()-1); 125 | value = valueText.toInt(&ok, 10); 126 | break; 127 | case Binary: 128 | valueText = valueText.mid(2); 129 | value = valueText.toInt(&ok, 2); 130 | break; 131 | } 132 | if ((ok) && (value < 256)) { 133 | model->setData(index, value, Qt::EditRole); 134 | } 135 | } 136 | 137 | void FuseValueDelegate::setDisplayMode(FuseValueDisplayMode mode) 138 | { 139 | currentDisplayMode = mode; 140 | } 141 | 142 | QWidget *LockDelegate::createEditor(QWidget *parent, 143 | const QStyleOptionViewItem & option, 144 | const QModelIndex & index) const 145 | { 146 | BitField field = index.model()->data(index, Qt::UserRole).value(); 147 | if (field.isEnum) { 148 | QComboBox *editor = new QComboBox(parent); 149 | editor->setAutoFillBackground(true); 150 | int current = 0; 151 | QMapIterator i(field.enumValues); 152 | while (i.hasNext()) { 153 | i.next(); 154 | editor->addItem(i.value(), i.key()); 155 | if (field.value == i.key()) 156 | current = i.key(); 157 | } 158 | editor->setCurrentIndex(current); 159 | return editor; 160 | } else { 161 | QCheckBox *editor = new QCheckBox(parent); 162 | editor->setAutoFillBackground(true); 163 | editor->setChecked(field.value != 0); 164 | return editor; 165 | } 166 | return QStyledItemDelegate::createEditor(parent, option, index); 167 | } 168 | 169 | 170 | void LockDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const 171 | { 172 | LockBitField field = index.model()->data(index, Qt::UserRole).value(); 173 | if (field.isEnum) { 174 | QComboBox *cb = static_cast(editor); 175 | cb->setAutoFillBackground(true); 176 | cb->setCurrentIndex(cb->findData(field.value)); 177 | } else { 178 | QCheckBox *cb = static_cast(editor); 179 | cb->setAutoFillBackground(true); 180 | cb->setChecked(field.value != 0); 181 | } 182 | } 183 | 184 | 185 | void LockDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, 186 | const QModelIndex &index) const 187 | { 188 | int value = 0; 189 | LockBitField field = index.model()->data(index, Qt::UserRole).value(); 190 | if (field.isEnum) { 191 | QComboBox *cb = static_cast(editor); 192 | value = cb->itemData(cb->currentIndex()).toInt(); 193 | } else { 194 | QCheckBox *cb = static_cast(editor); 195 | if (cb->isChecked()) 196 | value = 1; 197 | } 198 | model->setData(index, value, Qt::EditRole); 199 | } 200 | 201 | 202 | -------------------------------------------------------------------------------- /qavrdude/bitfieldmodel.cpp: -------------------------------------------------------------------------------- 1 | #include "bitfieldmodel.h" 2 | #include 3 | 4 | 5 | 6 | void Register::setValue(quint8 val) 7 | { 8 | for (int i = 0; i> offset); 17 | } 18 | } 19 | m_value = val; 20 | } 21 | 22 | void Register::setMaskedValue(quint8 mask, quint8 value) 23 | { 24 | quint8 nvalue = 0; 25 | quint8 offset = 0; 26 | for (; offset<8; offset++) { 27 | if (mask & (1<size(); 43 | } 44 | 45 | return 0; 46 | } 47 | int RegistersModel::columnCount(const QModelIndex &parent) const 48 | { 49 | if (parent.isValid()) 50 | return 0; 51 | 52 | return 2; 53 | } 54 | 55 | QVariant RegistersModel::data(const QModelIndex &index, int role) const 56 | { 57 | if (m_registers != NULL) { 58 | if (role == Qt::DisplayRole) { 59 | if (index.row() < m_registers->size()) { 60 | if (index.column() == 0) { 61 | return m_registers->at(index.row())->name(); 62 | } else if (index.column() == 1) { 63 | return m_registers->at(index.row())->value(); 64 | } 65 | } 66 | } 67 | } 68 | return QVariant(); 69 | } 70 | 71 | bool RegistersModel::setData(const QModelIndex &index, const QVariant &value, int ) 72 | { 73 | if (m_registers != NULL) { 74 | if (index.row() < m_registers->size() && index.column() == 1) { 75 | m_registers->at(index.row())->setValue(value.toInt()); 76 | emit dataChanged(index, index); 77 | emit changed(); 78 | } 79 | } 80 | return false; 81 | } 82 | 83 | QVariant RegistersModel::headerData(int section, Qt::Orientation orientation, int role) const 84 | { 85 | if (role != Qt::DisplayRole) 86 | return QVariant(); 87 | 88 | if (orientation == Qt::Horizontal) { 89 | if (section == 0) 90 | return tr("Name"); 91 | else 92 | return tr("Value"); 93 | } else { 94 | return section; 95 | } 96 | return QVariant(); 97 | } 98 | 99 | Qt::ItemFlags RegistersModel::flags(const QModelIndex &index) const 100 | { 101 | if (index.column() == 1) { 102 | return Qt::ItemIsEditable | Qt::ItemIsEnabled; 103 | } 104 | return Qt::ItemIsEnabled; 105 | } 106 | 107 | void RegistersModel::setRegisters(QList *regs) 108 | { 109 | m_registers = regs; 110 | } 111 | 112 | void RegistersModel::refresh() 113 | { 114 | /*if (m_registers == NULL) 115 | return; 116 | 117 | beginRemoveRows(this->index(0,0), 0, m_registerCnt); 118 | endRemoveRows(); 119 | 120 | m_registerCnt = m_registers->size(); 121 | 122 | beginInsertRows(index(0,0), 0, m_registerCnt); 123 | endInsertRows();*/ 124 | emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, columnCount())); 125 | } 126 | 127 | /* RegisterFieldsModel members: */ 128 | 129 | QVariant RegisterFieldsModel::headerData(int section, Qt::Orientation orientation, int role) const 130 | { 131 | if (role != Qt::DisplayRole) 132 | return QVariant(); 133 | 134 | if (orientation == Qt::Horizontal) { 135 | if (section == 0) 136 | return tr("Name"); 137 | else 138 | return tr("Value"); 139 | } else { 140 | return section; 141 | } 142 | return QVariant(); 143 | } 144 | 145 | 146 | Qt::ItemFlags RegisterFieldsModel::flags(const QModelIndex &index) const 147 | { 148 | if (index.column() == 1) { 149 | return Qt::ItemIsEditable | Qt::ItemIsEnabled; 150 | } 151 | return Qt::ItemIsEnabled; 152 | } 153 | 154 | QVariant RegisterFieldsModel::data(const QModelIndex &index, int role) const 155 | { 156 | int rowCounter = 0; 157 | for (int i = 0; icount(); i++) { 158 | for (int j = 0; jat(i)->bitFields.count(); j++) { 159 | if (rowCounter == index.row()) { 160 | switch (index.column()) { 161 | case 0: { // fuse name 162 | switch(role) { 163 | case Qt::ToolTipRole: 164 | return m_registers->at(i)->bitFields[j].name(); 165 | break; 166 | case Qt::DisplayRole: 167 | return m_registers->at(i)->bitFields[j].name() + " (" + m_registers->at(i)->bitFields[j].shortName() + ")"; 168 | break; 169 | }; // switch role 170 | } break; // column 0 171 | case 1: { // fuse value 172 | if (role == Qt::UserRole) { 173 | return QVariant::fromValue(m_registers->at(i)->bitFields[j]); 174 | } else if (role == Qt::DisplayRole) { 175 | return m_registers->at(i)->bitFields[j].value(); 176 | } 177 | } break; // column 1 178 | } // switch index 179 | break; 180 | } // we have found the searched bitfield 181 | rowCounter++; 182 | } // this loops on the fuses bitfields 183 | } // this cycle loops on the (HIGH LOW EXTENDED FUSE) m_registers 184 | return QVariant(); 185 | } 186 | 187 | bool RegisterFieldsModel::setData(const QModelIndex &index, const QVariant &value, int role) 188 | { 189 | int rowCounter = 0; 190 | if ((role == Qt::DisplayRole) || (role == Qt::EditRole)) { 191 | if (index.column() == 1) { //is the index points to the fuse value column? 192 | for (int i = 0; icount(); i++) {// this cycle loops on the (HIGH LOW EXTENDED FUSE) m_registers 193 | for (int j = 0; jat(i)->bitFields.count(); j++) { // this loops on the fuses bitfields 194 | if (rowCounter == index.row()) { 195 | m_registers->at(i)->setMaskedValue(m_registers->at(i)->bitFields.at(j).mask(), value.toInt()); 196 | emit changed(); 197 | return true; 198 | } // we have found the searched bitfield 199 | rowCounter++; 200 | } // this loops on the fuses bitfields 201 | } // this cycle loops on the (HIGH LOW EXTENDED FUSE) m_registers 202 | } 203 | } 204 | return false; 205 | } 206 | 207 | void RegisterFieldsModel::clear() 208 | { 209 | beginRemoveRows(createIndex(0,0), 0, rowCount()); 210 | removeRows(0, rowCount()); 211 | endRemoveRows(); 212 | } 213 | 214 | void RegisterFieldsModel::setRegisters(QList *regs) 215 | { 216 | m_registers = regs; 217 | if (m_registers == NULL) 218 | return; 219 | 220 | beginInsertRows(index(0,0), 0, m_registers->size()); 221 | for (int i = 0; isize(); i++) 222 | insertRow(i); 223 | endInsertRows(); 224 | } 225 | 226 | int RegisterFieldsModel::rowCount(const QModelIndex &parent) const 227 | { 228 | if (parent.isValid()) 229 | return 0; 230 | 231 | int rowCount = 0; 232 | for (int i = 0; icount(); i++) { 233 | rowCount += m_registers->at(i)->bitFields.count(); 234 | } 235 | return rowCount; 236 | } 237 | 238 | int RegisterFieldsModel::columnCount(const QModelIndex &parent) const 239 | { 240 | if (parent.isValid()) 241 | return 0; 242 | return 2; 243 | } 244 | -------------------------------------------------------------------------------- /qavrdude/fusemodel.cpp: -------------------------------------------------------------------------------- 1 | #include "fusemodel.h" 2 | #include 3 | 4 | QVariant BitFieldModel::headerData(int section, Qt::Orientation orientation, int role) const 5 | { 6 | if (role != Qt::DisplayRole) 7 | return QVariant(); 8 | 9 | if (orientation == Qt::Horizontal) { 10 | if (section == 0) 11 | return tr("Name"); 12 | else 13 | return tr("Value"); 14 | } else { 15 | return section; 16 | } 17 | } 18 | 19 | void BitFieldModel::reloadModel() 20 | { 21 | this->dataChanged(this->index(1,0), this->index(1, this->rowCount(this->index(-1, -1))-1)); 22 | } 23 | 24 | Qt::ItemFlags BitFieldModel::flags(const QModelIndex &index) const 25 | { 26 | if (index.column() == 1) { 27 | return Qt::ItemIsEditable | Qt::ItemIsEnabled; 28 | } 29 | return Qt::ItemIsEnabled; 30 | } 31 | 32 | QVariant BitFieldModel::data(const QModelIndex &index, int role) const 33 | { 34 | int rowCounter = 0; 35 | for (int i = 0; ifuseRegs.count(); i++) { 36 | for (int j = 0; jfuseRegs[i].bitFields.count(); j++) { 37 | if (rowCounter == index.row()) { 38 | switch (index.column()) { 39 | case 0: { // fuse name 40 | switch(role) { 41 | case Qt::DisplayRole: return part->fuseRegs[i].bitFields[j].shortName; break; 42 | case Qt::ToolTipRole: return part->fuseRegs[i].bitFields[j].text; break; 43 | }; // switch role 44 | } break; // column 0 45 | case 1: { // fuse value 46 | if (role == Qt::UserRole) { 47 | return QVariant::fromValue(part->fuseRegs[i].bitFields[j]); 48 | } else if (role == Qt::DisplayRole) { 49 | return part->fuseRegs[i].bitFields[j].value; 50 | } 51 | } break; // column 1 52 | } // switch index 53 | break; 54 | } // we have found the searched bitfield 55 | rowCounter++; 56 | } // this loops on the fuses bitfields 57 | } // this cycle loops on the (HIGH LOW EXTENDED FUSE) part->fuseRegs 58 | return QVariant(); 59 | } 60 | 61 | bool BitFieldModel::setData(const QModelIndex &index, const QVariant &value, int role) 62 | { 63 | int rowCounter = 0; 64 | if ((role == Qt::DisplayRole) || (role == Qt::EditRole)) { 65 | if (index.column() == 1) { //is the index points to the fuse value column? 66 | for (int i = 0; ifuseRegs.count(); i++) {// this cycle loops on the (HIGH LOW EXTENDED FUSE) part->fuseRegs 67 | for (int j = 0; jfuseRegs[i].bitFields.count(); j++) { // this loops on the fuses bitfields 68 | if (rowCounter == index.row()) { 69 | part->fuseRegs[i].bitFields[j].value = value.toInt(); 70 | part->fuseRegs[i].value &= ~part->fuseRegs[i].bitFields[j].mask; 71 | int l; 72 | for (l = 0; l<8; l++) { 73 | if (part->fuseRegs[i].bitFields[j].mask & (1<fuseRegs[i].value |= part->fuseRegs[i].bitFields[j].value * (1<fuseRegs 84 | } 85 | } 86 | return false; 87 | } 88 | 89 | int BitFieldModel::rowCount(const QModelIndex &parent) const 90 | { 91 | if (parent.isValid()) 92 | return 0; 93 | int rowCount = 0; 94 | for (int i = 0; ifuseRegs.count(); i++) { 95 | rowCount += part->fuseRegs[i].bitFields.count(); 96 | } 97 | return rowCount; 98 | } 99 | 100 | int BitFieldModel::columnCount(const QModelIndex &parent) const 101 | { 102 | if (parent.isValid()) 103 | return 0; 104 | return 2; 105 | } 106 | 107 | int BitFieldValueModel::rowCount(const QModelIndex &parent) const 108 | { 109 | if (parent.isValid()) 110 | return 0; 111 | return part->fuseRegs.size(); 112 | } 113 | 114 | int BitFieldValueModel::columnCount(const QModelIndex &parent) const 115 | { 116 | if (parent.isValid()) 117 | return 0; 118 | return 2; 119 | } 120 | 121 | QVariant BitFieldValueModel::data(const QModelIndex &index, int role) const 122 | { 123 | if (index.row() < part->fuseRegs.size()) { 124 | if ((index.column() == 0) && (role == Qt::DisplayRole)) { 125 | return part->fuseRegs[index.row()].name; 126 | } 127 | 128 | if ((index.column() == 1) && (role == Qt::DisplayRole)) { 129 | return (int)part->fuseRegs[index.row()].value; 130 | } 131 | } 132 | return QVariant(); 133 | } 134 | 135 | bool BitFieldValueModel::setData(const QModelIndex &index, const QVariant &value, int role) 136 | { 137 | if (index.row() < part->fuseRegs.size()) { 138 | if ((index.column() == 1) && (role == Qt::DisplayRole)){ 139 | part->fuseRegs[index.row()].value = value.toInt(); 140 | emit changed(); 141 | return true; 142 | } 143 | } 144 | return false; 145 | } 146 | 147 | QVariant BitFieldValueModel::headerData(int section, Qt::Orientation orientation, int role) const 148 | { 149 | if (role != Qt::DisplayRole) 150 | return QVariant(); 151 | 152 | if (orientation == Qt::Horizontal) { 153 | if (section == 0) 154 | return tr("Name"); 155 | else 156 | return tr("Value"); 157 | } else { 158 | return section; 159 | } 160 | } 161 | 162 | Qt::ItemFlags BitFieldValueModel::flags(const QModelIndex &index) const 163 | { 164 | if (index.column() == 1) { 165 | return Qt::ItemIsEditable | Qt::ItemIsEnabled; 166 | } 167 | return Qt::ItemIsEnabled; 168 | } 169 | 170 | void BitFieldValueModel::reloadModel() 171 | { 172 | this->dataChanged(this->index(1,0), this->index(1, this->rowCount(this->index(-1, -1)))); 173 | } 174 | 175 | QVariant LockBitsModel::headerData(int section, Qt::Orientation orientation, int role) const 176 | { 177 | if (role != Qt::DisplayRole) 178 | return QVariant(); 179 | 180 | if (orientation == Qt::Horizontal) { 181 | if (section == 0) 182 | return tr("Name"); 183 | else 184 | return tr("Value"); 185 | } else { 186 | return section; 187 | } 188 | } 189 | 190 | void LockBitsModel::reloadModel() 191 | { 192 | this->dataChanged(this->index(1,0), this->index(1, this->rowCount(this->index(-1, -1)))); 193 | } 194 | 195 | Qt::ItemFlags LockBitsModel::flags(const QModelIndex &index) const 196 | { 197 | if (index.column() == 1) { 198 | return Qt::ItemIsEditable | Qt::ItemIsEnabled; 199 | } 200 | return Qt::ItemIsEnabled; 201 | } 202 | 203 | QVariant LockBitsModel::data(const QModelIndex &index, int role) const 204 | { 205 | int rowCounter = 0; 206 | for (int j = 0; jlockbyte.bitFields.count(); j++) { 207 | if (rowCounter == index.row()) { 208 | switch (index.column()) { 209 | case 0: { // fuse name 210 | switch(role) { 211 | case Qt::DisplayRole: return part->lockbyte.bitFields[j].shortName; break; 212 | case Qt::ToolTipRole: return part->lockbyte.bitFields[j].text; break; 213 | }; // switch role 214 | } break; // column 0 215 | case 1: { // fuse value 216 | if (role == Qt::UserRole) { 217 | return QVariant::fromValue(part->lockbyte.bitFields[j]); 218 | } else if (role == Qt::DisplayRole) { 219 | return part->lockbyte.bitFields[j].value; 220 | } 221 | } break; // column 1 222 | } // switch index 223 | break; 224 | } // we have found the searched bitfield 225 | rowCounter++; 226 | } // this loops on the fuses bitfields 227 | return QVariant(); 228 | } 229 | 230 | bool LockBitsModel::setData(const QModelIndex &index, const QVariant &value, int role) 231 | { 232 | int rowCounter = 0; 233 | if ((role == Qt::DisplayRole) || (role == Qt::EditRole)) { 234 | if (index.column() == 1) { //is the index points to the lockbits value column? 235 | for (int j = 0; jlockbyte.bitFields.count(); j++) { // this loops on the lockbits bitfields 236 | if (rowCounter == index.row()) { 237 | part->lockbyte.bitFields[j].value = value.toInt(); 238 | part->lockbyte.value &= ~part->lockbyte.bitFields[j].mask; 239 | int l; 240 | for (l = 0; l<8; l++) { 241 | if (part->lockbyte.bitFields[j].mask & (1<lockbyte.value |= part->lockbyte.bitFields[j].value * (1<lockbyte.bitFields.count(); 260 | } 261 | 262 | int LockBitsModel::columnCount(const QModelIndex &parent) const 263 | { 264 | if (parent.isValid()) 265 | return 0; 266 | return 2; 267 | } 268 | -------------------------------------------------------------------------------- /qavrdude/icons/utilities-terminal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 14 | 24 | 26 | 30 | 34 | 35 | 45 | 47 | 51 | 55 | 59 | 60 | 69 | 71 | 75 | 79 | 80 | 89 | 91 | 95 | 99 | 103 | 107 | 108 | 117 | 119 | 123 | 127 | 128 | 138 | 140 | 144 | 148 | 149 | 158 | 160 | 164 | 168 | 169 | 178 | 180 | 184 | 188 | 189 | 198 | 200 | 204 | 208 | 209 | 218 | 219 | 221 | 224 | 231 | 235 | 239 | 240 | 249 | 258 | 267 | 276 | 280 | 284 | 285 | 286 | -------------------------------------------------------------------------------- /xml_converter/xmlconverter.cpp: -------------------------------------------------------------------------------- 1 | #include "xmlconverter.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | XMLConverter::XMLConverter(QObject *parent) : 9 | QObject(parent) 10 | { 11 | database = QSqlDatabase::addDatabase("QSQLITE"); 12 | if (!database.isValid()) { 13 | QMessageBox::warning(0, tr("Arrgh"), tr("The SQLITE database plugin for Qt cannot be loaded.\nAre you sure that it is installed?")); 14 | } 15 | } 16 | 17 | bool XMLConverter::truncate(QString sqlite) 18 | { 19 | database.setDatabaseName(sqlite); 20 | if (!database.open()) { 21 | logMessage(tr("Unable to open database: %1").arg(database.lastError().driverText())); 22 | return false; 23 | } 24 | 25 | QStringList tables; 26 | tables << "bitfields" << "bitfields_enums" << "device_register_types" << "devices" << "devices_registers"; 27 | 28 | foreach (QString table , tables) { 29 | QSqlQuery query(database); 30 | query.prepare("DELETE FROM " + table); 31 | if (!query.exec()) { 32 | logMessage(tr("Unable to truncate table: %1").arg(table)); 33 | return false; 34 | } 35 | } 36 | 37 | return true; 38 | } 39 | 40 | bool XMLConverter::convert(QString sqlite, QString xmlsDir) 41 | { 42 | QDir dir(xmlsDir); 43 | QStringList fileList = dir.entryList(QStringList("*.xml")); 44 | 45 | if (!truncate(sqlite)) { 46 | return false; 47 | } 48 | 49 | /*if (!parseFile(dir.path()+"/ATmega128.xml")) { 50 | emit logMessage(tr("Parsing failed")); 51 | return false; 52 | } 53 | return true;*/ 54 | 55 | if (fileList.isEmpty()) { 56 | emit logMessage("The XMLs folder does not contains any XML file!"); 57 | return false; 58 | } 59 | QSqlQuery query; 60 | query.exec("BEGIN"); 61 | 62 | foreach (QString devxml, fileList) { 63 | if (!parseFile(dir.path()+"/"+devxml)) { 64 | emit logMessage(tr("Parsing failed")); 65 | return false; 66 | } 67 | } 68 | query.exec("COMMIT"); 69 | return true; 70 | } 71 | 72 | 73 | bool XMLConverter::sqlError(QSqlQuery *query) 74 | { 75 | return QMessageBox::critical(NULL, 76 | tr("SQL error"), 77 | tr("An error happend during executing the following query:\n" 78 | "%1\n" 79 | "Error string:\n" 80 | "%2") 81 | .arg(query->lastQuery()) 82 | .arg(query->lastError().text()), 83 | QMessageBox::Abort, 84 | QMessageBox::Discard) == QMessageBox::Discard; 85 | } 86 | 87 | bool XMLConverter::parseFile(QString file) 88 | { 89 | startTime = QTime::currentTime(); 90 | QSqlQuery query(database); 91 | domFile.setFileName(file); 92 | QFileInfo info(domFile); 93 | 94 | quint8 sign0, sign1, sign2; // signature bytes 95 | 96 | QDomNode signatureNode = domDoc.elementsByTagName("SIGNATURE").item(0); 97 | if (!signatureNode.isNull()) { 98 | QDomNode byte = signatureNode.firstChild(); 99 | QDomElement currentElement; 100 | while(!byte.isNull()) { 101 | bool ok = false; 102 | currentElement = byte.toElement(); 103 | if (currentElement.tagName() == "ADDR000") { 104 | sign0 = currentElement.text().right(2).toInt(&ok, 16); 105 | } else if (currentElement.tagName() == "ADDR001") { 106 | sign1 = currentElement.text().right(2).toInt(&ok, 16); 107 | } else if (currentElement.tagName() == "ADDR002") { 108 | sign2 = currentElement.text().right(2).toInt(&ok, 16); 109 | } 110 | byte = byte.nextSibling(); 111 | } 112 | } 113 | 114 | 115 | query.prepare("INSERT INTO devices (name, S0, S1, S2) VALUES(:device, :s0, :s1, :s2)"); 116 | query.bindValue(":device", info.baseName()); 117 | query.bindValue(":s0", sign0); 118 | query.bindValue(":s1", sign1); 119 | query.bindValue(":s2", sign2); 120 | 121 | if (!query.exec()) { 122 | sqlError(&query); 123 | return false; 124 | } 125 | 126 | int deviceId = 0; 127 | query.exec("SELECT last_insert_rowid()"); 128 | if (query.next()) { 129 | deviceId = query.value(0).toInt(); 130 | } else { 131 | logMessage(tr("Cannot retrive last_insert_rowid()")); 132 | return false; 133 | } 134 | 135 | if (!domFile.open(QFile::ReadOnly)) { 136 | throw QString(tr("Could not open the %1 xml file")).arg(file); 137 | } 138 | 139 | if (!domDoc.setContent(&domFile)) { 140 | domFile.close(); 141 | return false; 142 | } 143 | domFile.close(); 144 | 145 | QDomElement v2 = domDoc.documentElement().firstChildElement("V2"); 146 | printTimeElapsed(); 147 | if (v2.isNull()) { 148 | qWarning() << tr("Could not find the V2 tag in the xml file. Maybe you should update it to a newer one."); 149 | return false; 150 | } else { 151 | QDomNodeList list = v2.elementsByTagName("registers"); 152 | int regCount = 0; 153 | for (int i = 0; i 173 | */ 174 | void XMLConverter::parseRegisterDetailsFromNode(QDomNode registersNode, int deviceId, QSqlQuery & query) 175 | { 176 | // this will iterate on the high, low, extended fuses or on fuse[N] keys at xmega devices 177 | for(int i = 0; i 2 | 3 | 4 | 12 | 14 | 16 | 20 | 24 | 25 | 27 | 31 | 35 | 36 | 38 | 42 | 46 | 47 | 49 | 53 | 57 | 58 | 60 | 64 | 68 | 69 | 71 | 75 | 79 | 80 | 82 | 86 | 90 | 91 | 93 | 97 | 101 | 102 | 104 | 108 | 112 | 113 | 123 | 132 | 141 | 149 | 158 | 167 | 176 | 185 | 194 | 195 | 197 | 200 | 205 | 209 | 214 | 218 | 222 | 226 | 230 | 234 | 238 | 242 | 246 | 250 | 254 | 258 | 262 | 263 | 264 | 265 | -------------------------------------------------------------------------------- /qavrdude/icons/locked.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 14 | 16 | 20 | 24 | 25 | 35 | 37 | 41 | 45 | 46 | 55 | 57 | 61 | 65 | 69 | 73 | 77 | 78 | 87 | 89 | 93 | 97 | 98 | 107 | 109 | 113 | 117 | 118 | 127 | 129 | 133 | 137 | 138 | 147 | 154 | 157 | 158 | 168 | 170 | 174 | 178 | 179 | 189 | 198 | 205 | 208 | 209 | 211 | 215 | 219 | 220 | 229 | 231 | 235 | 239 | 243 | 244 | 253 | 256 | 259 | 260 | 262 | 266 | 270 | 271 | 280 | 281 | 283 | 287 | 291 | 294 | 298 | 302 | 306 | 310 | 314 | 318 | 322 | 326 | 330 | 331 | 335 | 339 | 343 | 353 | 357 | 361 | 364 | 368 | 372 | 377 | 378 | 383 | 386 | 390 | 395 | 396 | 397 | 398 | -------------------------------------------------------------------------------- /qavrdude/icons/gconf-editor.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 33 | 35 | 39 | 43 | 44 | 46 | 50 | 54 | 55 | 57 | 61 | 65 | 66 | 68 | 72 | 76 | 77 | 87 | 97 | 107 | 117 | 119 | 123 | 127 | 131 | 135 | 139 | 140 | 142 | 146 | 150 | 151 | 153 | 157 | 161 | 162 | 164 | 168 | 172 | 173 | 182 | 191 | 200 | 202 | 206 | 210 | 211 | 220 | 229 | 238 | 247 | 256 | 265 | 274 | 284 | 293 | 302 | 312 | 321 | 330 | 339 | 340 | 344 | 348 | 352 | 356 | 360 | 364 | 368 | 372 | 376 | 380 | 384 | 386 | 396 | 400 | 410 | 414 | 424 | 434 | 444 | 448 | 452 | 453 | 454 | -------------------------------------------------------------------------------- /qavrdude/icons/avr.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 24 | 26 | 27 | 29 | image/svg+xml 30 | 32 | 33 | 34 | 35 | 36 | 38 | 45 | 52 | 62 | 64 | 68 | 72 | 73 | 82 | 84 | 88 | 92 | 93 | 102 | 104 | 108 | 112 | 113 | 123 | 124 | 144 | 147 | 154 | 161 | 168 | 175 | 182 | 189 | 196 | 203 | 210 | 217 | 224 | 231 | 238 | 245 | 252 | 259 | 266 | 273 | 280 | 287 | 294 | 301 | 308 | 315 | 322 | 329 | 336 | 343 | 347 | 350 | 354 | 358 | 362 | 366 | 370 | 374 | 378 | 382 | 386 | 390 | 394 | 398 | 402 | 406 | 410 | 414 | 418 | 422 | 426 | 430 | 434 | 438 | 442 | 446 | 450 | 454 | 458 | 462 | 466 | 470 | 474 | 478 | 482 | 486 | 497 | 499 | 503 | 507 | 508 | 509 | 510 | --------------------------------------------------------------------------------