Author Topic: CodeBlock with ArduinoBuilder  (Read 1274 times)

Offline d00m

  • Single posting newcomer
  • *
  • Posts: 6
CodeBlock with ArduinoBuilder
« on: March 16, 2019, 06:52:36 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: CodeBlock with ArduinoBuilder
« Reply #1 on: March 16, 2019, 07:28:41 pm »
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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: CodeBlock with ArduinoBuilder
« Reply #2 on: March 30, 2019, 06:29:17 am »
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.
Windows 10 64b
Arduino 1.8.5 with (modified) Arduino Builder 1.4.5 through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: CodeBlock with ArduinoBuilder
« Reply #3 on: March 30, 2019, 10:52:27 am »
@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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: CodeBlock with ArduinoBuilder
« Reply #4 on: April 01, 2019, 08:17:42 am »
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 :)
Windows 10 64b
Arduino 1.8.5 with (modified) Arduino Builder 1.4.5 through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: CodeBlock with ArduinoBuilder
« Reply #5 on: April 09, 2019, 08:04:10 pm »
I am close to finishing my version of the arduino wizard. I wanted to start with wiki article about this but my forum account doesn't work there. Please, how to make it working?
Windows 10 64b
Arduino 1.8.5 with (modified) Arduino Builder 1.4.5 through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: CodeBlock with ArduinoBuilder
« Reply #6 on: April 10, 2019, 10:05:33 am »
I've pinged one of the admins. Lets see if he can fix it...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11899
    • Travis build status
Re: CodeBlock with ArduinoBuilder
« Reply #7 on: April 13, 2019, 10:33:04 am »
@zdena: Can you try to reset you password and see if you can log with the one sent in the email?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: CodeBlock with ArduinoBuilder
« Reply #8 on: April 15, 2019, 09:20:45 pm »
@oBFusCATed: It still doesn't work. I reset my password. I have got a link for setting of new password. I used it and tried to login with the new password in the wiki. But the wiki still says "Login error There is no user by the name "zdena". Check your spelling."  ???
Windows 10 64b
Arduino 1.8.5 with (modified) Arduino Builder 1.4.5 through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6589
    • My Best Post
Re: CodeBlock with ArduinoBuilder
« Reply #9 on: April 16, 2019, 12:21:59 am »
@oBFusCATed: It still doesn't work. I reset my password. I have got a link for setting of new password. I used it and tried to login with the new password in the wiki. But the wiki still says "Login error There is no user by the name "zdena". Check your spelling."  ???

At one time I have to capitalize my username to use the CB Wiki.
As in use "Zdena" for you. No idea if it is still needed.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: CodeBlock with ArduinoBuilder
« Reply #10 on: April 16, 2019, 09:58:04 pm »
No, Tim, it doesn't work, too. :-\
Windows 10 64b
Arduino 1.8.5 with (modified) Arduino Builder 1.4.5 through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: CodeBlock with ArduinoBuilder
« Reply #11 on: April 29, 2019, 11:14:55 am »
New thread started in Embedded development section.

http://forums.codeblocks.org/index.php/topic,23243.0.html
Windows 10 64b
Arduino 1.8.5 with (modified) Arduino Builder 1.4.5 through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.