Search code examples
embeddedkeil

Keil uVision 5.23.0.0 compilation error(s) C4065E


I have a project in Keil uVision version 5.23.0.0 for STM32F103RC microcontroller and my project is located under C:\Projects\TestProj\LCDController\ on NTFS file system using Windows 7 x64 Ultimate as Virtual Machine in VMWare Player. Now, when I try to build project, I get following errors:

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'LcdController'
creating preprocessor file for gpio.c...
compiling gpio.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for main.c...
compiling main.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for i2c.c...
compiling i2c.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_it.c...
compiling stm32f1xx_it.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for spi.c...
compiling spi.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_msp.c...
compiling stm32f1xx_hal_msp.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for lcd_dogm128_6.c...
compiling lcd_dogm128_6.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for lcd_dogm128_6_alphabet.c...
compiling lcd_dogm128_6_alphabet.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for lcd_srf06eb.c...
compiling lcd_srf06eb.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for system_stm32f1xx.c...
compiling system_stm32f1xx.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_flash.c...
compiling stm32f1xx_hal_flash.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_spi_ex.c...
compiling stm32f1xx_hal_spi_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_rcc.c...
compiling stm32f1xx_hal_rcc.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_tim.c...
compiling stm32f1xx_hal_tim.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_cortex.c...
compiling stm32f1xx_hal_cortex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_gpio.c...
compiling stm32f1xx_hal_gpio.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_spi.c...
compiling stm32f1xx_hal_spi.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_gpio_ex.c...
compiling stm32f1xx_hal_gpio_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_i2c.c...
compiling stm32f1xx_hal_i2c.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal.c...
compiling stm32f1xx_hal.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_rcc_ex.c...
compiling stm32f1xx_hal_rcc_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_tim_ex.c...
compiling stm32f1xx_hal_tim_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_pwr.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_dma.c...
Error: C4065E: type of input file '..\Inc' unknown
creating preprocessor file for stm32f1xx_hal_flash_ex.c...
compiling stm32f1xx_hal_flash_ex.c...
Error: C4065E: type of input file '..\Inc' unknown
assembling startup_stm32f103xe.s...
linking...
.\LcdController\LcdController.axf: error: L6002U: Could not open file .\lcdcontroller\gpio.o: No such file or directory
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
".\LcdController\LcdController.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:04

Batch-Build summary: 0 succeeded, 1 failed, 0 skipped - Time Elapsed: 00:00:04

The error is related (I think) to Project Include paths: Keil Include Settings Why I am getting these errors and how do I solve them? Now, according to @LP's comment, this is the procedure for setting up Include dirs:
STEP 1 - Adding Inc directory
I am selecting Inc directory through Keil GUI:GUI Selection and when I select C:\Projects\TestProj\LCDController\Inc directory, my directory path gets truncated into ..\Inc.:GUI Selection 1GUI Selection 2. Is maybe bug in Keil and the path is wrong? Same happens for other two include dirs.


Solution

  • I don't know if it will be the case but this sometimes works.

    1. close project
    2. close Keil
    3. reopen project

    this is because Keil have many internals errors.