Replies: 6 comments
-
I don't quite understand if you want to have additional (user selectable) source folders for a) would be a major change since this would require a redesign of the generated makefile. |
Beta Was this translation helpful? Give feedback.
-
I have multiple git repos, each with their own Teensy libraries. I wanted to be able to use VisualTeensy with these different libraries while they are still in development. Option c) sounds like it is the best work-around. Ideally, VisualTeensy would allow me to link multiple libraries from multiple locations with option a). This would require a key-value pair system like {
'C:\Users\...\Documents\Code' : ['MotorController', 'LED_Helper', ...],
'C:\Users\...\Downloads': ['Accelerometer', ...],
'E:\gitstuff\code' : ['CustomStepperMotor', ...]
} where the keys were the paths and the values were a list of libraries used from that particular path (as shown above). This would be a major redesign of the makefile (I'm not even sure if this is possible with makefiles) but this would convenient for including libraries that are still in development. |
Beta Was this translation helpful? Give feedback.
-
In this case I usually use the following structure
and clone the 'libUnderDevelopment' directly in the lib folder. Thus you can conveniently commit/push library changes. To set up VisualTeensy you edit .vsteensy/vsteensy.json and add the name of the library folder to the projectLibraries list. Here an example where I did this with the TeensyTimerTool library Save everything in vscode and open VisualTeensy (the lib should appear in the library tab). If you now generate the project, VisualTeensy sets up the makefile including the lib. Hope I got your use case right... |
Beta Was this translation helpful? Give feedback.
-
Yes! Thank you for that thorough example. That is exactly how I plan on developing libraries. For clarification, your
where I copied the |
Beta Was this translation helpful? Give feedback.
-
Yes
You can copy of course, I personally prefer to clone the library from GitHub directly in this place so pushing back changes, switching branches etc is just a mouse click away. NOTE: Avoid having the same lib in the project folder AND in your standard Arduino library folder. VisualTeensy will confuse them in this case. This is a bug in the makefile which I never bothered to fix... If you need to have the same library in both places for your workflow, the easiest is to rename the "development copy" of your lib. Or nag me long enough to fix the bug :-) |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for your help! |
Beta Was this translation helpful? Give feedback.
-
Currently libraries can be linked from the
Teensyduino Libraries
, theArduino Repository
, and theInstalled, Shared Libraries
locations. I would like to be able to choose any folder from a drop down menu and select libraries from there, and then generate the appropriate makefile and copy to the proper.vsteensy/build/lib/
folder.I think this could easily be accomplished by changing whatever value modifies the
LIBS_SHARED_BASE
(line 20 in makefile) location on the C# side of things and letting VisualTeensy run its course. Included below is where the drop down menu would be included, along with displaying the path to the selected folder below.Beta Was this translation helpful? Give feedback.
All reactions