-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Include TM2 firmware directly #3647
Conversation
8eb84bb
to
d610028
Compare
@@ -11,12 +11,12 @@ set(INFRA_INCLUDE_DIR "${LIBTM_ROOT}/libtm/src/infra") | |||
set(LIBTM_SRC_DIR "${LIBTM_ROOT}/libtm/src") | |||
set(LIBTM_RESOURCES_DIR "${LIBTM_ROOT}/resources") | |||
|
|||
include(versions.cmake) | |||
set(HOST_VERSION "0.19.3.1711") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this version maintained?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea if this version number is used outside this project, but it is used to extract LIBTM_VERSION_MAJOR
, etc., so I kept it for now. I'd be happy to remove it.
|
||
set(USE_EXTERNAL_USB ON) | ||
set(LIBUSB_LOCAL_INCLUDE_PATH ${CMAKE_CURRENT_BINARY_DIR}/third-party/libusb) | ||
if (APPLE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't it be moved to apple_config
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really part of the exported interface of libusb
, so I think it should stay in a libusb
specific place. Normally this would come from a target_*
function if we were actually compiling libusb
, an installed cmake file, or a pkg-config
file, but since we are using an "external project" without installation, we need to do it ourselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I removed (cc40ab3) apple_config.cmake
as it wasn't being used. :)
This worked well for me on Windows, except: |
Hey thanks for calling me here! I was not able to have a look into it today and I have some other things tomorrow, but I will have a look asap, possibly within next Friday 👍🏻 |
e172425
to
78e85d7
Compare
Thanks for debugging that @dorodnic! I (force) pushed a fix to use We have a CI build that uses Win7 and |
Another thing I noticed is:
When setting
Yes, basically I like to sanity check everything locally. Not sure why it failed only for me, but the fix seem to make sense. |
b7d1118
to
e94a2ed
Compare
Hi @radfordi, I tried to configure and compile this PR with
It instead works using I'll try to have a look at the CMake code of this PR, and specifically for the |
ad3850d
to
13f3400
Compare
Rebased on |
13f3400
to
6367443
Compare
This has a few nice features: - Downloads the firmware with SHA1 hash to avoid having to ever re-download - Downloads the firmware into a versioned file to avoid having to re-download when changing branches/versions - Avoids parsing the firmware - Avoids the process of creating huge headers with cmake (portable, but **slow**) - Avoids regenerating files on every cmake run - Greatly Speed up running cmake in the normal case - Simplifies the cmake code drastically - The fw/ directory should drop into any `libtm` replacement - Only writes into the build directory (not the source directory) but it has a few drawbacks as well: - Less portable technique - Doesn't support local firmware development as well as the old code - Currently missing a compile-time sanity check for the central app version Most of the drawbacks can easily be fixed, except for the portability which should be outweighed by the other benefits.
6367443
to
1cd948f
Compare
Android gradle solution built successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has a few nice features:
when changing branches/versions
libtm
replacementbut it has a few drawbacks as well:
We may need a few changes for Windows when switching between static and dynamic librariesMost of the drawbacks can easily be fixed, except for the portability which should be outweighed by the other benefits. This is based on and should be included into #3507, but it might need a bit more testing and I don't want to hold #3507 up. CC @claudiofantacci.