cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling errors after adding LL drivers

Deividas
Associate II

Hello,

I created an gui with designer and now want to add my UART implementation (C) that uses LL drivers. Bunch of compilation errors are displayed when trying to compile it.

0690X000009YfLdQAK.png

I added the .h/.c files and the used ll .c/.h files to minUnit folder under target/minUnit (refer to image below)

0690X000009YfL4QAK.pngI editted the gcc/Makefile include paths:

#keep framework include and source out of this mess! :)
include_paths := $(library_includes) $(foreach comp, $(all_components), $(comp)/include) $(framework_includes) $(source_bsp_paths) target/minUnit
source_paths = $(foreach comp, $(all_components), $(comp)/src) target/minUnit

minUnitSerial.h includes the ll_drivers:

#ifndef __MINUNITSERIAL_H
#define __MINUNITSERIAL_H
 
#ifdef __cplusplus
extern "C" {
#endif
 
/* Includes */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"
 
#include "stm32f4xx.h"
#include "stm32f4xx_ll_rcc.h"
#include "stm32f4xx_ll_bus.h"
#include "stm32f4xx_ll_cortex.h"
#include "stm32f4xx_ll_dma.h"
#include "stm32f4xx_ll_gpio.h"
#include "stm32f4xx_ll_usart.h"
 
#include <string.h>

in the target/main.cpp i included the minUnitSerial.h and called a function in main() loop. I do not know what to do to fix the problem.

Does anyone has a clue? Thank you in advance!

1 REPLY 1
Deividas
Associate II

So I moved the ll driver source files to

board_c_files += \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_cortex.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_dma.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_dma2d.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_dma_ex.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_gpio.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_i2c.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_ltdc.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_ltdc_ex.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_qspi.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_dsi.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_pwr_ex.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_rcc.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_rcc_ex.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_hal_sdram.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_ll_fmc.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_ll_fsmc.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_ll_usart.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_ll_dma.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_ll_rcc.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/STM32F4xx_HAL_Driver/stm32f4xx_ll_gpio.c \
	$(bsp_path)/source/platform/hal/mcu/stm32f4cube/CMSIS/system_stm32f4xx.c

now if i remove the minUnit.c/.h files, it compiles the ll driver files. The only problem is adding my own .c/.h files to the application. My limited knowledge of makefiles gets in the way.

Maybe someone can help