AVRProjectIDE - Editor for AVR/Arduino Projects

I've written a development environment for AVR microcontrollers that is geared towards AVRStudio and Arduino users. I have just posted the first alpha and I'm looking for the first batch of users to use it, test it out and give me feedback.

Here's some teaser screenshots so you'll actually go to my link and try it out

Distiguishing Features

  • Scintilla editor, with configurable syntax highlighting and indentation preferences
  • Docking subwindows and tabs, with workspace preference saved upon exit and reloaded at startup
  • Backs up open files with modifications in configurable time intervals
  • Supports the building of C, C++, and Arduino projects using WinAVR
  • Quickly configure AVRDUDE and burn your project right from the editor
  • Customizable project templates, apply as much or as little settings as you want
  • Customize your help menu with bookmarks which you can edit through an XML file, even launch your own applications

Compatibility Features

  • Import and export .aps files used by AVRStudio
  • Generates makefiles, or run your own makefile
  • Build process automatically detects Arduino code and builds that code in a way identical to how Arduino actually builds its code

AVRStudio Related Improvements

  • Uses AVRDUDE so you can use non-official programmers from within the editor
  • Configuration manager is very familiar

Arduino Related Improvements

  • Serial port terminal that supports escape sequences and displays non-printable characters
  • More project configurability
  • Apply an Arduino template to quickly choose your Arduino flavor, the chip will be choosen, clock speed set accordingly, and AVRDUDE will be set to use the bootloader.

Interested? Get it here: http://code.google.com/p/avr-project-ide/

Looks very interesting but I get the following error dialogs: "Error loading editor strings" "Error loading Serial Port Prefs" "Error while creating templates, could not find a part of the path ...."

The program terminates with a fatal exception

Perhaps you are not creating the directory needed for the templates. If I create the directory the program starts but I get an exception when I create a new project with the wizard.

I am using Win XP SP3 and running the alpha2 download

Thanks so much, forgetting to create that folder made a lot of problems, i also added a bunch of other fixes

this is exactly why i need to get other people to use it for a bit

alpha3 is out

That was fast The startup problems are fixed and I am looking forward to having a play.

I wonder why you include the arduino distribution? Can AVRProjectIDE be used with an already installed Arduino distribution?

it does work with existing distributions, in the configurator you can tell it where to look for the existing installation, i think including it and then defaulting to it is better than asking the user to look for it first, as i don't know how to look for existing arduino installations automatically without scanning an entire computer

edit: hmm, it looks like a .net editor has been done before (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242846270), but what happened to it?

also just saw http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1253151992 , the ribbon interface isn't working right, I don't even see a minimize/maximize/close button group on it

I do hope a lot of people give my editor a shot the above two editors by other people seem great, intellisense is great and ribbon looks awesome

I hope you see that I have something good to offer as well

Another file creation problem:

I used the wizard to create a new Arduino project (arduino 168 template and pde file type) I compile the code (with empty setup and loop functions) and get an unhandled exception re unable to find ...\temp\arduino_temp_main.cpp If I create the temp diectory the code will compile.

Also, it would be helpful if the wizard remembered the previously selected template and file type

magical, forgot to create that temp folder, i don't recall ever creating that one manually though... hmm... how did i ever let this slip

i guess alpha4 will be up in 15 minutes

i'll also implement your suggestion, but might not be in alpha4

It's good to include the folders you need...but "unhandled exception" if a file's not found? Maybe you should handle that exception? :)

I do usually place all file IO in try-catch, but i missed this one new download up sorry for the embarrassing slipups, i've been working on this for weeks and finally felt it was ready for the public, damn was i wrong

*** alpha 4 introduced a crash when i added the "remember last wizard pref" feature, alpha 5 is up now with F7 and F8 hotkeys for build and compile as per request of a friend

alpha 6 is out, blah, this isn't healthy, it's 4:30 am here

now it's alpha 7 lol

frank, take a well earned rest and come back to this tomorrow. Knocking yourself out won't do anyone much good.

I did a few things and then made an automated update mechanism in alpha18

Once you have alpha18, you will not need to visit the webpage to download the packages ever again unless the updater needs an update.

Note that update mechanism WILL run if the BuildID is missing from your settings.ini , so even if you have the latest update but haven't ran the updater, the updater will want to run, please let it run once so it adds the correct BuildID to the ini file so it can keep track of available updates in the future.

Fingers crossed that this works smoothly, I wanted to lessen the annoyance to people helping me test this thing, hopefully i'm not adding any annoyances

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 http://www.ladyada.net/make/boarduino/use.html 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)