Go Down

Topic: Better way for programming with Arduino? (Read 412 times) previous topic - next topic

bivalvo

Hi there.

All this time I've been using Arduino IDE for programming, and I'm very happy with this environment.

But now, as programmer, I've reached a higher level. And I would like to use a better IDE.

My question is pretty simple: is there any IDE (mixed with the appropiated libraries) which could give me the next pros?:

1. Dinamic programming: Autocomplete, easy navigation, ... You know, as Visual Studio does...
2. Complete debug: Memory, variable values, breakpoints, ...
3. Arduino libraries for compatibility with older codes made on Arduino IDE.

Does somebody knows an IDE which could give me all of them? I'm thinking about Visual Micro plugin (for Visual Studio). But I'm not sure if there is possible to debug at low level (memory navigation, for example).

Thank you in advance. And please, excuse my english.

My best regards,
Bivalvo.

PaulS

Quote
2. Complete debug: Memory, variable values, breakpoints, ...
How is a debugger running on the PC going to help debug a program running on the Arduino? When it is on batteries and not even connected to the computer?
The art of getting good answers lies in asking good questions.

Robin2

#2
Jul 26, 2018, 05:40 pm Last Edit: Jul 26, 2018, 05:41 pm by Robin2
Years ago (long before my first Arduino) I spent some time programming on my PC using NetBeans which is a similar concept to Eclipse.

In the end I gave it up in favour of the Geany editor which is what I now use for all my programming (including for my Arduinos). It just makes life much simpler.

And I have written a simple Python program to compile and upload Arduino code using the command-line IDE.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

bivalvo

#3
Jul 26, 2018, 05:49 pm Last Edit: Jul 26, 2018, 05:52 pm by bivalvo
How is a debugger running on the PC going to help debug a program running on the Arduino? When it is on batteries and not even connected to the computer?
For example using a debugger HW which is connected to USB port, as is done with other microcrontrollers. For example you can debug your program on TI using a MSP debugger and the IAR workbench.

Years ago (long before my first Arduino) I spent some time programming on my PC using NetBeans which is a similar concept to Eclipse.

In the end I gave it up in favour of the Geany editor which is what I now use for all my programming (including for my Arduinos). It just makes life much simpler.

And I have written a simple Python program to compile and upload Arduino code using the command-line IDE.

...R
But on Geany you also have not access to the memory. I have to search more about this, but maybe ATMEL STUDIO would be the best option...

EDIT: Sorry, I mean AVR STUDIO

Juraj

#4
Jul 26, 2018, 06:45 pm Last Edit: Jul 26, 2018, 06:48 pm by Juraj
I use Sloeber. It integrates the Arduino core packages used by Arduino IDE into Eclipse. It has all your requirements and more. (I didn't try debugging (JTAG)). One of the best features is instant opening of library source codes.

I use Eclipse for Java at work many years so I was happy I can use it for Arduino too.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

Robin2

But on Geany you also have not access to the memory.
That's quite true. I have never felt the need for it.

And the Atmega 328 and 2560 MCUs don't have provision for accessing memory separately from the running program.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

bivalvo

I use Sloeber. It integrates the Arduino core packages used by Arduino IDE into Eclipse. It has all your requirements and more. (I didn't try debugging (JTAG)). One of the best features is instant opening of library source codes.

I use Eclipse for Java at work many years so I was happy I can use it for Arduino too.
Also memory? :O The possibility of debugging at low level is very useful

That's quite true. I have never felt the need for it.

And the Atmega 328 and 2560 MCUs don't have provision for accessing memory separately from the running program.

...R
Is very important when you're trying to find memory leaks, for example. If you're used to work at this level, it's a essential tool.

Juraj

sorry, I never used mcu hardware supported debugging and I know nothing about it
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

pert

Visual Micro has debugging functionality but some of it is just automatically added Serial.print() statements. It's also possible to do true on chip debugging with the right hardware. The Atmel ICE would be the current debugger of choice for the AVR (works for SAM also) MCUs. You can buy Xplained boards from Microchip that have an onboard debugger, though apparently it's not as good as the ICE. If you're into chips other than AVR that might change things.

I think it could be very useful to have the option of on chip debugging but I don't want to use Atmel Studio and haven't managed to get it working without Atmel Studio so I'm stuck with the Serial.print(). Well, that works OK for me so far.

Robin2

#9
Jul 26, 2018, 10:56 pm Last Edit: Jul 26, 2018, 10:57 pm by Robin2
Is very important when you're trying to find memory leaks,
Why would you have those?

Don't you know what every byte is used for?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Juraj

Don't you know what every byte is used for?

...R
exactly. it is what I like on this small 8-bit chips (and don't like on esp8266)
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

bivalvo

Visual Micro has debugging functionality but some of it is just automatically added Serial.print() statements. It's also possible to do true on chip debugging with the right hardware. The Atmel ICE would be the current debugger of choice for the AVR (works for SAM also) MCUs. You can buy Xplained boards from Microchip that have an onboard debugger, though apparently it's not as good as the ICE. If you're into chips other than AVR that might change things.

I think it could be very useful to have the option of on chip debugging but I don't want to use Atmel Studio and haven't managed to get it working without Atmel Studio so I'm stuck with the Serial.print(). Well, that works OK for me so far.
Excuse me for the late response, but I had a few hard days...

Wow... Atmel ICE is SO expensive...

Maybe Visual Micro is the best solution... I've also worked with Serial.print() on my whole programmer's life, so I do not need much more... Only need to get used to it. Maybe Arduino IDE is not the best IDE, but its integration is (for example, adding plugins for different MCUs, etc.).

Juraj

#12
Aug 09, 2018, 08:51 pm Last Edit: Aug 09, 2018, 08:51 pm by Juraj
Eclipse IDE Arduno plugin uses the same board packages as the Arduino IDE uses

You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

bivalvo

Eclipse IDE Arduno plugin uses the same board packages as the Arduino IDE uses


Hi, Juraj.

Is that option also included on Visual Micro? I'm more interested on this IDE

Juraj

Hi, Juraj.

Is that option also included on Visual Micro? I'm more interested on this IDE
I don't know
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

Go Up