i use Debian 11. i need to debugging and write for Arduino on Geany Ide. Can you help me please?
I have tried to install Arduino on Geany but it hasn't worked.I need to install also Geanypy but it hasn't worked.
just did the search before looking here ...
https://github.com/akienz99/geany-arduino
try it let me know how it goes.
If you followed akienz99's instructions:
have a .ino file loaded and active in Geany
menu>Build>set build commands. Click the top left input box if it is empty and input "Build and Upload" (without quotes).
Paste this into the next input box to the right (after making changes discussed below):
rm -r /tmp/arduino_build /tmp/arduino_cache;mkdir /tmp/arduino_build /tmp/arduino_cache;/usr/bin/arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/<USER>/.arduino15/packages -tools /home/<USER>/.arduino15/packages -libraries /home/<USER>/Arduino/libraries -fqbn=esp32:esp32:esp32doit-devkit-v1:FlashFreq=80,UploadSpeed=921600,DebugLevel=none -vid-pid=10C4_EA60 -ide-version=10819 -build-path /tmp/arduino_build -warnings=none -build-cache /tmp/arduino_cache -prefs=build.warn_data_percentage=75 %d/%f;python /usr/bin/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /home/<USER>/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/partitions/boot_app0.bin 0x1000 /home/<USER>/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/bin/bootloader_dio_80m.bin 0x10000 /tmp/arduino_build/%f.bin 0x8000 /tmp/arduino_build/%f.partitions.bin
Click on the #2 far left input box if it is empty and type "Check syntax" or "Verify".
Paste this into the next input box to the right (after making changes discussed below):
rm -r /tmp/arduino_build /tmp/arduino_cache;mkdir /tmp/arduino_build;mkdir /tmp/arduino_cache;/usr/bin/arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/<USER>/.arduino15/packages -tools /home/<USER>/.arduino15/packages -libraries /home/<USER>/Arduino/libraries -fqbn=esp32:esp32:esp32doit-devkit-v1:FlashFreq=80,UploadSpeed=921600,DebugLevel=none -vid-pid=10C4_EA60 -ide-version=10819 -build-path /tmp/arduino_build -warnings=none -build-cache /tmp/arduino_cache -prefs=build.warn_data_percentage=75 %d/%f
It's important to note that I have /usr/bin/arduino-builder and /usr/bin/esptool.py in those commands, because my distro (Gentoo) has more recent versions. More than likely you won't, the easiest way to find out where arduino has put those commands on your computer is to run the arduino ide with a simple sketch, in file>preferences turn on verbose logging for both verify and compile and upload, and then run the verify and compile and upload commands, copying the verbose output and pasting it in a blank Geany document. You will find the path and indeed basically what I have presented here for the Geany commands.
Of course, you will also want to edit those commands and replace with details on the board you are using. I'm only using esp32 node32s/esp32doit-devkit-v1 lately, so those commands are set up for it, although I've got some Uno's around I'll surely use someday, so I'll have to come up with some method of switching them around easily, probably using bash files.
The commands are _long, but don't worry, Geany accepts them just fine and it all works perfectly, you will never have to start the arduino ide again. Also replace <USER> with your user directory name.
You can also add an external serial monitor, I like moserial. But I find starting it from within Geany more trouble than it's worth, I just start it standalone from my OS menu. If you do add it to build commands, I recommend adding it below the "Execute commands" near the bottom of the set build commands window. It pops up a little terminal window, I don't care for that, but it's better than adding it under "Arduino commands", as then it inhibits further compiles/uploads, Geany is waiting for response from it. This forces you to constantly open and close the serial monitor.
This should get you going.
The best method was worked out by this fellow https://gitlab.com/snouf/geany_plugin_arduino_ide
I used that for a couple of years until geanypy took a nosedive into oblivion about 3-4 years ago. It created menu items similar to the arduino ide, allowing you to choose board, baud rate, etc. on the fly. I'm hoping to get some time to try and convert his python plugin with cython/cythonize, making it a REAL Geany plugin.
Related
Problem: I'm on a mac running a tmux server. Within my local tmux session, I connect to a remote linux server and open a file with vim. The text I want does not fit in a single pane without having to scroll. I want to grab the text in the file and copy and paste all of it to my local machine's memory.
Current Solution:
My current procedure for copying and pasting is very convoluted:
Zoom on the pane with ctl-b z
Turn off numbering in vim with :set nonumber
If the file or text I want does not fit in entire pane, I hit cmd - until the text is small enough to fit in the entire pane
Select text I need with my mouse while holding down the option key.
Hit cmd-c to copy to my local machine.
Better Solution?
My current solution is tedious and I'm tired of wondering if there is a better way. Anyone got a better solution?
Ideally, I'd love to be able to select the text with vim and have iterm2 somehow detect what has been selected in a pane and run a single keystroke to copy to my local machine. Not sure if that's possible or not.
OK, I went with the solution at github.com/wincent/clipper which works on my mac running macos 11.2.3.
The install instructions seem to be a little dated and are a bit confusing if you don't read them carefully. It took some trial and error to figure out how to get this working with vim on the remote machine:
Install with brew on your mac
Launch clipper as a daemon with brew services start clipper
On the remote machine, add the following line to your vimrc file:
nnoremap <leader>y :call system('nc -q 1 localhost 8377', #0)<CR>
Note: I had to add the -q 1 in there because I found vim would hang otherwise. The -q 1 arguments are not in the official documentation.
In your mac's ~/.ssh/config file:
Host *
RemoteForward 8377 localhost:8377
Make sure your remote server has port 8377 open!
On the remote machine, open a file with vim. Yank some lines. Then hit <leader>y.
Note: It took a while before it finally dawned on me that just <leader>y doesnt' work by itself. It's a two-step vim command process: 1) yank the text with a vim command 2) send the copied text to your mac with <leader>y.
That's it. My life feels so much better now. :)
sorry if it's a simple question, I'm a bit of a rookie and couldn't find the answer online.
I have a program in Fortran with a makefile that I need to run. I am able to run it through the terminal, by using mingw32-make command, but I'd like to do be able to do it through Geany as well.
When I just try to do it by pressing Make in Geany, nothing happens and a message at the bottom of the screen says Process failed (The system cannot find the file specified). From what I gather, I need to configure a new make command in Geany through Set build commands and that might solve the problem, but this is where I am lost. What exactly do I need to type in there? Do I need to direct it to mingw32-make? How do I do that?
This is what my Set Build commands window looks like now.
Thanks!
Two options
In your fortran bin directory copy mingw32_make.exe to make.exe.
In geany, change make to mingw32_make
The make in geany should then work.
I'm having the same difficulty as the one expressed here: Cannot connect to X server using docker on OSX
I'm very confused about the recommended instructions in the above link (I'm a novice on docker), and I'm hoping to get clarification about the following:
1) Do we "touch foo.foam" in a regular OS X terminal or do we touch it in the docker terminal; in my case, following "docker run -ti openfoamplus/of_v30plus_rhel66 /bin/bash"
2) You suggest running paraview (mine is the most recent) just like any other Mac app. So, basically, to double-click on paraview in the Applications folder? But when opening foo.foam via the Open Menu do we just open foo.foam and press the Apply button (it gives errors), or do we actually enter "paraview foo.foam" as per your instruction above? If the latter, then nothing really happens; I can't open anything!
3) If we're supposed to just open foo.foam, what do we do after that? How is docker even aware about any of this? Anyway, when I type paraview from within docker (after foo.foam is opened) I get the same X server error. I wouldn't expect otherwise!
Hopefully, you can provide a more step-by-step set of instructions?
Thanks in advance
#First steps with OpenFoam
You've successfully followed the instructions to run the cavity problem, but you run the final command paraview and the spits back an error about x server being unavailable.
here's what you do:
Download paraview natively to your mac. Then open up a terminal window and cd into the directory that you ran the cavity problem in. (note sure what directory? jump back to your docker shell and run echo $FOAM_RUN)
Once you're inside the cavity directory, make a new .foam file and open it with paraview.
$ touch foam.foam
$ open -a paraview foam.foam
Click on that Apply button - middle of the screen on the left. At the top screen you can then select things like pressure p and plot type surface, and step through the time dumps in the upper right (initially my mesh didn't render correctly, so I had to deselect internalMesh, apply, and then select it and apply again).
Not really sure what you're looking at? Here's the tutorial for the problem:
http://www.openfoam.com/documentation/user-guide/cavity.php#x5-40002.1
I am currently grading for a C++ class and want to be able to download all the files my students submit and when I click on them they open in Geany so I can compile them really quickly and run them.
When I ran linux I used Geany as my preferred IDE. I've switched to Mac and installed Geany via MacPorts. I currently run Geany by opening a terminal and calling it.
Is there a way to specify a custom command for a file type or will have to build an application to run Geany. Also how do I do that. I tried messing around with automator and applescripts, but couldn't get very far.
I believe this is what you want
Use Applications -> Automator -> Application -> Run Shell Script
Change the "Pass input" to "as arguments"
Change the
echo $f
to the full path to your geany executable. Leave the $f
/the/full/path/to/geany $f
Save the Automator app. Give it a name you like.
selecting Get Info (⌘I) in the Finder, and then setting Open with: to Geany and clicking the Change All... button. If that doesn't work I'll need to look into it further.
Source
This question already has answers here:
xcode4 doesn't support Perforce?
(4 answers)
Closed 2 years ago.
I'd like to setup a macro in XCode 4 to checkout the current file from Perforce. How can I do this? I do not have perforce integrated with my project and do not wish to do so. This is pretty easy in Visual Studio but I don't know the XCode equivalent.
Just came across this at Perforce.com as their means of making this work. I tried it, and it's pretty good.
http://answers.perforce.com/articles/KB/2997
As per the comment, it works in Xcode 5 as well.
And now it's tested and working in Xcode 6!
EDIT:
If that doesn't work, and you're using OS X Mavericks, this guy fixed the script to keep working. Just make sure the script references p4 properly. I had to change it from /usr/local/bin/p4 to /usr/bin/p4.
http://forums.perforce.com/index.php?/topic/2830-xcode-501-x-mavericks-perforce-integration-not-working/#entry11319
Make sure that the 'p4' command line tool is installed in '/usr/local/bin/'.
Verify that your Perforce environment variables are configured correctly. I use a 'perforce.rc' file at the root of every client workspacewith the name of the client (P4CLIENT)and port (P4PORT). Don't forget about P4USER, P4PASSWD, P4CONFIG, etc...
Create the following script in your ~/bin folder and make sure the permissions are set so it is executable (755 should work).
Go to the Preferences in Xcode and select "behaviors".
Scroll down to "Unlock file"
Scroll down some more and select the checkbox next to "Run"
Choose "Choose Script..." and point it to the following script:
xcodeunlock.sh
#!/bin/bash
# Xcode4 doesn't setup the environment
source ~/.bashrc
# Delete the URL part from the file passed in
fn=${BASH_ARGV#file://localhost}
echo "fn=" $fn
if [ -a ${fn} ]; then
res=$(/usr/local/bin/p4 edit ${fn})
# TODO: Report the status back to the user in Xcode
# This output goes to the console.
echo $res
else
echo "FnF" ${fn}
fi
Once this is set up correctly, unlocking a file in Xcode should run this script and attempt to checkout the file. Unfortunately any output goes to '/var/log/system.log'. I'm not sure how to notify Xcode 4 of a failure in this script.
It's maddening trying to get XCode to work with Perforce. Here is a solution I came up with that is:
Quick to get set up
Easy to burn into your muscle-memory so you don't have to think to check files out
Doesn't require any mousing at all
One-time setup as follows:
Download and install the free "DTerm" app from Decimus Software.
Make sure you have the Perforce command-line utility installed. Type "p4" at a Terminal window prompt, and see if it recognizes this command. If not, you need to go to Perforce's website and find and download what they currently call "The Perforce Command-Line Client (P4)". There's no installer; just save it from your browser right into /usr/bin (or whatever) and do a chmod +x on it. For official setup notes, and if you need to do any custom environmental variable tricks, please see this tech note.
Once you've done this, let's say you are in XCode and you are viewing a source code file that you want to check out. Here's the rigamarole:
Have the file showing in the active XCode editor
Hit Shift Command Enter to get a DTerm window
Type p4 edit and then hit Shift Command V to paste in the filename of the active file, and hit return
Perforce checks the file out and DTerm shows you the status/errors.
Hit 'escape' to dismiss the DTerm window
Begin making your changes to the file in XCode. XCode may (erroneously) say that the file is read-only, because it's dumb and isn't aware that it's been made from read-only to read-write, so you have to hit Allow Editing. I didn't trust this at first and double-checked it a few times, but now I have blind faith that it's doing the right thing.
I haven't set this up in a while, so please let me know if you run into any glitches and I'll update my info here to make it as painless as possible. But otherwise, this is the best solution I've found.