The main file in this repository is CuteAVR.pro which allows you to write, build and/or deploy programs for AVR microcontrollers using Qt creator IDE.
- Qt framework: Only Qmake and Qt creator are required.
- AVR GNU Toolchain.
- avrdude. (Optional)
- Open Qt creator and make new "empty qmake project".
- Click File menu then click New file or project then choose Other Project then Empty qmake project. This will create an empty project which has an empty Qt project (.pro) file.
- Open CuteAVR.pro file in any text editor and copy it's contents to your empty Qt project (*.pro) file.
- Change the contents of your .pro file to match your needs. Note that you need to run qmake everytime you change the .pro file to allow the changes to take effect.
- Add C/header files to your new qt creator project as usual.
- Write code then build it aaaaaaaaand Have Fun.
This is a list of some important qmake variables and configuration directives that you need to worry about before building the project. Most of these configurations need to be set only once and don't change
- MCU = atmega328p: set the variable MCU to the part number of the AVR microcontroller you're using. (atmega328p is the default).
- CONFIG += upload_hex: This line is used to tell qmake to generate an upload step after building the source code. in the upload step qmake uses avrdude tool to upload the resulted .hex file to the avr microcontroller you're using. If you don't want this step to be executed comment this line out (i.e precede it with a #)
- AVR_TOOLCHAIN_DIR = "": Use this qmake variable to tell qmake where to find avr-gnu toolchain directory in your system.
- UPLOADER_DIR = "": use this qmake variable to tell qmake where your uploader (avrdude) binary lives in your system.
- UPLOADER_PORT = "": Tell qmake you're connecting your programmer to which port.
Note: This has been only tested on Windows OS, but it should work on other operating systems (GNU/Linux and others) too