I would like to experiment with arduino interrupt handlers.
The reason is because i need real time RS485 communication.
The lag in the main loop is too long, i would like to modify the interrupt handlers and, in the long term, build an extension library (software profibus DP).
My main problem is that i am unable to save modified files to the avr/cores/arduino directory.
Does somebody know how to change the rights on this automatically installed directory so i can change these files. (OS=Windows 7)
Get a new copy of the Arduino, as a zip file for un-priviledged user install.
unzip it, and then (BEFORE YOU RUN ANYTHING) create a directory called "portable" in the top level directory (next to the "hardware" directory.)
This will give you a separate copy of the IDE that you should be able to modify as much as you want (and it will also leave behind the "unmodifed" main IDE...)
I found a simple solution: It seems that the ability to modify is linked to the directory the files are in.
So if I copy them to another directory, I can modify and copy back.
For the solution presented by westfw (thanks for the reaction) I have a question: if the same file is in portable
and in the other directory how can one make sure the right file is used during compile ?
Does the environment have some kind of include path settings one can modify ?
Is portable a specific name or identifier related to the IDE ?
Delta_G:
Once you had those two directories, portable and the original one,
I guess then that "portable" could be replaced by "any-old-name"
On this Linux laptop I have 3 versions of the IDE and no restrictions on editing any of the files.
JOHI:
I found a simple solution: It seems that the ability to modify is linked to the directory the files are in.
So if I copy them to another directory, I can modify and copy back.
Presumably it is also possible to change your rights to the original directory so that you can modify the files without all that copying business.
A windows installer will normally put a lot of the files in system directories where (in theory) a normal (non-admin) user SHOULD NOT be able to modify them. That's one of the purposes of an installer! Whether you get similar behavior on other operating systems will depend on how you install it (I suspect if you use a linux package manager to install on your linux system, you'll end up with Core files that aren't editable as well. (This isn't recommended, though. The package managers installs tend to be out-of-date and sometimes badly constructed.)
The "portable" features isn't actually necessary to get editable Core files (just using the Zip download instead of the installer should get you that), but it adds other behaviors that (IMO) are nice to have once you're dealing with multiple versions of the IDE on the same computer...
westfw:
No "portable" is actually a magic directory name.
Thanks - that's interesting.
I don't use the Arduino installer - just download and unzip to a convenient directory. That's one of the nice things about programs that use the JVM.
I suspect it is an incredibly small percentage of privately owned PCs and laptops that are used by more than one person and where those people need to be protected from each other. Rather than 5 users per PC I have 5 PCs per user
I suspect it is an incredibly small percentage of privately owned PCs and laptops that are used by more than one person and where those people need to be protected from each other.
Sysadmin wisdom is that by running as a "normal user" instead of an "administrative user", you can cut down on your risk of malware infections by quite a bit, and so it would be a good idea to run as a "normal user" for most of your Windows use.
I'm not entirely convinced, and this seems to come with some pretty significant downsides in terms of convenience (as in this exact example), but it IS a reason that even a privately owned PC might run into file access problems...
I did what you proposed: downloaded a .zip, extracted the files to c:/program files (x86) and made a new
folder "portable" in the same directory "hardware" resides. This before running Arduino.exe for the first time.
(This after I uninstalled my installer - based Arduino IDE version)
The result was not so good: Arduino refuses to start because it cannot create a folder where it can put its sketch. What can be the cause of this ? Is this again a problem with rights ?
The system I am using is my own private owned computer, I run Quartus, Visual Studio, Netbeans without any rights problems whatsoever. The install is a standard win7 install, my system is a Dell Precision 3620, I am administrator and the only user on this system.
One step father: I needed to take ownership of the Arduino directory and its subdirectories. I transferred the ownership from system to my user. Now I can start the Arduino program, make sketches and modify the system .c/.cpp files.
I needed to take ownership of the Arduino directory
I suspect that when you moved it to "Program Files", windows changed protections for it automatically.
I had in mind NOT putting it there, although it didn't occur to me that it might be a problem...