-
Notifications
You must be signed in to change notification settings - Fork 2k
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
tests/pkg_utensor: model in Kconfig + fix utensor package dependencies #17995
tests/pkg_utensor: model in Kconfig + fix utensor package dependencies #17995
Conversation
I will try to take a look at the mismatch issue |
Thanks! (and good luck 🤞 ) |
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.
You can try
diff --git a/sys/posix/pthread/Kconfig b/sys/posix/pthread/Kconfig
index 38f384d15f..9d88e957ab 100644
--- a/sys/posix/pthread/Kconfig
+++ b/sys/posix/pthread/Kconfig
@@ -8,3 +8,7 @@
config MODULE_PTHREAD
bool "Pthread Support"
depends on TEST_KCONFIG
+ select MODULE_ZTIMER
+ select ZTIMER64_USEC
+ select MODULE_ZTIMER64_XTIMER_COMPAT if MODULE_ZTIMER_XTIMER_COMPAT
+ select MODULE_TIMEX
It looks like pthread needs ztimer stuff, cppstdlib needs pthread (only on esps), utensor needs cppstdlib...
f6793c1
to
c50ea3f
Compare
c50ea3f
to
0cb482f
Compare
It doesn't seem to be enough (even if already better!):
Another Kconfig choice effect ? |
0cb482f
to
1b64e58
Compare
Ok, 1b64e58 contains the correct list of dependencies required for pthread.
ifneq (,$(filter pthread,$(USEMODULE)))
USEMODULE += ztimer64_usec
USEMODULE += timex
ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE)))
# requires 64bit ftimestamps
USEMODULE += ztimer64_xtimer_compat
endif
endif
As a user, I would expect |
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.
Remember we are all on the same team here.
sys/posix/pthread/Kconfig
Outdated
select MODULE_PERIPH_TIMER | ||
select MODULE_TIMEX | ||
select MODULE_ZTIMER | ||
select MODULE_ZTIMER_PERIPH_TIMER | ||
select MODULE_ZTIMER64 | ||
select MODULE_ZTIMER64_INIT | ||
select MODULE_ZTIMER64_USEC | ||
select MODULE_ZTIMER64_XTIMER_COMPAT if MODULE_ZTIMER_XTIMER_COMPAT |
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.
select MODULE_PERIPH_TIMER | |
select MODULE_TIMEX | |
select MODULE_ZTIMER | |
select MODULE_ZTIMER_PERIPH_TIMER | |
select MODULE_ZTIMER64 | |
select MODULE_ZTIMER64_INIT | |
select MODULE_ZTIMER64_USEC | |
select MODULE_ZTIMER64_XTIMER_COMPAT if MODULE_ZTIMER_XTIMER_COMPAT | |
select MODULE_ZTIMER | |
select ZTIMER64_USEC | |
select MODULE_ZTIMER64_XTIMER_COMPAT if MODULE_ZTIMER_XTIMER_COMPAT | |
select MODULE_TIMEX |
A subtle change can make the difference.
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 think I tried your proposal and there were still missing modules compared to make => that's the reason of my extended changes.
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.
Due to circular dependancies in the timer abstraction layer we have a non module symbol that brings in many module symbols. This is the ZTIMER64_USEC
vs the MODULE_ZTIMER64_USEC
.
My guess is you used module version instead of applying the diff.
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.
My guess is you used module version instead of applying the diff.
Hmm ok, that looked like a typo... but is in fact yet another hack
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.
Originally I was thinking to make it more explicit with a CIRCULAR_MODULE_*
or something.
This was a tough one, again, we welcome input for a way around it. Ideally we would not have the circular dependency at all.
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.
Ok, finally applied your initial proposal.
1b64e58
to
a76b7c1
Compare
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.
Looks good (soft ACK), please squash and remove the REMOVEME commit.
a76b7c1
to
d2b9844
Compare
Squashed and REMOVEME commit removed. |
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.
ACK
Contribution description
This PR adds a Kconfig configuration to the
tests/pkg_utensor
application. The Kconfig dependency list had to be fixed and extended for this to work.Note that this PR will fail on Murdock when build for esp32-heltec-lora32-v2. There's a module resolution mismatch with and without TEST_KCONFIG and I couldn't figure out the cause. It seems that libstdcpp dependencies are not resolved the same, adding ztimer deps without
TEST_KCONFIG
.Testing procedure
Green Murdock
Issues/PRs references
None