Go Down

Topic: AVRProjectIDE - Editor for AVR/Arduino Projects (Read 13272 times) previous topic - next topic

DigitalJohnson

Hi Frank,
First, GREAT WORK! I love the look and feel of your IDE. I think I'm really going to like using it over the Arduino IDE. It has way more features, and I always like more features. It was easy to get it going with my ArduinoMEGA. I have encountered a problem though, but I'm not sure if it's your IDE. I loaded a sketch I wrote with the arduino IDE that has multiple header files as tabs in that IDE. It compiles and runs fine with the arduino IDE. When I try to compile with AVRprojectIDE I get a bunch of 'multiple definition of' errors occuring in the library files I've included. The strange thing is, the line number of the first definition is the same line number of the multiple definition error in every occurence of that type of error. Next, I'm getting some 'was not declared in this scope' errors. I get some 'This file has been moved to' errors. Some 'Initialization makes integer from pointer without a cast' errors, 'Only initialized variables can be placed into program memory area' errors, and one 'comparison between signed and unsigned integer expression' error. The scope errors are from function declarations in tabbed header files I wrote. All other errors are occuring inside included libraries (Tone & wiring). I have several other libraries included also, no errors with them. I've heard of, but not used the IDE's you've based yours on, so I'm not sure if these are bugs or if I have to change my syntax for this IDE.

 Anyway, I still think I'll like your IDE better.

            Thanks, DigitalJohnson
DigitalJohnson

wlewis

Hi.. I just got a headache trying to figure out what this does. Please provide a simple description of what your IDE does.

otherwise.. PLEASE HELP!!!.. Im looking for a way to use the arduino libraries in avr.. REASON BEING i want to use an atmega32 and other chips and dont want to be STUCK with the arduino chips.

The libraries available for AVR out there are """"RIDICULOUS""""" compared to the arduino libraries. Gee.. i might be a wee bit frustrated.



Can this IDE do that? If not how do I do that?

frank26080115

#47
Aug 26, 2010, 08:58 pm Last Edit: Aug 26, 2010, 09:02 pm by frank26080115 Reason: 1
Hi wlewis

I hope you read my project's website to figure out what the IDE does

ways to use Arduino libraries without utilizing the Arduino core:

1:
I tend to stay away from Arduino libraries simply because most of them are C++, and I usually work in C only, so if I ever needed to use an Arduino library, I tend to convert them to C code myself. Some of the libraries are simply wrappers for C libraries anyways, in which case I just take the C files and use them instead.

Also start using AVR-Libc
http://www.nongnu.org/avr-libc/user-manual/modules.html
You LITERALLY cannot program AVRs in C or C++ without AVR Libc (unless you are not using open source), because without avr/io.h, you have no access to any of the AVR hardware.

2:
If the library you need is C++, then start a C++ project using my IDE, if the library is C, then start a C project. Add in the library into the project.

Remember, C++ projects can use C libraries but C projects can't use C++ libraries. There might be a way though.

----------------------

Both these methods require you to know how the open source GCC tools for AVRs work and how C works.

The basic rule is to compile code files, and #include header files, most of the time, a header file is there so that one code file can call functions (and use variables and constants and other definitions) from another code file. My IDE will compile all the code files you want it to compile, your job is to find those files within the libraries.

I'm trying to say that each library must be treated differently, so you need to know what to do with the library files yourself.

--------------

The libraries out there for AVRs are waaaaaaayyyy better than the stuff for Arduino, for example:

LUFA, for my Teensy++ when it needs to do USB stuff
V-USB, for less complicated USB projects that I think Teensy++ is over-kill for
FatFs, great if you ever need to work with SD cards (data logger, mp3 player)
Procyon AVRlib, I've never used this, but if you are too lazy to write your own code, this library covers a lot of popular functions


--------------------

To all the other people that didn't get a reply, I don't check this forum often

DigitalJohnson, I can't figure out the issue without a lot more details, also Tone is annoying since it uses an interrupt and you never know what might conflict with it, I know SoftPWM conflicts with it, try using SoftPWM and Tone together and you will have problems

tasosstr, I have no idea during which release WString.h was added to Arduino's core, I don't believe my releases included it, I'll check and fix that when i get home

waggish, creating archive libraries for AVR C projects is a dangerous game, an archive created for one chip or one clock speed may not be compatible with another configuration, only use archives for functions which are abstracted away from AVR hardware and disregards timing
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

I'm running WinXP x64 with last update. I have installed the version 95 of your ide. On the welcome window I receive this error message but I can ping code.google.com

Error retrieving news, The remote name could not be resolved: 'code.google.com'

frank26080115

unless i do debugging on your machine, there really isn't much i can do about that error

it probably also means update checking wouldn't work, so you should check for updates yourself

i update pretty frequently depending on what needs to be done
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

tasosstr

Hello Dear frank26080115,

Thank you for remember me. :)

PS. I have take off the TONE.CPP compiles with out any error but when i was upload to the board then the Pin 13 it was always off :-(

If it is possibol and if you have time it will be nice to have Print and Print Preview Buttons  ;)

Have a nice time  ;)

maui

first sorry my poor english.
i install and test some little arduino sketchs and found this editor is far better than arduino ide.
But i notice that the hex files generate by avrproject ide is always larger than the hex file generate by arduino ide. i'm missing some optmization option or avrprojectide include some lib that arduino dont?

frank26080115

I'm not including anything extra, the original arduino ide might exclude some files if they are not used, i have no idea how it manages to do that if it does indeed do that unless it manually searches for function names

i don't like making things using the arduino core anyways so my code size is always smaller
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

tasosstr

I will agree with maui,

for some reason i got also more byte of code at the end of the compile.

One simular program with this it is this
http://www.electoday.com/bbs/viewthread.php?tid=1899

downloadfrom here http://arduinosketch.codeplex.com/

this make the same size with the arduino ide.


Senso

Ridiculous in what?
That they are much better than the arduino bloated, slow and ram consuming pseudo libs that are ported from pure avr code to this c++ thingie...
Why do you need buffers for everything?
Really, 2k to blink a led, in avr studio and nice C code that will thake you about 180Bytes of flash space a ZERO ram.

Graynomad

Hi Frank,

Just downloaded 103 and love the look of it but cannot get the simplest prog to compile. It's just an empty setup() and loop() but I get 8 errors from WInterrupts.c about undeclared INT0, INT1 etc.

______
Rob



Rob Gray aka the GRAYnomad www.robgray.com

frank26080115

i'm going to need a lot more detail than that to help, I need the details about the errors, the build log, you need to tell me how you configured your project, and what are your files.
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Graynomad

OK,

the only file is

Code: [Select]

void setup()
{

}

void loop()
{

}


I created a new Arduino project using the wizard.

Warnings/errors, is there any way to export them, a verbose switch or something, otherwise I can provide a screen shot.
.
Build log (I assume this is it)

Quote
Build Failed with 8 errors
(.data + .bss + .noinit)
Data:        211 bytes (10.3% Full)
(.text + .data + .bootloader)
Program:    2926 bytes (8.9% Full)
Device: atmega328p
----------------
AVR Memory Usage
Execute: avr-size -C --mcu=atmega328p Sketch_12_22_2010_5.elf
Execute: avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings  -O ihex Sketch_12_22_2010_5.elf Sketch_12_22_2010_5.eep
Execute: avr-objcopy -R .eeprom -R .fuse -R .lock -R .signature -O ihex Sketch_12_22_2010_5.elf Sketch_12_22_2010_5.hex
Deleted: 'HardwareSerial.o', 'pins_arduino.o', 'Print.o', 'Tone.o', 'wiring.o', 'wiring_analog.o', 'wiring_digital.o', 'wiring_pulse.o', 'wiring_shift.o', 'WMath.o', 'WString.o', 'arduino_temp_main.o', 'HardwareSerial.d', 'pins_arduino.d', 'Print.d', 'Tone.d', 'wiring.d', 'wiring_analog.d', 'wiring_digital.d', 'wiring_pulse.d', 'wiring_shift.d', 'WMath.d', 'WString.d', 'arduino_temp_main.d',
Deleting: HardwareSerial.o pins_arduino.o Print.o Tone.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o WString.o arduino_temp_main.o  libSketch_12_22_2010_5.a HardwareSerial.d pins_arduino.d Print.d Tone.d wiring.d wiring_analog.d wiring_digital.d wiring_pulse.d wiring_shift.d WMath.d WString.d arduino_temp_main.d  libSketch_12_22_2010_5.a
Execute: avr-gcc -mmcu=atmega328p -Wl,-Map=Sketch_12_22_2010_5.map -Wl,--gc-sections -O0 HardwareSerial.o pins_arduino.o Print.o Tone.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o WString.o arduino_temp_main.o   -lm -lc -o Sketch_12_22_2010_5.elf
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT arduino_temp_main.o  -c  -std=c99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/arduino_temp_main.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT WString.o  -c  -std=c99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/WString.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT WMath.o  -c  -std=c99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/WMath.cpp"
Execute: avr-gcc -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring_shift.o  -c  -std=gnu99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/wiring_shift.c"
Execute: avr-gcc -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring_pulse.o  -c  -std=gnu99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/wiring_pulse.c"
Execute: avr-gcc -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring_digital.o  -c  -std=gnu99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/wiring_digital.c"
Execute: avr-gcc -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring_analog.o  -c  -std=gnu99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/wiring_analog.c"
Execute: avr-gcc -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT wiring.o  -c  -std=gnu99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/wiring.c"
####Error: object file not created at D:\temp\output\WInterrupts.o
Execute: avr-gcc -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT WInterrupts.o  -c  -std=gnu99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/WInterrupts.c"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT Tone.o  -c  -std=c99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/Tone.cpp"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT Print.o  -c  -std=c99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/Print.cpp"
Execute: avr-gcc -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT pins_arduino.o  -c  -std=gnu99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/pins_arduino.c"
cc1plus.exe: warning: command line option "-std=c99" is valid for C/ObjC but not for C++
Execute: avr-g++ -I"D:\temp" -I"C:\Program Files\AVRProjectIDE\arduino\core" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Rob\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega328p -DF_CPU=16000000UL -O0 -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -MD -MP -MT HardwareSerial.o  -c  -std=c99 "C:/Users/Rob/AppData/Roaming/AVRProjectIDE/temp/HardwareSerial.cpp"



______
Rob


Rob Gray aka the GRAYnomad www.robgray.com

frank26080115

There is no way to export it, a screenshot would help, I can't replicate your problem
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Graynomad

Rob Gray aka the GRAYnomad www.robgray.com

Go Up