AVRProjectIDE - Editor for AVR/Arduino Projects

wow, up until now this is the most complete ide i have seen so far - great work :0)

edit
pardon me, but how do i upload on a mega? I tried:

Atmega1280
Programmer: arduino
Port: Com8 (my port, checked)
Baud: 57600

Still i get a not in sync, what am i missing?

i'm not sure how the "arduino" configuration in avrdude works. have you tried the arduino mega template? the difference is that it specifies stk500 as the programmer, inserts the -F option for you, and uses 57600 baud, you still need to pick a port. If that doesn't work, go into command line and just type it all out and see if it's my editor's problem or something else.

avrdude -c stk500 -p atmega1280 -P COM8 -b 57600 -F -U flash:w:"filepath":a

Ok, back at the mega template i have had a little success - i was able to upload sketches but i think i may also have found a problem.. could it be that you dont send the auto reset signal? I was onlu able to upload when resetting myself..

hmm... i was under the impression that the auto-reset signal was done by configuring the FTDI driver to do so automatically, not by the Arduino IDE

see Boarduino - Breadboard-compatible Arduino Clone
where it reads:

If you'd like to have the auto-reset capability, make sure C6 is soldered in. With Mac's and Linux it should just work fine.

If you're using Windows you'll need to make a slight change to the driver preferences. In the Device Manager, select the USB COM port

Then right click and select Properties

Click on the Port Settings tab, and click on Advanced...

Make sure Set RTS On Close is selected.

Personally, I find auto-reset useless when I used Arduino, but I've long since stopped using Arduino since I got my programmer.

Hm, i have the 'Autoreset Problem' on 2 Duemilanove, the Seeeduino Mega and Modified Pico, all show the same exact behavior. Using the original IDE there is no problem with the reset though.

The other thing is that it seems - here, that programs may be compiled and even uploaded but they dont 'show' up on the arduino... The Arduino keeps running the sketch that was uploaded before (or rather: With another IDE)..

Strange.. i wished this IDE did work the way it looks - that would be finally THE ide for me...

what the heck? that is a weird problem, you mean the hex code file is generated, and the programmer reports successful upload, but the chip still executes old code?

my build method should check for the hex file's existence when it finishes, if it reports succcessful, then the hex file does exist.

avrdude, when the burn button is pressed, is set to target that file regardless of whether that file exists or not, if it does not complain that the file is missing, then it is uploading the correct file.

it seems almost as if avrdude used another file on the system, it would be impossible for my program to know where that file is :-/

does avrdude actually say that it was successful?

does the arduino bootloader support verification? all the settings in boards.txt says they use stk500's protocol, am I wrong on this?

also added issue about auto-reset, i'll add a checkbox for auto-reset and hijack the specified port using code i found at http://www.hanselman.com/blog/content/binary/UnmanagedIRSerialPort.txt

might take a day or two to fix these things, i'll also need to burn the bootloader on a chip and test myself, good thing i actually have a freeduino board...

Here is 'my' build process:

Execute: avr-g++ -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT HardwareSerial.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/HardwareSerial.cpp"
Execute: avr-gcc -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT pins_arduino.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/pins_arduino.c"
Execute: avr-g++ -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT Print.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/Print.cpp"
Execute: avr-gcc -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT WInterrupts.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/WInterrupts.c"
Execute: avr-gcc -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT wiring.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/wiring.c"
Execute: avr-gcc -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT wiring_analog.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/wiring_analog.c"
Execute: avr-gcc -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT wiring_digital.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/wiring_digital.c"
Execute: avr-gcc -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT wiring_pulse.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/wiring_pulse.c"
Execute: avr-gcc -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT wiring_shift.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/wiring_shift.c"
Execute: avr-g++ -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT WMath.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/WMath.cpp"
Execute: avr-g++ -I"D:\Arduino" -I"C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18\arduino\core" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp" -I"C:\Users\Nachtwind\AppData\Roaming\AVRProjectIDE\temp"  -mmcu=atmega1280 -DF_CPU=16000000UL -Os -fpack-struct -fshort-enums -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections  -Wall -gdwarf-2 -std=gnu99 -MD -MP -MT arduino_temp_main.o  -c  "C:/Users/Nachtwind/AppData/Roaming/AVRProjectIDE/temp/arduino_temp_main.cpp"
Execute: avr-ar rcs libtestmitneueride.a HardwareSerial.o pins_arduino.o Print.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o 
Execute: avr-gcc -mmcu=atmega1280 -Wl,-Map=testmitneueride.map -Wl,--gc-sections -Os libtestmitneueride.a HardwareSerial.o pins_arduino.o Print.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o arduino_temp_main.o    -o testmitneueride.elf
Execute: rm -rf HardwareSerial.o pins_arduino.o Print.o WInterrupts.o wiring.o wiring_analog.o wiring_digital.o wiring_pulse.o wiring_shift.o WMath.o arduino_temp_main.o  libtestmitneueride.a HardwareSerial.d pins_arduino.d Print.d WInterrupts.d wiring.d wiring_analog.d wiring_digital.d wiring_pulse.d wiring_shift.d WMath.d arduino_temp_main.d  libtestmitneueride.a 
Execute: avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature testmitneueride.elf testmitneueride.hex
Execute: avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings  -O ihex testmitneueride.elf testmitneueride.hex
####Error: EEP file not created at D:\Arduino\output\testmitneueride.eep
Execute: avr-size -C --mcu=atmega1280 testmitneueride.elf
AVR Memory Usage
----------------
Device: atmega1280
Program:    3408 bytes (2.6% Full)
(.text + .data + .bootloader)
Data:        639 bytes (7.8% Full)
(.data + .bss + .noinit)
Build Succeeded

Upload (after manual reset):

avrdude: successfully opened stk500v1 device -- please use -c stk500v1

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x1e9703
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "D:\Arduino\output\testmitneueride.hex"
avrdude: input file D:\Arduino\output\testmitneueride.hex auto detected as Intel
 Hex
avrdude: writing flash (0 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 0 bytes of flash written
avrdude: verifying flash memory against D:\Arduino\output\testmitneueride.hex:
avrdude: load data flash data from input file D:\Arduino\output\testmitneueride.
hex:
avrdude: input file D:\Arduino\output\testmitneueride.hex auto detected as Intel
 Hex
avrdude: input file D:\Arduino\output\testmitneueride.hex contains 0 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 38.55s

avrdude: verifying ...
avrdude: 0 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18>

So, compilation and upload are successful, yet it seems not to have worked though... Tried Mega and Duemilanove.

weird, 0 bytes written?

does anybody see anything wrong with the following:

avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature testmitneueride.elf testmitneueride.hex

maybe I got the ordering of the options wrong
try running

avr-objcopy -R .eeprom -R .fuse -R .lock -R .signature -O ihex testmitneueride.elf testmitneueride.hex

in your output folder, then check the file size of testmitneueride.hex

in Arduino's makefile, it reads:

.elf.hex:
        $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@

which should translate into something similar to what i did

the -R options will remove those sections, but actual program data should be in .text .data and .bootloader, which are not removed by -R, this is weird

After compilation: 13 Bytes
After calling the function you stated above: 9.611 Bytes

Upload:

avrdude: successfully opened stk500v1 device -- please use -c stk500v1

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.08s

avrdude: Device signature = 0x1e9703
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "D:\Arduino\output\testmitneueride.hex"
avrdude: input file D:\Arduino\output\testmitneueride.hex auto detected as Intel
 Hex
avrdude: writing flash (3408 bytes):

Writing | ################################################## | 100% 1.09s

avrdude: 3408 bytes of flash written
avrdude: verifying flash memory against D:\Arduino\output\testmitneueride.hex:
avrdude: load data flash data from input file D:\Arduino\output\testmitneueride.
hex:
avrdude: input file D:\Arduino\output\testmitneueride.hex auto detected as Intel
 Hex
avrdude: input file D:\Arduino\output\testmitneueride.hex contains 3408 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.02s

avrdude: verifying ...
avrdude: 3408 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


C:\Users\Nachtwind\Desktop\AVRProjectIDE_Alpha18>

Seems to work that way arround :0)

when i get home i'll experiment with that command for a bit

problems found and fixed
if you have alpha 18, run it and close it to trigger the updater, if not, go download the latest package

see Google Code Archive - Long-term storage for Google Code Project Hosting.

Works perfectly now :0)

The latest featured alpha version has working intelligent autocomplete. it is variable scope aware, it also checks which files you've #included so it gets all the functions and keywords from there too. each keyword in the autocomplete has a icon with the color indicating where the keyword came from (C, CPP, Arduino, AVR Libc module, or user defined) and a shape indicating what it is (type, function, statement, variable, etc)

it's as close to intellisense as i can get to at the moment without basically writing a C compiler of my own.

please try it out for me :slight_smile: get it here
http://code.google.com/p/avr-project-ide/

:0)

I really love your IDE - please keep the great work up and dont fade away as so many others have already done...

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: