Author Topic: Arduino  (Read 3019 times)

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Arduino
« on: November 27, 2017, 09:47:02 PM »
Is there any kind of support for the Arduino C/C++ compiler? I do not see any reference to Arduino in the online help. SE is flagging things like Serial and LED_BUILTIN as undefined symbols.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Arduino
« Reply #1 on: November 28, 2017, 03:46:08 PM »
There's no built in support to automatically add the right headers for tagging based on what you're targeting.  You'd have to put the header files with the defs you're missing together in a tag file to get completions.  So, for the linux install of the arduino tooling here, 'Serial' is in /usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h, and LED_BUILTIN is in /usr/share/arduino/hardware/arduino/variants/mega/pins_arduino.h OR .../standard/pins_arduino.h, depending on your target.  (though it doesn't seem to make any practical difference for that particular symbol.)

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: Arduino
« Reply #2 on: November 28, 2017, 05:00:54 PM »
OK, thanks Patrick. I will try to get the tagging stuff figured out.

mjdl

  • Senior Community Member
  • Posts: 151
  • Hero Points: 18
  • SE Pro 2023 v28.0.2.0 64-bit Qt5 Win 11 23H2
Re: Arduino
« Reply #3 on: November 29, 2017, 07:07:01 PM »
One very useful feature is workspace specific C/C++ preprocessing files, which are kept at the workspace root in [workspace name]_cpp.h (and edited as such, or via Project-->Workspace Properties).

This means that workspace/toolchain specific macros can be kept out of the global usercpp.h file in the SE configuration folder (edited via Tools-->Options-->...-->C/C++ Preprocessing reducing any chance of conflicting definitions or having to unnecessarily change global preproccesing options with each different workspace. The workspace-specific file can also be imported into another workspace too, which simplifies things.

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: Arduino
« Reply #4 on: November 29, 2017, 08:28:28 PM »
In case anyone else is interested, on my Windows 10 install I found the include files in the following folders:
  • C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino
  • C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard

Adding these to the compiler definition and rebuilding the tag file did the trick.