Setting Up Codeblock
Setting Up Codeblock
Set the Tool chain directories as appropriate. You may choose WinAVR tool chain or other
tool chain.
For Compiler’s Installation Directory, select the folder one level above the bin folder.
Once you set up the project you need to set the two different project build methods "DEBUG"
and "RELEASE" as per your need.
Now Right click on Project Name in Manager Window (at the top left) and click on properties.
Go to build targets and do appropriate changes if needed. Set the output filename where it need
to appear.
Now Right click on Project in Manager Window (at the top left) and click on project's build
options
This should take you to the "project build options" screen. You then go to:
What you need to do is delete them form the overall "project name".
Copy the following commands and paste them in post build steps for both release and debug.
Name – Give any meaningful name to the programmer such as nano programmer, UNO
Programmer etc
Parameters: Update the parameters as needed depending on the serial port, baud rate etc
Serial port should be taken from device manager and updated in COMxx below.
Parameters:
a. If Using Uno Board
-C"C:\Atmega\programmers\avrdude\avrdude.conf" -patmega328p -carduino
-PCOM34 -b115200 -Uflash:w:${TARGET_OUTPUT_BASENAME}.elf.hex
References:
http://wiki.codeblocks.org/index.php/Variable_expansion
http://www.avrfreaks.net/forum/avr-gcc-code-blocks-codeblocks
http://forums.codeblocks.org/index.php?topic=13616.0
http://www.johnhenryshammer.com/WOW2/pagesHowTo/atmelPage.php#index