I'm trying to use GPS (version 19.1) as an external editor for Greenhills AdaMULTI.
I entered -P<myproject.gpr> +%LINE %FILE0 %FILES into the "command line arguments" and also the correct path to GPS for "AdaMULTI Other Editor Configuration".
So far this works as expected, i.e. when pressing CTRL+E in the AdaMULTI Project Manager GPS opens with the file to be edited. Also, when a bug is encountered while compiling GPS opens at the proper line and file.
But ... when configured this way, always a new instance of GPS is opened, which is some kind of annoying because you'll have several instances running all with a single file opened after a while.
Is there a way (option, environment variable or whatever) to tell GPS to use an already running instance?
I have read both the AdaMULTI documentation and GPS User'S Guide to find anything relevant, but to no avail.
you can write some Python plugin for GPS to watch some file for changes, then read a "command" from it to open a file at a given position. Or some other kind of IPC.
What OS do you use? Windows?
I wonder whether you could treat the GPS system as "running on a remote server", see GPS documentation chapter 14, Using GPS for Remote Development, where the "remote" server is in fact the local machine.
Related
I am on Windows 10. I want to write a function (in R) to copy the files stored in a camera (actually in the SD of the camera, but I cannot just read the memory card in the PC), to a different storage unit (say, the pc or an external HDD).
The camera is connected to the PC via an USB cable.
The problem I am facing is that, when opening the File Explorer, the camera is showing up as a link under "This PC" with no letter to indicate the drive (e.g., 'G:/').
While I can see the files using the file explorer window, I cannot find a way to get to those file from a cli type of interface (e.g., the command prompt, or the R console).
Googling, I found that 'This PC' is not a folder but rather a link to something in the registry called CLSID for which the identifier should be {20D04FE0-3AEA-1069-A2D8-08002B30309D}. However this is very confusing to me and I cannot figure out how to use this information.
Is there a way to do it? And if so: how?
Please consider I do not know much of commands from prompt (way better off in R).
A CLSID is just a GUID. My computer is a implementation of IShellFolder.
My Computer is part of the shell namespace. Several entries in the shell namespace are virtual (Control panel, scheduled tasks etc.) and cannot be accessed with low-level file functions nor cmd.exe.
While it would be possible to develop a tool that does something like shellcopy Computer\MyCamera\*.jpg x:\backup, I'm not aware of any existing tools that do this. You might have to code it yourself.
In the old days you would call SHGetDesktopFolder to get the root and then use the returned IShellFolder to navigate but these days it is simpler to use IShellItem instead.
To do this it is crucial to understand how IShellFolder and PIDLs work. See Introduction to the Shell Namespace for more information...
I'm working with a simple hello world single .adb file program in Ada 2012 using the GPS IDE under Windows 7/64. If I keep all the object and source files together everything works. I did have to go to the project properties Switches tab and select the Ada tab and enable the 'Debug Information' checkbox.
Now I want to organize my project a little better and put the object files in their own directory. I used the project properties Objects tab and changed the setting from . to ojb. I can build and run. Now when I go to debug and click on a line in hello.adb I get the "No source file named hello.adb. I'm guessing that it's looking in the obj directory. I tried issuing a set directory command and gave the absolute path to the parent folder. A subsequent show directories command shows that the folder containing my hello.adb file is now in the path but still no joy. I can no longer set a breakpoint. This doesn't seem like that unusual an operation, I suspect there is another higher level way to specify the source path for the debugger. Anyone know what it is, or any tips on getting this to work?
GPS itself does not do the debugging. It spawns a command line debugger named gdb for that purpose. You could try running GPS with --traceon=GVD.OUT (or alternatively, and often simpler on Windows, change the %USERPROFILE%.gps\traces.cfg file and add "GVD.OUT=yes").
This will log all communications between GPS and gdb in %USERPROFILE%.gps\log.*, which might be helpful in understanding why gdb is not outputting the correct full path for the files.
Please also double-check that "-g" is indeed passed to the compiler (perhaps after removing all files from obj)
I've searched a lot on this topic but I keep getting more and more confused.
I want to create a cross-platform application (using Qt with C++, for example) that once installed on either MAC or WIN, it will present itself to the system as a virtual printer. So if you hit Ctrl-P on any document, my printer will also be present in the printers list.
My printer will call custom code to extract the data received, create a PDF file, and upload it to some server via FTP.
I looked at "Printing with Qt" documentation here http://qt-project.org/doc/qt-4.8/printing.html and also some existing threads suggesting I need to write a Print Driver for MAC(using CUPS) and another one for WIN (using WDK).
I'm just afraid to start in the wrong direction and just waist lots of time ... so anything that points me to the right direction is useful.
Any ideas are welcome !
Thanks
I have purchased the CC2540 EK I am trying to program the SampleBLE peripeheral onto the CC2540EM. I am using the IAR tool chain and the USB cable is connected directly to the SMARTRF05EB (not using the CC debugger) In IAR I can download the code but the SimpleBLEperipheral does not seem to run.
Looks like the App that came with the CC250EM from the factory has been erased and I am unable to reload that application again.
What is the exact project workspace that I shoud open?
Are there any changes that need to be made to the IAR project so that it can be run on the CC2540EM?
The IAR project name is SimpleBLEPeripheral - CC2540DK- MiniKeyfob - this seems to suggest that it is meant for the keyfob and not the CC2540EM.
It's due to the build option.
You got to set the build option to "cc2540", instead of "cc2540df-mini keyfob"...
In IAR, you can set the build option in the drop-down menu in the Workspace area. (it's right under the word "Workspace")
After doing this, compile and reload the hex file to the module.
It should be able to solve the problem.
I would like to know the LOCATION of the .exe in the JDK that opens .jar files. What I mean is this: Which .exe in C:\Program Files\Java\jdk*version number*\jre\ opens the .jar files, so that they can be opened using a double click? I used to be able to do that, when I newly installed the JDK+JRE. Unfortunately, Nokia PC Suite has made itself the default program for opening .jar files, so that it can install them on my Symbian. Which program do I 'Open With' to get back the old functionality? I already know how to do it from the command line, but this is easier.
There is no specific program to run jar files.
It is java.exe only with the -jar option
For eg.--> java -jar "foo.jar"
Right Click on a jar file and go to its properties. Change the default opening program to java.exe.
I hope that should work.
use javaw.exe if you don't want the command window.
This convention is widely followed by others like perl/python/ruby as well.
I know how frustrating this issue is. I looked all over the internet forums before I finally found the problem...Here is the answer below :
"The root cause for the problem above is, that a program has stolen the .jar association. If you have installed the Java Runtime Environment the first time, the file type called "jar" is assigned to javaw.exe correctly. "jar" is an abbreviation for "java archive" and javaw.exe is the correct program to execute a .jar. However, on Windows any program can steal a file type at any time even if it is already associated with a program. Many zip/unzip programs prefer to do this, because a jar is stored in the .zip format. If you doubleclick on a .jar, your pack program opens the file, rather than javaw runs the program, because your pack program ignores the meta information which are also stored in a .jar."