qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.28k stars 39.38k forks source link

[Bug] ergodox_stm32_default.elf | arm-none-eabi-gcc: error: .build/obj_ergodox_stm32_default/lib/printf/printf.o: No such file or directory #15125

Closed mianqi2016 closed 2 years ago

mianqi2016 commented 3 years ago

Describe the Bug

I used "qmk compile" for ergodox_stm32, there was such error prompt: https://ibb.co/WcdPNd6

Linking: .build/ergodox_stm32_default.elf [ERRORS] arm-none-eabi-gcc: error: .build/obj_ergodox_stm32_default/lib/printf/printf.o: No such file or directory

make[1]: *** [tmk_core/rules.mk:351: .build/ergodox_stm32_default.elf] Error 1

System Information

Additional Context

drashna commented 2 years ago

Compiles fine for me. You're probably missing submodules.

Run make git-submodule from the qmk_firmware directory and recompile.

mianqi2016 commented 2 years ago

Since the net was too slow, so I download .zip from qmk@github, while:

`qmk compile -kb ergodox_stm32 -km default Ψ Compiling keymap with make --jobs=1 ergodox_stm32:default

⚠ "git describe --abbrev=6 --dirty --always --tags" returned error code 128 Makefile:507: *** multiple target patterns. Stop. `

make git-submodule make: *** No rule to make target 'git-submodule'. Stop.

fauxpark commented 2 years ago

Downloading the zip file from GitHub won't work, you need to follow the setup instructions.

mianqi2016 commented 2 years ago
Now, there is a new error: `Linking: .build/ergodox_stm32_default.elf [ERRORS] arm-none-eabi-gcc: error: .build/obj_ergodox_stm32_default/lib/printf/printf.o: No such file or directory

make[1]: *** [tmk_core/rules.mk:365: .build/ergodox_stm32_default.elf] Error 1 Make finished with errors `

I tested crkbd, it was OK, so qmk work correctly: `Linking: .build/crkbd_rev1_default.elf [OK] Creating load file for flashing: .build/crkbd_rev1_default.hex [OK] Copying crkbd_rev1_default.hex to qmk_firmware folder [OK] Checking file size of crkbd_rev1_default.hex [OK]

drashna commented 2 years ago

qmk clean -a and/or make git-submodule again.

mianqi2016 commented 2 years ago

It still was there: arm-none-eabi-gcc: error: .build/obj_ergodox_stm32_default/lib/printf/printf.o: No such file or directory

and I saw in the folder".build/obj_ergodox_stm32_default/lib/", there was only "chibios", no "printf".

fauxpark commented 2 years ago

What is the output of git status and ls lib?

mianqi2016 commented 2 years ago

The output for "git status":

` On branch master Your branch is up to date with 'origin/master'.

Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: ../../../lib/printf (modified content) modified: ../../../lib/vusb (modified content)

no changes added to commit (use "git add" and/or "git commit -a") `

mianqi2016 commented 2 years ago

The output of "ls lib" under "qmk_firmware":

` arm_atsam chibios-contrib lib8tion printf usbhost chibios googletest lufa python vusb

`

fauxpark commented 2 years ago

Delete the lib/printf and lib/vusb folders, then run make git-submodule again.

mianqi2016 commented 2 years ago

Now, it seems OK: ` qmk compile -kb ergodox_stm32 -km default Ψ Compiling keymap with make --jobs=1 ergodox_stm32:default

QMK Firmware 0.15.6 Making ergodox_stm32 with keymap default

arm-none-eabi-gcc (15:9-2019-q4-0ubuntu1) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: lib/printf/printf.c [OK] Linking: .build/ergodox_stm32_default.elf [OK] Creating binary load file for flashing: .build/ergodox_stm32_default.bin [OK] Creating load file for flashing: .build/ergodox_stm32_default.hex [OK]

Size after: text data bss dec hex filename 0 46194 0 46194 b472 .build/ergodox_stm32_default.hex

Copying ergodox_stm32_default.bin to qmk_firmware folder [OK] (Firmware size check does not yet support STM32F103; skipping)

` While, what does the last sentence "(Firmware size check does not yet support STM32F103; skipping)" mean?

fauxpark commented 2 years ago

You can ignore that, it just means you won't get the % of flash space used by the firmware at the end of compilation:

 * The firmware size is fine - 18670/28672 (65%, 10002 bytes free)