Skip to content

paulvha/unoQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Arduino Apps lab using local libraries


background

Arduino Apps lab is being used to create an solution on the UNO Q which can make use of the on STM32 MCU for real-time actions based on Zephyr and the Qualcomm microprocessor (MPU) running debian linux. "official" Arduino online External libraries can be included with search.
However other libraries, like local developed or those not part of the Arduino "official" libraries, can not be integrated with the Arduino Apps Lab.

workarounds

Given the active Arduino forum for UNO Q and the App lab, 4 potential workaround have been created :

  1. copy the local libraries needed into the app structure and adjust sketch.yaml
  2. copy the local libraries needed in a single library folder and adjust sketch.yaml
  3. copy the local libraries needed in a single library folder AND Zephyr libraries
  4. use Arduino IDE for the sketch, use Arduino Apps Lab for the Linux code part

I have created a document:locallibs.odt that describes each of these options. It describes the actions to be taken to implement as well as the advantages and disadvantages for each option.

Utility

Personally I liked the option 3. It means no local editing of the sketch.yaml and maintaining an integrated solution on Zephyr and linux in Arduino Apps lab from a single place.

Additionally the utility enables making a backup and (selective) restore of the apps and libraries from the UNO Q as well as deleting an app from UNO Q.

As I run on Ubuntu 24 I have created 2 utilities written in shell programming, working together copy2q and qcopy.

copy2q

This is mend to be run on Ubuntu and can perform the following functions

  • installation of necessary utility & structure on UNO Q (*)
  • adding a library from Ubuntu to UNO Q
  • removing links on zephyr libraries on UNO Q
  • remove linked lib from Zephyr and delete lib on UNO Q
  • list all active linked libraries
  • list all copied libraries on the UNO Q
  • link selective library earlier copied to zephyr libraries
  • adding all links for earlier copied libraries to zephyr libraries
  • delete app from UNO Q
  • making backup of apps and earlier copied libraries (*)
  • restore previous backup to UNO Q (*)
  • restore selective from previous backup to UNO Q (*)

The option indicated with (*) MUST be run on Ubuntu. Other options can be run on UNO Q as well.

qcopy

This must to be run on the UNO Q

  • link all copied libraries into Zephyr library folder
  • Link only copied 'mylib' into Zephyr libraries folder
  • list all links in the Zephyr library folder on the UNO Q
  • list all local libraries stored on the UNO Q
  • remove all links in the Zephyr library folder on the UNO Q
  • remove link only 'mylib' from the Zephyr libraries folder
  • delete app from UNO Q
  • check whether file exist
  • check whether directory exist

Prerequisites

The utility makes use of the adb-utility. More about this in the earlier mentioned document:locallibs.odt.

usage

Before starting make sure to update the location of the adb utility on your Ubuntu in the copy2q utility.
Start the UNO Q
Install the utility : copy2q install

type copy2q help for the options.

To add a local library type copy2q mylib (mylib is your local library).

In the sketch on Arduino Apps Lab, you need can add #include "mylib.h" as you are used to.

When an update of Zephyr happened on the UNO Q, you only need to perform copy2q (no parameters ) to relink the earlier copied libraries.

For backup of the apps and earlier copied libraries type copy2q backup DIR. DIR is the name of a local directory on Ubuntu where to store the new backup. It should not exist yet.

To restore type copy2q restore DIR. DIR is the name of a directory of earlier backup. If you only want to restore a single lib or app, type copy2q restore DIR SEL. DIR is the name of a directory of an earlier backup and SEL is the name of the app or library to restore

When logon to the UNO Q you can use copyq which is in the /home/arduino directory. type qcopy help for more help information

Versioning

version 1.0 / December 2025

  • initial release

Author

License Information

This product is open source!

Please use, reuse, and modify these files as you see fit.

Distributed as-is; no warranty is given.

About

different UNO Q programs and information

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages