Skip to content
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

fatal: No url found for submodule path 'lib/Pico-PIO-USB' in .gitmodules #1475

Closed
cr1901 opened this issue May 27, 2022 · 1 comment
Closed
Labels

Comments

@cr1901
Copy link
Collaborator

cr1901 commented May 27, 2022

Operating System

Linux

Board

N/A

Firmware

N/A

What happened ?

git submodule updating TinyUSB will fail since 4586d8f due to incompletely moving the lib/Pico-PIO-USB module to hw/mcu/raspberry_pi.

A "fun fact" I learned tonight is that git only uses the existence of a .git folder in a subdirectory in determining what is a submodule. And if there's no matching path entry in .gitmodules (and there isn't), git will complain with fatal: No url found for submodule path [whatever] in .gitmodules for many submodule commands. Contrived Example:

william@xubuntu-dtrain:~/Projects/consult/tinyusb$ mkdir foo
william@xubuntu-dtrain:~/Projects/consult/tinyusb$ cd foo/
william@xubuntu-dtrain:~/Projects/consult/tinyusb/foo$ git init .
Initialized empty Git repository in /home/william/Projects/consult/tinyusb/foo/.git/
william@xubuntu-dtrain:~/Projects/consult/tinyusb/foo$ touch bar
william@xubuntu-dtrain:~/Projects/consult/tinyusb/foo$ git add bar
william@xubuntu-dtrain:~/Projects/consult/tinyusb/foo$ git commit -m "Initial commit."
[master (root-commit) 25208d7] Initial commit.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 bar
william@xubuntu-dtrain:~/Projects/consult/tinyusb/foo$ cd ..
william@xubuntu-dtrain:~/Projects/consult/tinyusb$ git add foo
warning: adding embedded git repository: foo
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint:   git submodule add <url> foo
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint:   git rm --cached foo
hint:
hint: See "git help submodule" for more information.
william@xubuntu-dtrain:~/Projects/consult/tinyusb$ git commit -m "Dummy commit."
[master d68bbd755] Dummy commit.
 1 file changed, 1 insertion(+)
 create mode 160000 foo
william@xubuntu-dtrain:~/Projects/consult/tinyusb$ git submodule status
fatal: no submodule mapping found in .gitmodules for path 'foo'

I believe running git rm lib/Pico-PIO-USB and committing the results will fix this. The only reason this isn't a PR is because I wanted to double check that this wasn't intentional.

How to reproduce ?

The below is not the only way you'd see this error, just the easiest, and works as of 7b1344f:

  1. Do a fresh clone of the TinyUSB repo:
Cloning into 'tinyusb'...
remote: Enumerating objects: 65621, done.
remote: Counting objects: 100% (193/193), done.
remote: Compressing objects: 100% (111/111), done.
remote: Total 65621 (delta 87), reused 159 (delta 75), pack-reused 65428
Receiving objects: 100% (65621/65621), 35.25 MiB | 9.40 MiB/s, done.
Resolving deltas: 100% (44088/44088), done.
  1. Do git submodule update --init --recursive inside your fresh checkout. The --init will fail with fatal: No url found for submodule path 'lib/Pico-PIO-USB' in .gitmodules:
william@xubuntu-dtrain:~/Projects/consult$ cd tinyusb/
william@xubuntu-dtrain:~/Projects/consult/tinyusb$ git submodule update --init --recursive
Submodule 'hw/mcu/allwinner' (https://github.com/hathach/allwinner_driver.git) registered for path 'hw/mcu/allwinner'
Submodule 'hw/mcu/bridgetek/ft9xx/ft90x-sdk' (https://github.com/BRTSG-FOSS/ft90x-sdk) registered for path 'hw/mcu/bridgetek/ft9xx/ft90x-sdk'
Submodule 'hw/mcu/broadcom' (https://github.com/adafruit/broadcom-peripherals.git) registered for path 'hw/mcu/broadcom'
Submodule 'hw/mcu/gd/nuclei-sdk' (https://github.com/Nuclei-Software/nuclei-sdk.git) registered for path 'hw/mcu/gd/nuclei-sdk'
Submodule 'hw/mcu/infineon/mtb-xmclib-cat3' (https://github.com/Infineon/mtb-xmclib-cat3.git) registered for path 'hw/mcu/infineon/mtb-xmclib-cat3'
Submodule 'hw/mcu/microchip' (https://github.com/hathach/microchip_driver.git) registered for path 'hw/mcu/microchip'
Submodule 'hw/mcu/mindmotion/mm32sdk' (https://github.com/hathach/mm32sdk.git) registered for path 'hw/mcu/mindmotion/mm32sdk'
Submodule 'hw/mcu/nordic/nrfx' (https://github.com/NordicSemiconductor/nrfx.git) registered for path 'hw/mcu/nordic/nrfx'
Submodule 'hw/mcu/nuvoton' (https://github.com/majbthrd/nuc_driver.git) registered for path 'hw/mcu/nuvoton'
Submodule 'hw/mcu/nxp/lpcopen' (https://github.com/hathach/nxp_lpcopen.git) registered for path 'hw/mcu/nxp/lpcopen'
Submodule 'hw/mcu/nxp/mcux-sdk' (https://github.com/NXPmicro/mcux-sdk.git) registered for path 'hw/mcu/nxp/mcux-sdk'
Submodule 'hw/mcu/nxp/nxp_sdk' (https://github.com/hathach/nxp_sdk.git) registered for path 'hw/mcu/nxp/nxp_sdk'
Submodule 'hw/mcu/raspberry_pi/Pico-PIO-USB' (https://github.com/sekigon-gonnoc/Pico-PIO-USB.git) registered for path 'hw/mcu/raspberry_pi/Pico-PIO-USB'
Submodule 'hw/mcu/renesas/rx' (https://github.com/kkitayam/rx_device.git) registered for path 'hw/mcu/renesas/rx'
Submodule 'hw/mcu/silabs/cmsis-dfp-efm32gg12b' (https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b) registered for path 'hw/mcu/silabs/cmsis-dfp-efm32gg12b'
Submodule 'hw/mcu/sony/cxd56/spresense-exported-sdk' (https://github.com/sonydevworld/spresense-exported-sdk.git) registered for path 'hw/mcu/sony/cxd56/spresense-exported-sdk'
Submodule 'hw/mcu/st/cmsis_device_f0' (https://github.com/STMicroelectronics/cmsis_device_f0.git) registered for path 'hw/mcu/st/cmsis_device_f0'
Submodule 'hw/mcu/st/cmsis_device_f1' (https://github.com/STMicroelectronics/cmsis_device_f1.git) registered for path 'hw/mcu/st/cmsis_device_f1'
Submodule 'hw/mcu/st/cmsis_device_f2' (https://github.com/STMicroelectronics/cmsis_device_f2.git) registered for path 'hw/mcu/st/cmsis_device_f2'
Submodule 'hw/mcu/st/cmsis_device_f3' (https://github.com/STMicroelectronics/cmsis_device_f3.git) registered for path 'hw/mcu/st/cmsis_device_f3'
Submodule 'hw/mcu/st/cmsis_device_f4' (https://github.com/STMicroelectronics/cmsis_device_f4.git) registered for path 'hw/mcu/st/cmsis_device_f4'
Submodule 'hw/mcu/st/cmsis_device_f7' (https://github.com/STMicroelectronics/cmsis_device_f7.git) registered for path 'hw/mcu/st/cmsis_device_f7'
Submodule 'hw/mcu/st/cmsis_device_g0' (https://github.com/STMicroelectronics/cmsis_device_g0.git) registered for path 'hw/mcu/st/cmsis_device_g0'
Submodule 'hw/mcu/st/cmsis_device_g4' (https://github.com/STMicroelectronics/cmsis_device_g4.git) registered for path 'hw/mcu/st/cmsis_device_g4'
Submodule 'hw/mcu/st/cmsis_device_h7' (https://github.com/STMicroelectronics/cmsis_device_h7.git) registered for path 'hw/mcu/st/cmsis_device_h7'
Submodule 'hw/mcu/st/cmsis_device_l0' (https://github.com/STMicroelectronics/cmsis_device_l0.git) registered for path 'hw/mcu/st/cmsis_device_l0'
Submodule 'hw/mcu/st/cmsis_device_l1' (https://github.com/STMicroelectronics/cmsis_device_l1.git) registered for path 'hw/mcu/st/cmsis_device_l1'
Submodule 'hw/mcu/st/cmsis_device_l4' (https://github.com/STMicroelectronics/cmsis_device_l4.git) registered for path 'hw/mcu/st/cmsis_device_l4'
Submodule 'hw/mcu/st/cmsis_device_l5' (https://github.com/STMicroelectronics/cmsis_device_l5.git) registered for path 'hw/mcu/st/cmsis_device_l5'
Submodule 'hw/mcu/st/cmsis_device_wb' (https://github.com/STMicroelectronics/cmsis_device_wb.git) registered for path 'hw/mcu/st/cmsis_device_wb'
Submodule 'hw/mcu/st/stm32f0xx_hal_driver' (https://github.com/STMicroelectronics/stm32f0xx_hal_driver.git) registered for path 'hw/mcu/st/stm32f0xx_hal_driver'
Submodule 'hw/mcu/st/stm32f1xx_hal_driver' (https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git) registered for path 'hw/mcu/st/stm32f1xx_hal_driver'
Submodule 'hw/mcu/st/stm32f2xx_hal_driver' (https://github.com/STMicroelectronics/stm32f2xx_hal_driver.git) registered for path 'hw/mcu/st/stm32f2xx_hal_driver'
Submodule 'hw/mcu/st/stm32f3xx_hal_driver' (https://github.com/STMicroelectronics/stm32f3xx_hal_driver.git) registered for path 'hw/mcu/st/stm32f3xx_hal_driver'
Submodule 'hw/mcu/st/stm32f4xx_hal_driver' (https://github.com/STMicroelectronics/stm32f4xx_hal_driver.git) registered for path 'hw/mcu/st/stm32f4xx_hal_driver'
Submodule 'hw/mcu/st/stm32f7xx_hal_driver' (https://github.com/STMicroelectronics/stm32f7xx_hal_driver.git) registered for path 'hw/mcu/st/stm32f7xx_hal_driver'
Submodule 'hw/mcu/st/stm32g0xx_hal_driver' (https://github.com/STMicroelectronics/stm32g0xx_hal_driver.git) registered for path 'hw/mcu/st/stm32g0xx_hal_driver'
Submodule 'hw/mcu/st/stm32g4xx_hal_driver' (https://github.com/STMicroelectronics/stm32g4xx_hal_driver.git) registered for path 'hw/mcu/st/stm32g4xx_hal_driver'
Submodule 'hw/mcu/st/stm32h7xx_hal_driver' (https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git) registered for path 'hw/mcu/st/stm32h7xx_hal_driver'
Submodule 'hw/mcu/st/stm32l0xx_hal_driver' (https://github.com/STMicroelectronics/stm32l0xx_hal_driver.git) registered for path 'hw/mcu/st/stm32l0xx_hal_driver'
Submodule 'hw/mcu/st/stm32l1xx_hal_driver' (https://github.com/STMicroelectronics/stm32l1xx_hal_driver.git) registered for path 'hw/mcu/st/stm32l1xx_hal_driver'
Submodule 'hw/mcu/st/stm32l4xx_hal_driver' (https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git) registered for path 'hw/mcu/st/stm32l4xx_hal_driver'
Submodule 'hw/mcu/st/stm32l5xx_hal_driver' (https://github.com/STMicroelectronics/stm32l5xx_hal_driver.git) registered for path 'hw/mcu/st/stm32l5xx_hal_driver'
Submodule 'hw/mcu/st/stm32wbxx_hal_driver' (https://github.com/STMicroelectronics/stm32wbxx_hal_driver.git) registered for path 'hw/mcu/st/stm32wbxx_hal_driver'
Submodule 'hw/mcu/ti' (https://github.com/hathach/ti_driver.git) registered for path 'hw/mcu/ti'
Submodule 'lib/CMSIS_5' (https://github.com/ARM-software/CMSIS_5.git) registered for path 'lib/CMSIS_5'
Submodule 'lib/FreeRTOS-Kernel' (https://github.com/FreeRTOS/FreeRTOS-Kernel.git) registered for path 'lib/FreeRTOS-Kernel'
fatal: No url found for submodule path 'lib/Pico-PIO-USB' in .gitmodules

Debug Log as txt file

No response

Screenshots

No response

@hathach
Copy link
Owner

hathach commented May 27, 2022

confirmed, you are right, there is a leftover when I moved Pico-PIO-USB from /lib to /hw/mcu/raspberry_pi . Please submit PR if you have time :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants