[MOD] Arduino Enhanced Release 1.0.5 for Windows (installer, drivers, etc) +SRC

Many thanks for your continued efforts with this.

I've installed WinAVR for programming raw AVRs. I used it for a while, and it worked great. Just recently I attempted to use it again, and it tries to use the AVR tools located in C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin instead of C:\WinAVR-20100110\bin. In doing so, it seems to have broken something, and the WinAVR stuff no longer works properly (things such as "Make All", and "Program"). There shouldn't be any connection what-so-ever between WinAVR and Arduino ERW 1.0.1i. The only thing I could think of is that the computer register system got messed up somehow, so that it looks in the wrong directory. I went to the Registery Editor, location "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" key "Path", and it does indeed include reference to C:\WinAVR-20100110\bin as well as C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin. Something interesting to note, is that it includes no reference to the original Arduino IDE's tools, which are in directory C:\Program Files (x86)\arduino-1.0.1\hardware\tools\avr\bin.

I don't know exactly when/where the problem started. WinAVR was working fine along side of the official Arduino IDE, but I hadn't tried using WinAVR since I installed this enhanced Arduino IDE.

If in the registry key I remove the reference to the Enhanced Arduino IDE and I rename the program folder "Arduino ERW 1.0.1i" to e.g. "__Arduino ERW 1.0.1i", then I can use WinAVR. However, I need to "Make All" twice in order for most of it to succeed (still has an error, something to do with the EEPROM).

Perhaps you can shed some light on this situation.

What all registries does the Enhanced Arduino IDE use?

Can you think of any good solution?

UPDATE: Through some more investigating, it seems that the Enhanced Arduino IDE started using that specific registry key in version 1.0.1c (it didn't seem to in 1.0.1b). It also seems that renaming the program file for the enhanced arduino IDE is all that's needed (to get to the point I'm at now); it doesn't seem that that specific registry key is the (sole?) cause.

The IDE does not need anything, but new WinAVR needs a PATH entry to work properly.

I created an 'Environment variable manager' application that handles this and it is called by the setup (line 113):

So if you can change the path, just type this in the command prompt:

"C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\erw\SetPath.exe" -a "<your winavr path>" -r hardware\tools\avr\bin

Code for SetPath is https://github.com/eried/Arduino/blob/master/erw/csharp/SetPath/Program.cs

I tried to keep everything clean, but if you install WinAVR before my mod, I will have to append the WinAVR path anyway to keep the IDE working

I'm not entirely sure what I'm supposed to do to fix the problem.

I ran the command prompt line you posted (after filling in the WinAVR bin location). It seems to have removed the directory "C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin" from that registry key I mentioned earlier, but it doesn't seem to help any more than me manually removing it.

mattallen37:
I'm not entirely sure what I'm supposed to do to fix the problem.

I ran the command prompt line you posted (after filling in the WinAVR bin location). It seems to have removed the directory "C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin" from that registry key I mentioned earlier, but it doesn't seem to help any more than me manually removing it.

Right, but I am not sure what is your problem really. You have a newer version of WinAVR? because having the path for C:\Program Files (x86)\Arduino\Arduino ERW... set means you can use WinAVR from any command prompt without having to install it again.

I have WinAVR-20100110, and I don't run it from a command prompt (well, rarely I run avrdude from it). I use Programmer's Notepad, which is included with WinAVR, and i use the "Make All" and "Program" "buttons" in the Tools menu of pn.

mattallen37:
I have WinAVR-20100110, and I don't run it from a command prompt (well, rarely I run avrdude from it). I use Programmer's Notepad, which is included with WinAVR, and i use the "Make All" and "Program" "buttons" in the Tools menu of pn.

Well, since winavr requires the environment variable, one option is to keep only one, from arduino and set that path from Programmer's Notepad?

I was not able to make the compiler to work without the environment variable, like the old winavr

Okay, so I changed the Make and Program tools to use the make.exe program in the "C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\utils\bin" directory. The Program tool was complaining with error 1 (which it has done a zillion times in my attempts to get things working again). It seems that the avrdude.exe in "C:\Program Files (x86)\Arduino\Arduino ERW 1.0.1i\hardware\tools\avr\bin" is actually not avrdude.exe, but perhaps a wrapper? avrdude2.exe is apparently what I need, so I renamed both of them, so that avrdude2 is now avrdude, and avrdude is now something it won't recognize.

Now WinAVR seems to be working (I can compile and download a program to an AtTiny85), and the Enhanced Arduino IDE still seems to download code properly to an UNO. I haven't tried much more than that so far.

Thanks for helping me out. I'll report back if I start seeing errors.

BTW, what's the deal with avrdude plus avrdude2?

It is a wrapper as you said :slight_smile:

Exactly what it does is:
https://github.com/eried/Arduino/blob/master/erw/csharp/AvrDudeReset/Program.cs

So when you call avrdude, it tries to open the com port first, otherwise calls the "fixer" (to disable/enable the non working device).

I use the IDE to program my tinys (copy hex as path) and khazama avr programmer to upload the code.

Hello and thank you for this cool enhanced IDE, I'm using it since few weeks without problems :slight_smile:

I have a small suggestion (sorry if it has been asked already) when we click "New" or open any sketch, it open it in a new window, it would be nice if it opened in a new tab instead :slight_smile:

guix:
Hello and thank you for this cool enhanced IDE, I'm using it since few weeks without problems :slight_smile:

I have a small suggestion (sorry if it has been asked already) when we click "New" or open any sketch, it open it in a new window, it would be nice if it opened in a new tab instead :slight_smile:

Hehehe :smiley: but I guess you don't understand how tabs works, they are not sketches, are part of the main sketch, like "subroutines". Look:

There are all the same "sketch".

Quarencia:
I've noticed some strange behavior in tab navigating. When I first open the ide and use the keyboard shortcur (CNTRL + ALT + Arrow) for moving between tabs, if jumps two tabs at a time (either direction you choose).

I was trying to fix this, but I can't replicate it. Can you record some quick screencast or something with the issue? happens with the on screen keyboard too?

Anyone else is experiencing this?

Ah ok I see :slight_smile:

But isn't it possible that you create other tabs above the existing tabs?? The above tabs would be for differents sketches, like this for example:

[sketch1][sketch2][sketch3][sketch4]
[graphic][loop][setup]

I'm sick of all those windows :stuck_out_tongue:

guix:
Ah ok I see :slight_smile:

But isn't it possible that you create other tabs above the existing tabs?? The above tabs would be for differents sketches, like this for example:

[sketch1][sketch2][sketch3][sketch4]
[graphic][loop][setup]

Well, you know: it is software, so everything is doable; but due the actual architecture of the application it is not a trivial to do. If a lot of people want it (like the menu scroller), I can search for something, but personally I like how Win7 stacks the windows in one icon (I usually disable the tabs in any application besides a browser/im)

Ok no problem, I understand it might be harder than I think :slight_smile:

Following...

Just a quick question: has anyone from the Arduino team approached you to have you work in the official Arduino IDE that is about to be released (1.0.2) ?

AlxDroidDev:
Following...

Just a quick question: has anyone from the Arduino team approached you to have you work in the official Arduino IDE that is about to be released (1.0.2) ?

No, but it was never my idea.

I've been trying to help by doing small fixes to the environment since a couple of years, but the only users who experience most of the problems use windows, so I guess those issues seem to be not very important. You certainly care less for the platform you don't use.

Also, maybe 1.0.2 will be 1.5? I am not sure yet what one should I start to fix :smiley:

looks like its 1.5

drjiohnsmith:
looks like its 1.5

It's off-topic, but it has been announced that there will be a 1.0.2 version shortly, for those that don't plan on working with the 32-bit Due.

It can be read here: Arduino 1.5: support for the Due and other processors, easier library installation, simplified board menu, etc. | Arduino Blog

I have no idea why there will be a version 1.0.2, unless not all of the improvements planned for 1.0.2 made it to 1.5.

In the Standard IDE this code displays correctly in the serial monitor.
But in yours its does not work.

//Manual Set Time example using Time.h

#include <Time.h>

void setup() {
  //setTime(hr,min,sec,day,month,yr);

  Serial.begin(57600);
  Serial.println("Serial Connected");
  Serial.println();
  Serial.println("Manual setTime Example");
  Serial.println();
}

void loop() {
     if(timeStatus() == timeNotSet){
    Serial.println("Please set the Time");
    TimeSet();
   }  
  else{
   // Serial.println("time already set");  
      digitalClockDisplay();  
  delay(1000);
  }
}
  
void digitalClockDisplay(){
  /*
  time_t t = now();
  Serial.print("");
  Serial.print("Val t = ");
  Serial.println(t);
  */
  Serial.print(day());
  Serial.print("/");  
  Serial.print(month());
  Serial.print("/");  
  Serial.print(year());
  Serial.print(" ");
  
  Serial.print(hour());
  Serial.print(":");
  printDigits(minute());
  Serial.print(":");  
  printDigits(second());
  Serial.println("");

  delay(5000);
}

void TimeSet() {
 // Input time   
 Serial.println(); 
  Serial.println("Input time Day dd");
//  day[3] = 0;   //null char
 byte Days = 0;
  for (byte x= 0; x < 2; x++)
  {
  Days = (10* Days) + wait_read();   
  }
   Serial.print("Day is Set to ");
   Serial.print(Days);
   Serial.println();
   
  wait_read();     // nl char is discarded

  Serial.println();
  Serial.println("Input time Month mm");
 byte Months = 0;
  for (byte x= 0; x < 2; x++)
  {
  Months = (10* Months) + wait_read();   
  }
   Serial.print("Month is Set to ");
   Serial.print(Months);
   Serial.println();
   
  wait_read();     // nl char is discarded

   Serial.println(); 
  Serial.println("Input time Year yy");
   byte Years = 0;
  for (byte x= 0; x < 2; x++)
  {
  Years = (10* Years) + wait_read();   
  }
   Serial.print("Year is Set to ");
   Serial.print(Years);
   Serial.println();
  wait_read();     // nl char is discarded    

  Serial.println(); 
  Serial.println("Input time Hours hh");
 byte Hours = 0;
  for (byte x= 0; x < 2; x++)
  {
  Hours = (10* Hours) + wait_read();   
  }
   Serial.print("Hour is Set to ");
   Serial.print(Hours);
   Serial.println();
  wait_read();     // newline char is discarded

  Serial.println();
  Serial.println("Input time Minutes mm");
 byte Minutes = 0;
  for (byte x= 0; x < 2; x++)
  {
  Minutes = (10* Minutes) + wait_read();   
  }
   Serial.print("Minutes are Set to ");
   Serial.print(Minutes);
   Serial.println();
  wait_read();     // nl char is discarded

   Serial.println();
  Serial.println("Input time Seconds ss");
 byte Seconds = 0;
  for (byte x= 0; x < 2; x++)
  {
   Seconds = (10* Seconds) + wait_read();   
  }
   Serial.print("Seconds are Set to ");
   Serial.print(Seconds);
   Serial.println();
  wait_read();     // nl char is discarded
 
  setTime(Hours,Minutes,Seconds,Days,Months,Years);
}  //End SetTime  


//    Wait for Serial Input
char wait_read (){ 
  while(!Serial.available())     // Do nothing while waiting for input.
  {  }
  
  /* 
 The conversion of a character that contains a numeric value that corresponds to a number
 can be converted to the number by subtracting the char value '0' from it.  Char '0' = Dec 48
 */
  byte num;
   byte t = Serial.read();
    if (t  >= '0' &&  t <= '9'){
      num = (t - '0');
     // Serial.print("Number Converted to");
     // Serial.println(num);
    }
       return num;
}  //   End wait_read Function

void printDigits(int digits){
  // utility function for digital clock display: prints preceding colon and leading 0

  if(digits < 10)
    Serial.print('0');
  Serial.print(digits);
}