riscv-mcu / GD32VF103_Firmware_Library

Original GD32VF103 Firmware Library
128 stars 37 forks source link

Template Make error: No rule to make target 'build/start.o' , needed by gd32vf103.elf #5

Open HabonRoof opened 4 years ago

HabonRoof commented 4 years ago

OS:Linux 10 buster kernel:4.19.0-6-amd64 target device: GD32FV103C8T6 tool chain: riscv nuclei toolchain

Hi, I'm beginner for embedded system,I want to use risc-v tool chain to build .bin file that can let me use dfu-util to upload to device. I download this repository, and found that there is a Template folder, and observe there is a Makefile in it. So I run 'make' like this:

~/Documents/GD32/GD32VF103_Firmware_Library/Template$ make

successfully build some .c files, there is an error below:

make: *** No rule to make target 'build/start.o', needed by 'build/gd32vf103.elf'. Stop.

I cd to upper folder and use gerp -nr gd32vf103.elf to find where this file is, it only appears at '.git' folder, I don't think '.git' is the correct location where gd32vf103.elf should be, so how can I solve this issue to build the code successfully?

barafael commented 4 years ago

I had the same issue. You can use the fix, which is quite simple (you need to rename 2 files).

Pull request: https://github.com/riscv-mcu/GD32VF103_Firmware_Library/pull/6

where you can see exactly which files I had to rename.