YCM-Generator
YCM-Generator copied to clipboard
ERROR: No commands were logged to the build logs . Your build system may not be compatible.
What I am doing wrong?
Makefile
# Makefile
SRCS=main.c stm32f4xx_it.c stm32f4xx_hal_msp.c system_stm32f4xx.c
SRCS += startup_stm32f407xx.s
# Binaries will be generated with this name (.elf, .bin, .hex, etc)
PROJ_NAME=main
# Path
STM_COMMON=/home/richard/Documents/stm32f4/STM32Cube_FW_F4_V1.12.0
# Board/MCU
STM_SERIE=STM32F4XX
STM_MODEL=STM32F407xx
BSP_MODEL=STM32F4-Discovery
# Linker
LINK=STM32F407VG_FLASH.ld
#######################################################################################
export STM_COMMON
export STM_SERIE
export STM_MODEL
CC=arm-none-eabi-gcc
OBJCOPY=arm-none-eabi-objcopy
CFLAGS = -g -O2 -Wall -T$(LINK)
CFLAGS += -DUSE_STDPERIPH_DRIVER -D$(STM_SERIE) -D$(STM_MODEL)
CFLAGS += --specs=nosys.specs
CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += -I.
# Include files from STM libraries
CFLAGS += -I$(STM_COMMON)/Drivers/CMSIS/Include
CFLAGS += -I$(STM_COMMON)/Drivers/STM32F4xx_HAL_Driver/Inc
CFLAGS += -I$(STM_COMMON)/Drivers/CMSIS/Device/ST/STM32F4xx/Include/
#BSP
CFLAGS += -I$(STM_COMMON)/Drivers/BSP/$(BSP_MODEL)
vpath %.c $(STM_COMMON)/Drivers/BSP/$(BSP_MODEL)
OBJS = $(SRCS:.c=.o)
LIBS=libs
.PHONY: lib proj
all: lib proj
lib:
$(MAKE) -C $(LIBS)
proj: $(PROJ_NAME).elf
$(PROJ_NAME).elf: $(SRCS)
$(CC) $(CFLAGS) $^ -o $@ -L$(LIBS) -lstmf4
$(OBJCOPY) -O ihex $(PROJ_NAME).elf $(PROJ_NAME).hex
$(OBJCOPY) -O binary $(PROJ_NAME).elf $(PROJ_NAME).bin
clean:
rm -f *.o
rm -f $(PROJ_NAME).elf
rm -f $(PROJ_NAME).hex
rm -f $(PROJ_NAME).bin
$(MAKE) -C $(LIBS) clean
burn:
st-flash write $(PROJ_NAME).bin 0x8000000
/libs/Makefile
CC=arm-none-eabi-gcc
AR=arm-none-eabi-ar
###########################################
vpath %.c $(STM_COMMON)/Drivers/STM32F4xx_HAL_Driver/Src
CFLAGS = -ggdb -O0 -Wall -Wextra -Warray-bounds
CFLAGS += -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
CFLAGS += -DUSE_STDPERIPH_DRIVER -D$(STM_SERIE) -D$(STM_MODEL)
CFLAGS += -I$(STM_COMMON)/Drivers/CMSIS/Include -I$(STM_COMMON)/Drivers/CMSIS/Device/ST/STM32F4xx/Include -I$(STM_COMMON)/Drivers/STM32F4xx_HAL_Driver/Inc
CFLAGS += -I../
SRCS = stm32f4xx_hal.c stm32f4xx_hal_msp_template.c \
stm32f4xx_hal_adc.c stm32f4xx_hal_nand.c \
stm32f4xx_hal_adc_ex.c stm32f4xx_hal_nor.c \
stm32f4xx_hal_can.c stm32f4xx_hal_pccard.c \
stm32f4xx_hal_cortex.c stm32f4xx_hal_pcd.c \
stm32f4xx_hal_crc.c stm32f4xx_hal_pwr.c \
stm32f4xx_hal_cryp.c stm32f4xx_hal_pwr_ex.c \
stm32f4xx_hal_cryp_ex.c stm32f4xx_hal_rcc.c \
stm32f4xx_hal_dac.c stm32f4xx_hal_rcc_ex.c \
stm32f4xx_hal_dac_ex.c stm32f4xx_hal_rng.c \
stm32f4xx_hal_dcmi.c stm32f4xx_hal_rtc.c \
stm32f4xx_hal_dma.c stm32f4xx_hal_rtc_ex.c \
stm32f4xx_hal_dma2d.c stm32f4xx_hal_sai.c \
stm32f4xx_hal_dma_ex.c stm32f4xx_hal_sd.c \
stm32f4xx_hal_eth.c stm32f4xx_hal_sdram.c \
stm32f4xx_hal_flash.c stm32f4xx_hal_smartcard.c \
stm32f4xx_hal_flash_ex.c stm32f4xx_hal_spi.c \
stm32f4xx_hal_gpio.c stm32f4xx_hal_sram.c \
stm32f4xx_hal_hash.c stm32f4xx_hal_tim.c \
stm32f4xx_hal_hash_ex.c stm32f4xx_hal_tim_ex.c \
stm32f4xx_hal_hcd.c stm32f4xx_hal_uart.c \
stm32f4xx_hal_i2c.c stm32f4xx_hal_usart.c \
stm32f4xx_hal_i2c_ex.c stm32f4xx_hal_wwdg.c \
stm32f4xx_hal_i2s.c stm32f4xx_ll_fmc.c \
stm32f4xx_hal_i2s_ex.c stm32f4xx_ll_fsmc.c \
stm32f4xx_hal_irda.c stm32f4xx_ll_sdmmc.c \
stm32f4xx_hal_iwdg.c stm32f4xx_ll_usb.c \
stm32f4xx_hal_ltdc.c
OBJS = $(SRCS:.c=.o)
.PHONY: libstmf4.a
all: libstmf4.a
%.o : %.c
$(CC) $(CFLAGS) -c -o $@ $^
libstmf4.a: $(OBJS)
$(AR) -r $@ $(OBJS)
clean:
rm -f $(OBJS) libstmf4.a
And --verbose output: http://pastebin.com/WGL3S13c
CC=arm-none-eabi-gcc
This overrides the setting of CC=cc via environment variable. If you use the develop branch, you'll find this has been fixed by adding a symlink for arm-none-eabi-gcc. Alternatively, you can just create one yourself in ~/.vim/bundle/YCM-Generator/fake-toolchain/Unix/.
Hi @rdnetto , If the crosscompilers are the only issue here, why can't this particular patch make it to the to the stable branch?
Also for the android abi variants:
ln -s cc arm-linux-androideabi-gcc
ln -s cxx arm-linux-androideabi-g++
I think I am having the same issue. I am cross-compiling in C for avr, so my compiler is avr-gcc.
I think I understand how symlinking avr-gcc in ./YCM-Generator/fake-toolchain/Unix/ could help me fix my problem, but it's not clear exactly what I need to do...
If it's relevant, this is my makefile: https://github.com/yankee14/avr-makefile/blob/master/Makefile
$ ./config_gen.py --verbose ~/programming_projects/AVR/helloworld/src/
Preparing build directory...
$ make clean
rm -f -r ./build_atmega328p
Running make...
$ make -i -j4
mkdir -p ./build_atmega328p
avr-gcc -Wall -Ofast -DF_CPU=16000000UL -mmcu=atmega328p -I/usr/lib/avr/include -c main.c -o build_atmega328p/main.o
avr-gcc -Wall -Ofast -DF_CPU=16000000UL -mmcu=atmega328p -I/usr/lib/avr/include -o ./build_atmega328p/atmega328p.elf ./build_atmega328p/main.o
rm -f ./build_atmega328p/atmega328p.hex
avr-objcopy --only-section .text --only-section .data --output-target ihex ./build_atmega328p/atmega328p.elf ./build_atmega328p/atmega328p.hex
Build completed in 0.04 sec
Collected 0 relevant entries for C compilation (0 discarded).
Collected 0 relevant entries for C++ compilation (0 discarded).
ERROR: No commands were logged to the build logs (C: /tmp/tmpHpqauY, C++: /tmp/tmpVIrVoy).
Your build system may not be compatible.