User forums > General (but related to Code::Blocks)

CodeBlock with ArduinoBuilder

(1/3) > >>

d00m:
Hello

I'm using CodeBlocks Arduino IDE from this link.

http://arduinodev.com/codeblocks/

Now it is pretty outdated and I want update at least Arduino Builder in this package.
But seems it is not trivial task because simple rewriting Arduino Builder files in folder by new versions doesn't work..

Is there someone who can help me and advice how to update Codeblock with Arduino Builder?
Or at least update ArduinoBuilder part in this old CodeBlocks Arduino IDE from Release 20140626.

I don't understand how Arduino Builder connected to CodeBlock..
When I press Run button - ArduinoBuilder opened and I can upload code to my MCU.
How to do it in new version of CodeBlock?

Also - when I create project for Arduino in CodeBlocks Arduino IDE - it creates project with Source file with INO extension, like usual Arduino IDE
But when I did it in New version of CodeBlock - codeblocks-17.12mingw-nosetup - it created CPP file..
So seems I cant use CodeBlock for my Arduino code even without ArduinoBuilder.
I don't know how to compile and upload it to my MCU.

Thank you.

oBFusCATed:
I'm using these templates: https://github.com/obfuscated/cb_arduino_template
I don't know what is arduino builder, but I know that the arduino project now uses a go based build system. Probably it is the same.
I guess if you want to use it you can probably set it up as a custom makefile based project in C::B.
I've never tried, I guess we'll have to change things a bit for best integration.

Concrete feature requests are welcome.

zdena:
Hi,
I use C::B for programming Arduino.

I don’t do classical building and compilation with makefile but I use „arduino-builder.exe“ with help of C::B environment and custom variables. (Another next options are needed to set probably.)

So the “Build” consists of:

* I call two Pre-build steps with arduino-builder.exe (as Arduino IDE calls)
* I don’t do any main compilation (only set of dummy target and dummy compilator is needed) and then
* I call Post-build step with avr-size for information about memories only.For uploading I call separate tool+ with avrdude.
As a serial monitor I use another SW called from C::B as a tool+ again.

Change of Arduino version is then almost easy: Only to store new „arduino-1.x.y“ directory inside C::B directory and to change environment variable with correct version.

As a start I use adapted template from oBFusCATed. I have only Mega2560 and Arduino pro Mini 328 in the template. I tried to put the most of variables inside the template and it works somehow. Unfortunately it is more than year ago so I forgot how I did it  :) (The script language is not easy for me.)
 But it can help you maybe.

oBFusCATed:
 Sorry, your template maybe worked well but something wasn’t good for me probably (maybe the updating of version). So I adapted it for working with arduino builder. I know this solution is not perfect (for example parsing of warnings and errors moves me to the temporary file in the temporary sketch folder instead of in the project files) but it works somehow.

oBFusCATed:
@zdena: Don't worry too much.

My adapted template is not something that could be made to work reliably in the long run, because it requires internal knowledge of arduino's structure and a lot of copy-pasting of options.
Also it requires constant updates, but I program for arduino once or twice a year.

I guess the arduino builder path is the better option for general Arduino dev by the regular type of Arduino users (novices mostly).
Would it be possible to write a detailed wiki article with your setup? It might be helpful for others.

The only downside of the arduino builder approach is that you loose the control on the options you pass to compiler/linker, probably.

zdena:
Wiki page? Good idea and challenge for me ??? Maybe it helps me to understand how the builder really works :) But it takes week(s) - I am slow :)

Navigation

[0] Message Index

[#] Next page

Go to full version