Filing a project with all of its libraries

Greetings,

After a brief hiatus from Arduino, due to a long-term beta testing of my project (only one pseudo-bug), I'm back into programming mode.

However, in the meantime, I had to rebuild my computer, upgrading from my 256GB nvme to 1TB... I chose to rebuild from scratch, as there were numerous large programs I no longer used... My old 256GB drive is now D:.

Now, there were a couple of libraries I recall having to customize, in order to get my project to work: ArduinoOTA, Mcufriend (or something like that) l, as well as changing the Mega256 to OptiBoot...

Can someone point me to where I will find these files on my new D: drive, please?

And, for future development, is there a way to save ALL pertinent files of a project in one place, so I don't have to go on a wild goose hunt every time I up-rev an older project...

Cheers.

trilife:
Can someone point me to where I will find these files on my new D: drive, please?

You will find the libraries under the libraries subfolder of the Arduino sketchbook folder. You can find the sketchbook folder location in the Arduino IDE's File > Preferences > Sketchbook location preference.

trilife:
as well as changing the Mega256 to OptiBoot...

Please tell us how you installed the software to do that so we can answer your question.

trilife:
And, for future development, is there a way to save ALL pertinent files of a project in one place, so I don't have to go on a wild goose hunt every time I up-rev an older project...

There are three options:

Bundle libraries in the src subfolder of the sketch folder

You'll need to change the #include directives in your sketch. For example, if the #include directive for a library looks like this:

#include <ArduinoOTA.h>

you have to change it to the relative path to the header file, something like:

#include "src/ArduinoOTA/src/ArduinoOTA.h"

Depending on how the libraries were written, you will sometimes need to modify the #include directives in the libraries as well.

Have a sketchbook for each project

You can set a custom sketchbook folder location in the Arduino IDE at File > Preferences > Sketchbook location. So you can just set the sketchbook folder location to your project-specific sketchbook folder when you want to use it. This allows you to use the libraries in the normal manner. It also allows you to bundle manually installed boards platforms with your project.

Have a portable Arduino IDE installation for each package

When you put the Arduino IDE in portable mode:
https://www.arduino.cc/en/Guide/PortableIDE
The sketchbook and data directory where boards platforms installed via Boards Manager are installed are under the "portable" subfolder of the Arduino IDE installation. This means that everything is in one folder, including the version of the Arduino IDE the project is compatible with. So this is the method that allows you to truly "save ALL pertinent files of a project".


I'll throw in another two, which are likely overboard for an Arduino project, but are common practice in professional projects:

Virtual machine for each project

This mean you also pin the operating system dependencies for compiling the project.

Non-virtual machine for each project

A company may archive an entire laptop for each project. This pins the hardware dependencies for compiling the project.

Thanks Pert,

Most useful tips.

When asking about "how I installed the software", you are referring to Arduino IDE, I downloaded it from Arduino.cc and installed it the regular way (not portable). I had installed the Windows App in the past on the old SSD, but that led to a world of trouble, before we figured out, why ArduinoOTA wasn't working...

If you are referring to OptiBoot, I must admit, that I don't quite recall, how I did that, except that I followed the instructions from ArduinoOTA... (Not near confident enough for ad-libbing).

Cheers.

you used GitHub - JAndrassy/my_boards: My Arduino boards custom variants. You can use it as starting point for your boards specialities. for the modified Optiboot with copy_flash_pages function for OTA

here is our thread
https://forum.arduino.cc/index.php?topic=693454

trilife:
Thanks Pert,

Most useful tips.

You're welcome!

trilife:
If you are referring to OptiBoot

Yes, that's what I was referring to in my previous reply.

here is our thread
will ArduinoIDE still work after flashing a TFTP Bootloader [SOLVED] - #72 by trilife - Project Guidance - Arduino Forum

Great memory Juraj!

@trilife so I think you must have installed Juraj's Optiboot extension boards platform to the hardware subfolder of your sketchbook folder, since that's what Juraj's installation instructions say to do. I already provided instructions for how to determine the location of the sketchbook folder.

Juraj:
you used GitHub - JAndrassy/my_boards: My Arduino boards custom variants. You can use it as starting point for your boards specialities. for the modified Optiboot with copy_flash_pages function for OTA

here is our thread
will ArduinoIDE still work after flashing a TFTP Bootloader [SOLVED] - Project Guidance - Arduino Forum

Hello again @Juraj and THANKS AGAIN! I'll most likely be continuing that thread, as I finally received my W5500s and I think ArduinoOTA has uprevved since...-

pert:
You're welcome!
Yes, that's what I was referring to in my previous reply.
Great memory Juraj!

@trilife so I think you must have installed Juraj's Optiboot extension boards platform to the hardware subfolder of your sketchbook folder, since that's what Juraj's installation instructions say to do. I already provided instructions for how to determine the location of the sketchbook folder.

And thank you too @Pert for the details.

These stop/starts of developing are hard on my aging axons... So much to do, so little time...

On a positive note, Colombia is out of lockdown (with distancing measures) since 1 September and numbers seem to be staying down...

Stay safe!

trilife:
Hello again @Juraj and THANKS AGAIN! I'll most likely be continuing that thread, as I finally received my W5500s and I think ArduinoOTA has uprevved since...-

almost nothing changes there. (because it is perfect? :slight_smile: ) only it has more GitHub stars :slight_smile: