-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Tinyusb Build System Integration #1
Update Tinyusb Build System Integration #1
Conversation
- Swap out Makefile for latest project "driver" Makefile. The only difference here is that TARGET is floating. - Simplify tinyusb.mk - Add build-specific configuration to project.mk, and simplify IPATH/VPATH requirements - Add clean.tinyusb - Build library inside the tinyusb library by default - Add default configuration directory
Thanks @Jake-Carter . I tried building the example projects I included and looks like a couple things are off with the updates. Rather than creating the tinyusb.a library, the library name is the project name. And similarly, the project's ELF file is trying to be placed in the TUSB build folder. I can hunt this down next week if you don't have the time, but figured you just may know it off the top of your head. Let me know.
|
@BrentK-ADI whoops - sorry, was only testing on the command-line. Just needed an |
@Jake-Carter , The one lingering thing is tinyusb.mk is stomping on BUILD_DIR causing all build files to end up in tinyusb, not just the library. I'm going to merge in this PR as is, and just edit that line on my next commit for example and documentation updates. Thanks for supporting this integration! |
@BrentK-ADI thanks, you're right. Didn't intend for that. Was trying to build in a target-specific sub-dir when you build from a project and from inside the library folder. There's some complications with where the Just reverted it. It'll build in the target-specific folder from a project, which is the important thing for when other micros are supported. |
* Update tinyusb build system integration - Swap out Makefile for latest project "driver" Makefile. The only difference here is that TARGET is floating. - Simplify tinyusb.mk - Add build-specific configuration to project.mk, and simplify IPATH/VPATH requirements - Add clean.tinyusb - Build library inside the tinyusb library by default - Add default configuration directory * Use override on PROJECT
Description
The primary change is to re-use the core "driver" Makefile/project.mk combo that exists in our example projects. This lets us clean up the implementations of the "header" makefile (tinyusb.mk) and the makefile responsible for actually building the library. There's a lot less boilerplate/legacy mess for the library integrator, and we can avoid copying over a lot of the legacy mess that usually gets passed on to new libraries.
include
-ed at the top-level, so the top-level project build sees anything here. This includes things likeIPATH
,LIBS +=
, and the recursive rule for building the library.I added a default configuration directory to store a default
tusb_config.h
file. Projects can use a local one by overridingTINYUSB_CONFIG_DIR
.Added
tusb_config.h
as a dependency to the library so that it's automatically rebuilt if the config changesThe library will build inside the tinyusb library folder by default (
build/MAX32650/tinyusb.a
), or atinyusb
sub-folder ifBUILD_DIR
is set inside a project.Added
make clean.tinyusb
, which also gets caught bymake libclean
andmake distclean