Author Topic: Code::Blocks for Arduino UNO - help with setup, pls.  (Read 10993 times)

Offline louarnold

  • Single posting newcomer
  • *
  • Posts: 5
Code::Blocks for Arduino UNO - help with setup, pls.
« on: August 07, 2012, 10:02:31 pm »
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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Code::Blocks for Arduino UNO - help with setup, pls.
« Reply #1 on: August 22, 2012, 09:41:38 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline louarnold

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code::Blocks for Arduino UNO - help with setup, pls.
« Reply #2 on: August 22, 2012, 11:10:06 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.