Author Topic: using the arduino IDE without the arduino  (Read 7948 times)

0 Members and 1 Guest are viewing this topic.

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6262
  • Country: fi
    • My home page and email address
Re: using the arduino IDE without the arduino
« Reply #25 on: October 24, 2021, 04:46:09 pm »
OK, which is why I am trying to take all of the Arduino library code and use it as a package but whilst still being able to talk to the hardware myself without the fear that I am interfering with something in the Arduino.
It might be easier to start with PlatformIO framework support for Arduino for that.
Maybe look at how common examples look like there?

(The platform-atmelsam does support MKR Zero; here is its mkrzero.json board support file, and here the SVD XML file for ATSAMD21G18A.)

For example, the Arduino Blink example ported to PlatformIO, targeted for Atmel SAM, has this platformio.ini configuration file, and this Blink.cpp file.
Basically, you work with the C++ sources, without the source-code mangling that the Arduino IDE does.

That means tracking dependencies and modifying the Arduino core files and libraries is easier (because it's then all just C++ code you can see without magickal mangling), and you can remove all the stuff you don't want.
The downside is that tracking Arduino cores and libraries becomes harder, as any customization you do needs to be ported to each new version.
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: using the arduino IDE without the arduino
« Reply #26 on: October 24, 2021, 04:53:03 pm »

3. Please remember that Arduino libraries (external downloaded ones specifically) change and they change all the time, e.g., https://github.com/arduino-libraries/ArduinoBLE. If you think that you can lock a version of this project and come back to it in 5 years to do something, you will want to have copies of all the libraries that you used and even the version of the IDE.

I've been reading all of this for some time and didn't feel like I had anything much to add that wasn't covered. But I will say that the libraries have updates all the time, and it isn't entirely obvious to the user just looking at the main window.

For example, I just opened the IDE v 1.8.13 (I have been using the new Beta for a recent project and didn't have any problems but ...). There is no real indication of anything that needs updating on the main window at the moment.

However, if you go to Tool - Manage Libraries - Type: updatable you will see the list of libraries that have updates. And even the "Update" button does not show unless you hover over the library "sub-window". I find eight libraries that have updates at this time.

Maybe that's obvious to Simon I don't know, but if he knows this I apologize ...  :)

I am using 1.8.13 and it does the usual notification about libraries that need updating (although you don't have to update them). I don't know about IDE 2.0, that is the one I meant as in beta.

Regardless, you don't have to use libraries from the Arduino library directory (where they get updated through the manager) you can put the files in their own directory where they stay quite nicely and do not update unless you do the update manually. There is plenty online about local use of libraries and you don't need to use microchip studio to do this.  I think this feature was added back in 2017 (https://github.com/arduino/Arduino/issues/4936). This is how I lock a library version, when I feel like I am done with the project and don't want to return to it with a new version of a library.

But I could be confused - that does happen :)
- Invest in science - it pays big dividends. -
 
The following users thanked this post: xrunner


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf