AVRProjectIDE - Editor for AVR/Arduino Projects

New update must be downloaded as a package, it includes a new feature i called "hardware explorer", it displays information about your chip, such as memory, available hardware IO registers (their name, description, bits, descriptions for the bits, R W or RW, etc), available interrupt vectors (name, with new and old vector spellings), pin discriptions for all available packages, and some other stuff.

fixed a few bugs regarding autocomplete

This looks great but I'm having trouble getting started trying it out. How do I tell it where avrdude and avr-gcc etc. are installed? I don't see any options in the config screen for that, and it can't find either of them (they are in "D:\arduino-0017\hardware\tools\avr\bin" in my case).

Andrew

it expects you to have an installation of WinAVR, you must be able to launch the avr binary utilities from the command line without a full path or being in their directories.

great work!

Very nice you are working on this!

I am experiencing some problems though with code that compiles ok in the Arduino IDE, but not with yours. For example, I am using NewSoftSerial and SoftwareServo in my PDE. For both libraries I have an include. For example, I get messages: 'NewSoftSerial' does not name a type, 'Servo1' was not declared in this scope. Maybe it is a setting I am not aware of, but like I said, I don't get these messages in the Arduino IDE.

I also have a couple of suggestions:

  • For example, Ctrl-G, to Go To a line (like in VS editor)
  • Automatic save of (changed) files for backup every 5 minutes or so (I mention this because I let my computer on last night, for some reason the computer shut down and I lost my changes)

Looking forward to new version!

i was able to compile the example sketch in newsoftserial just fine

the editor does do backups every 30 seconds by default, the backup disappears if the editor shuts down cleanly (not a crash or power outage)

i'll add the goto later

edit:

goto added

At first!: very nice project! Your IDE feels and looks very nice! Keep up the good work! Works like a charm when configured correctly!

I have some small issues though:

  • In the Project Configuration screen, the AVRDUDE Command Builder parameters reset every time, except for the port override option. Also tried it applying the Atmega328p template, but it still resets to the first items in the list. When configuring the right options, save&close the dialog, then program it does work correctly. Though it does not seem to read back the project data or something when reopening the project config dialog.

  • I have a library file in my project dir, "libACW001.a" and .h. which I use for several functions. In AVR Studio 4 this works fine, by setting my project dir as library path. The files then appear as libraries which can be added in the project config dialog in AVR Studio. Though AVR Project IDE seems not to search this dir? The file libACW001.a does not appear in the available link objects list, where it does in AVR Studio.
    Manually adding the file via the add file option introduces the entire path as well causing the following error:

Build Failed with 0 errors
Execute: rm -rf parledspwmed.o libparledspwmed.a parledspwmed.d libparledspwmed.a
####Error: ELF file not created at D:\Arduino\Parleds\default\parledspwmed.elf
c:/winavr-20090313/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: cannot find -lD:\Arduino\Parleds\libACW001
Execute: avr-gcc -mmcu=atmega328p -Wl,-Map=parledspwmed.map -Wl,--gc-sections -Os libparledspwmed.a parledspwmed.o -L"D:\Arduino\Parleds" -l"D:\Arduino\Parleds\libACW001" -o parledspwmed.elf
Execute: avr-ar rcs libparledspwmed.a
Execute: avr-gcc -I"D:\Arduino\Parleds" -I"D:\Arduino\Parleds" -I"D:\Arduino\Parleds" -mmcu=atmega328p -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -Wall -gdwarf-2 -MD -MP -MT parledspwmed.o -c -std=gnu99 "D:/Arduino/Parleds/parledspwmed.c"

Has this something to do with the use of \ instead of /?

Finally got it working by editting the parledspwmed.arvproj file and changing

D:\Arduino\Parleds\libACW001.a

to

libACW001.a

edit:

Thanks Frank, quick reaction and works like a charm now! :slight_smile:

thanks for the report, working on a fix today, will issue an update soon

edit: update 69 issued

Maybe an addition for the next update: an integrated terminal window for viewing incoming serial port data, i.e. in the bottom toolbar. The programming part should then be able to close the connection for programming, and after the programming the readout can be started again. With this feature there is no need for an external terminal viewer for most devvers I think...

edit:
I'm so sorry, hadn't found it untill yet :-[ Though now I have :sunglasses:
Manually reconnecting isn't quite a problem, works fine the way it is implemented now! Most important in my opinion is that the programmer disconnects the viewer automaticly and the lack of a need for an external viewer.
/me puts a smile on his face and gets back to progging :slight_smile:

I have a serial terminal in the editor already, it should auto disconnect during programming.

Reconnecting the port is kind of tricky since I launch AVRDUDE in a separate command-line window. The reason for this is so that the progress bar can be displayed (stderr redirect in C# is not good enough). So the editor itself can't really tell when the port is ready to be re-opened

I can make it so that it constantly attempts a reconnect but I don't really like that idea

I have started using your IDE but I have a slight problem which I am sure is me rather than the IDE.
I am rather new at AVR/Arduino .
I have got the project to compile and upload fine (it seems) but the serial.println() function now only prints memory addresses .
From the Arduino environment using the the same code this has not happened.
Any ideas ?

It really is a great IDE.

Thanks for all the hard work

Hello,

I Really Really Liky this software and i can't make it to work, when i try to compile i get the bellow message:

Build Failed with 0 errors
Execute: rm -rf libmain.a libmain.a
####Error: ELF file not created at C:\Documents and Settings\Administrator\My Documents\Projects\test\output\main.elf
c:/winavr-20100110/bin/../lib/gcc/avr/4.3.3/../../../../avr/lib/avr25/crttn2313.o:(.init9+0x0): undefined reference to `main'
Execute: avr-gcc -mmcu=attiny2313 -Wl,-Map=main.map -Wl,--gc-sections -Os -L"C:\WinAVR-20100110\lib" -L"C:\WinAVR-20100110\avr\lib" -lm -o main.elf

The code i just use it is:

#include "WProgram.h"

int ledPin = 13; // LED connected to digital pin 13

// The setup() method runs once, when the sketch starts

void setup() {
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()
{
digitalWrite(ledPin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // set the LED off
delay(1000); // wait for a second
}

I try to use it for ATTINY2313

Should i select something on include Dir - include paths ? and include lib ? if yes what ?
for creation tempalete should i choose the initialpde ?

Thank you in advance.

it looks like you are trying to write "Arduino" code but you are not using a .pde file type, so thus it's trying to compile your code as plain C. In real C code, there must be a program entry point function that must be called "main". There are no "setup" or "loop".

If you want to make it compile as "Arduino" code, you need to make sure the file is named with a .pde file extension. But I'm not sure if that will work the best since the Arduino core is not meant for the ATtiny2313. You will likely need to modify the core files.

Hello Dear frank26080115,

Thank you very much for the reply and well done for this nice software ! ! !

I have use the pde as an extension but i believe is the core i will try for the 168 to see if i am licky :slight_smile:

Can i make a c extention and can i use the library from the arduino ?

I was ready to do the same mistake i was create as a source file the main.c and i can't compile so i create again the main.pde and copy everything to this and after a delete the main.c and now it is fine :slight_smile:

Thank you very much ! ! !

The only thing for now is can i use the library from arduino in a .c file ? if yes how ?

Thank you in advance ! ! !

Arduino libraries are usually C++, if it is a C++ library, I think you must write your project as a C++ project unless you write C wrappers with single instances of the classes you will use.

if you want you can pre-compile the library into an object file and link your project with it, this isn't a good idea since you need to recompile the library if you change your clock speed or chip part number

another option is to just copy the library code files into your project so they get compiled along with the project every time you build your project

if you want functions such as pinMode or digitalWrite to work in a C project that is not meant for the Arduino, you need to modify the Arduino core files and add them to the project, or create a custom core (there's an option in my editor for a project to use custom cores, if you wanted to use a sanguino, or teensy, for example). I don't think this will work well for a C project since the Arduino core uses C++, and already defines a "main" function. You'd need to find the files solely responsible for the functions you need. Also classes can't be used in C.

If you are finding that you need to do things that Arduino can't do naturally, start moving away from Arduino, you'll save a lot of headaches

Hello Dear frank26080115,

Thank you very much for the fast reply again ! ! ! :slight_smile:

I can say you help me alot ! ! ! :slight_smile:

Clear many of my questions ...

The only reason i was asking for c and the libraries is to use it for compile the Attiny2313 ( i have already 20 of this and i want to use it somewwhare) and i want to use command like Serial.Println, PWM ....

Thank you again for you're help :slight_smile:

I've the same problem but I resolved it.
Try this:
I've the Core library in my project folder, I renamed it to libcore.a.
Go to the C++ Linker and in the Libraries add your libcore.a as core to the "Libraries (-l)" and in "Libraries Path (-L)" add "${workspace_loc:/test}" if your project folder, where you have the libcore.a is called test.

try to build it now...

Hi waggish ,

Thank you very much. :slight_smile: