Pages: 1 2 [3] 4 5   Go Down
Author Topic: AVRProjectIDE - Editor for AVR/Arduino Projects  (Read 11458 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

<LinkLibList>
        <Lib>D:\Arduino\Parleds\libACW001.a</Lib>
</LinkLibList>

to

<LinkLibList>
        <Lib>libACW001.a</Lib>
</LinkLibList>



edit:

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

« Last Edit: January 12, 2010, 10:15:11 am by renearts » Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 593
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

edit: update 69 issued
« Last Edit: January 12, 2010, 09:19:03 am by frank26080115 » Logged

Freelance engineer, consultant, contractor. Graduated from UW in 2013.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 8-)
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 smiley
« Last Edit: January 12, 2010, 10:53:32 am by renearts » Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 593
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Freelance engineer, consultant, contractor. Graduated from UW in 2013.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Greece
Offline Offline
Full Member
***
Karma: 2
Posts: 172
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 593
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Greece
Offline Offline
Full Member
***
Karma: 2
Posts: 172
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :-)

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

Greece
Offline Offline
Full Member
***
Karma: 2
Posts: 172
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :-)

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 ! ! !
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 593
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: April 18, 2010, 01:11:20 pm by frank26080115 » Logged

Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Greece
Offline Offline
Full Member
***
Karma: 2
Posts: 172
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Dear frank26080115,

Thank you very much for the fast reply again ! ! ! :-)

I can say you help me alot ! ! ! :-)

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 :-)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Logged

Greece
Offline Offline
Full Member
***
Karma: 2
Posts: 172
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi waggish ,

Thank you very much. smiley
Logged

Greece
Offline Offline
Full Member
***
Karma: 2
Posts: 172
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi frank26080115,

I was try to use the WString.h, so i copy all the files in the arduino folder in the same folder where the AVRProjectIDE is i try to compile and i get errors, and i try  

$include <WString.h>
#include <string.h>  // i add this and then compile without problem.

This is the correct way ? (just for information  8-) )

Thank you in Advance. smiley
Logged

Pages: 1 2 [3] 4 5   Go Up
Jump to: