News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Code::Blocks for Arduino UNO - help with setup, pls.

Started by louarnold, August 07, 2012, 10:02:31 PM

Previous topic - Next topic

louarnold

I have the Arduino 1.0.1 IDE installed. It works fine. The board is an UNO R3. I installed the Code::Blocks for Arduino IDE. It has a few problems, but they can perhaps be solved with a few questions.

There is apparently a template for an Arduino project.
I see no UNO target in the list. Should I be picking something else or is there a way of adding the UNO to the list?

Selecting Simulator-Release results in an error-free build. The default compiler is GNU AVR GCC. The Blink program is default.
Which compiler should I be using?

I tried choosing a target of Duemilanove 328. The build worked.
Choosing Tools>USB Upload (flash) results in Launching tool 'USB Upload (Flash)': avrdude -C "C:\CodeBlocks\/etc/avrdude.conf" -V -patmega328p -carduino -P\\.\COMM4 -b57600 -D -Uflash:w:H:\ArduinoProjects\CBTest2\/bin\Release\CBTest2.elf.hex:i (in...
I entered the "COMM4" manually in the Project>Build Options>Custom Variable tab. The settings are as follows:
ARDUINO_DIR=$(APP_PATH)/arduino
UPLOAD_PORT=COMM4
MCU=atmega328p
Board=Arduino Duemilanove(328)
UPLOAD_BAUDRATE=57600

What am I doing wrong? What am I missing to make this work?

MortenMacFly

Quote from: louarnold on August 07, 2012, 10:02:31 PM
I have the Arduino 1.0.1 IDE installed.
This is Java based IDE not related to Code::Blocks at all. Why do you ask here?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

louarnold

Quote from: MortenMacFly on August 22, 2012, 09:41:38 PM
Quote from: louarnold on August 07, 2012, 10:02:31 PM
I have the Arduino 1.0.1 IDE installed.
This is Java based IDE not related to Code::Blocks at all. Why do you ask here?
The Arduino IDE is rather poor in terms of capability. Code::Blocks is a better alternative.

I have solved the problem. This project template of CodeBlocks may have a bug: In order to be able to select the UNO as the target, I must (when selecting the compiler) select both Create Debug and Release configurations. Selecting only one of them omits the UNO from the list of targets.