Hi,
when attempting to build micropython for the Particle Xenon board, the build fails - no target for 'lib/tinyusb/src/portable/nordic/nrf5x/hal_nrf5x.c'. Seems the file no longer exists in tinyusb... safe to modify the makefile to remove the reference to it? I'm assuming the code now lives someplace else, but didn't spend any real time trying to figure that out...
Any thoughts?
thanks!
[Particle_Xenon/NRF5X] build fails - tinyusb hal file missing
Re: [Particle_Xenon/NRF5X] build fails - tinyusb hal file missing
Were you previously able to build for NRF before a recent update to master?
I think this is likely to be due to a weird git quirk when submodules (e.g. tinyusb) change the path to their own submodules (e.g. tinyusb's nrf drivers).
So try doing
(Sorry on phone so can't verify the exact commands but conceptually you get the idea -- you need to destroy git's cache of the outer submodule).
I think this is likely to be due to a weird git quirk when submodules (e.g. tinyusb) change the path to their own submodules (e.g. tinyusb's nrf drivers).
So try doing
Code: Select all
git submodule deinit -f lib/tinyusb
rm -rf .git/modules/lib/tinyusb
git submodule update --init --recursive lib/tinyusb
Re: [Particle_Xenon/NRF5X] build fails - tinyusb hal file missing
Thanks, will give it a try. This was my first attempt at building micropython - so yesterday was an attempt at following the getting started instructions and then building for the Xenon. I found the missing define was removed from Tinyusb in August 2019. I restored it, but now the define for NRF_CLOCK in TinyUsb is having issues. I'll try to reinit and see how it goes...
Re: [Particle_Xenon/NRF5X] build fails - tinyusb hal file missing
Hi,
attempted the git update - but no help there. The compile error is that https://github.com/micropython/micropyt ... criptors.c is referencing TUD_DESC_STR_HEADER, which was removed from TinyUsb in August 2019 on this commit - (https://github.com/hathach/tinyusb/comm ... c63d0ce65d).
Restoring those are easy enough, but then there are a number of errors about the NRF_CLOCK define (samples included below):
In file included from ../../lib/nrfx/mdk/nrf.h:93:0,
from ../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:31:
../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c: In function 'hfclk_running':
../../lib/nrfx/mdk/nrf52840.h:2824:37: error: incompatible type for argument 1 of 'nrf_clock_hf_is_running'
#define NRF_CLOCK ((NRF_CLOCK_Type*) NRF_CLOCK_BASE)
^
../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:575:34: note: in expansion of macro 'NRF_CLOCK'
return nrf_clock_hf_is_running(NRF_CLOCK, NRF_CLOCK_HFCLK_HIGH_ACCURACY);
^~~~~~~~~
In file included from ../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:32:0:
../../lib/nrfx/hal/nrf_clock.h:462:22: note: expected 'nrf_clock_hfclk_t {aka enum <anonymous>}' but argument is of type 'NRF_CLOCK_Type * {aka struct <anonymous> *}'
__STATIC_INLINE bool nrf_clock_hf_is_running(nrf_clock_hfclk_t clk_src)
^~~~~~~~~~~~~~~~~~~~~~~
../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:575:10: error: too many arguments to function 'nrf_clock_hf_is_running'
return nrf_clock_hf_is_running(NRF_CLOCK, NRF_CLOCK_HFCLK_HIGH_ACCURACY);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:32:0:
../../lib/nrfx/hal/nrf_clock.h:462:22: note: declared here
__STATIC_INLINE bool nrf_clock_hf_is_running(nrf_clock_hfclk_t clk_src)
Not sure if I missed a setup step or if the Particle Xenon build just isn't working at the moment...
Any idea of where to go next? Or is there a tag that will build the Xenon?
Thanks!
attempted the git update - but no help there. The compile error is that https://github.com/micropython/micropyt ... criptors.c is referencing TUD_DESC_STR_HEADER, which was removed from TinyUsb in August 2019 on this commit - (https://github.com/hathach/tinyusb/comm ... c63d0ce65d).
Restoring those are easy enough, but then there are a number of errors about the NRF_CLOCK define (samples included below):
In file included from ../../lib/nrfx/mdk/nrf.h:93:0,
from ../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:31:
../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c: In function 'hfclk_running':
../../lib/nrfx/mdk/nrf52840.h:2824:37: error: incompatible type for argument 1 of 'nrf_clock_hf_is_running'
#define NRF_CLOCK ((NRF_CLOCK_Type*) NRF_CLOCK_BASE)
^
../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:575:34: note: in expansion of macro 'NRF_CLOCK'
return nrf_clock_hf_is_running(NRF_CLOCK, NRF_CLOCK_HFCLK_HIGH_ACCURACY);
^~~~~~~~~
In file included from ../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:32:0:
../../lib/nrfx/hal/nrf_clock.h:462:22: note: expected 'nrf_clock_hfclk_t {aka enum <anonymous>}' but argument is of type 'NRF_CLOCK_Type * {aka struct <anonymous> *}'
__STATIC_INLINE bool nrf_clock_hf_is_running(nrf_clock_hfclk_t clk_src)
^~~~~~~~~~~~~~~~~~~~~~~
../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:575:10: error: too many arguments to function 'nrf_clock_hf_is_running'
return nrf_clock_hf_is_running(NRF_CLOCK, NRF_CLOCK_HFCLK_HIGH_ACCURACY);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:32:0:
../../lib/nrfx/hal/nrf_clock.h:462:22: note: declared here
__STATIC_INLINE bool nrf_clock_hf_is_running(nrf_clock_hfclk_t clk_src)
Not sure if I missed a setup step or if the Particle Xenon build just isn't working at the moment...
Any idea of where to go next? Or is there a tag that will build the Xenon?
Thanks!
Re: [Particle_Xenon/NRF5X] build fails - tinyusb hal file missing
Hi,
I had a few minutes to check this today. I'm not quite sure how I missed this but yes, the TinyUSB update from PR #5558 did break this. I'm not sure how I missed that the NRF port used TinyUSB and needed to be updated (I updated the SAMD port only).
So in order to get your build working I'd probably just
git revert 6cea369b89b2223cf07ff8768e50dc39bbb770fe
and then re-update the tinyusb submodule.
I'll fix the NRF port to work with the new TinyUSB ASAP. You're right about hal_nrf5x.c (it was merged into the other file in the same dir), but I'll have to dig into the other changes.
Sorry about that!
(Edit: I'll also add at least one of the NRF USB boards to the CI build to avoid something like this happening again)
I had a few minutes to check this today. I'm not quite sure how I missed this but yes, the TinyUSB update from PR #5558 did break this. I'm not sure how I missed that the NRF port used TinyUSB and needed to be updated (I updated the SAMD port only).
So in order to get your build working I'd probably just
git revert 6cea369b89b2223cf07ff8768e50dc39bbb770fe
and then re-update the tinyusb submodule.
I'll fix the NRF port to work with the new TinyUSB ASAP. You're right about hal_nrf5x.c (it was merged into the other file in the same dir), but I'll have to dig into the other changes.
Sorry about that!
(Edit: I'll also add at least one of the NRF USB boards to the CI build to avoid something like this happening again)
Re: [Particle_Xenon/NRF5X] build fails - tinyusb hal file missing
I have all the NRF boards building again but limited ability to test NRF here. I'll send the PR anyway, and follow up when I have a chance to do some testing (I have a Xenon also and some nRF51822 boards)
Re: [Particle_Xenon/NRF5X] build fails - tinyusb hal file missing
That's good news! Thanks for the info above - the revert worked, I was able to build. I'll start playing around with it on my Xenon to see how it goes. Thanks again for the help
Re: [Particle_Xenon/NRF5X] build fails - tinyusb hal file missing
Hi,
When attempting to build micropython for pca10056 board the same failed build error occurs:
Still got failed build
Please, am I missing something ?
When attempting to build micropython for pca10056 board the same failed build error occurs:
I did the suggestion mentioned above in this sequence:make: *** No rule to make target 'lib/tinyusb/src/portable/nordic/nrf5x/hal_nrf5x.c', needed by 'build-pca10056-s140/genhdr/qstr.i.last'. Stop.
Code: Select all
git reset --hard 6cea369b89b2223cf07ff8768e50dc39bbb770fe
git submodule deinit -f lib/tinyusb
rm -rf .git/modules/lib/tinyusb
git submodule update --init --recursive lib/tinyusb
Please, am I missing something ?