简体   繁体   中英

How i can debug and use Arduino on Geany Ide?

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:

  1. have a.ino file loaded and active in Geany
  2. menu>Build>set build commands. Click the top left input box if it is empty and input "Build and Upload" (without quotes).
  3. 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
  1. Click on the #2 far left input box if it is empty and type "Check syntax" or "Verify".
  2. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM