Go Down

Topic: Filing a project with all of its libraries (Read 130 times) previous topic - next topic

trilife

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.
Never give up!

pert

#1
Sep 24, 2020, 11:24 pm Last Edit: Oct 09, 2020, 11:34 pm by pert
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.

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.

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:
Code: [Select]
#include <ArduinoOTA.h>
you have to change it to the relative path to the header file, something like:
Code: [Select]
#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 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.

trilife

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.
Never give up!

Juraj

#3
Sep 25, 2020, 09:35 am Last Edit: Sep 25, 2020, 12:55 pm by Juraj
you used https://github.com/jandrassy/my_boards for the modified Optiboot with copy_flash_pages function for OTA

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

pert

Thanks Pert,

Most useful tips.
You're welcome!

If you are referring to OptiBoot
Yes, that's what I was referring to in my previous reply.

Quote
here is our thread
https://forum.arduino.cc/index.php?topic=693454.msg4666943
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.


trilife

you used https://github.com/jandrassy/my_boards for the modified Optiboot with copy_flash_pages function for OTA

here is our thread
https://forum.arduino.cc/index.php?topic=693454
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...-



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!
Never give up!

Juraj

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? :-) ) only it has more GitHub stars :-)

Go Up