Header file not found - "No such file or directory" - but it exists!
Hi,
Having successfully installed SW4STM32 I recently tried to build the example project detailed on the RIP Tutorial web page entitled "First time setup with blink LED example using SW4STM32 and HAL library". This "threw up" four errors. The first was classed as a fatal error whilst the other three errors involved "make" which I believe are due to the first error.
Within the IDE, on the "Problems" tab, the first error is listed as follows.
Description: fatal error: usbh_conf.h: No such file or directory
Resource: usbh_conf.h
Path: /STM32F4_Discovery_Blinky/Middlewares/ST/STM32_USB_Host_Library/Core/Inc line 28 C/C++ Problem
Within the ".../Inc/" directory is a further subdirectory called "usbh_core.h" within which is the "offending" (non-existent?!) usbh_conf.h This header file is clearly listed on both the Project Explorer and Outline tabs within the IDE. Opening this file shows the following. (How could this be done if the file did not exist ?!)
/**
******************************************************************************
* @file usbh_core.h
* @author MCD Application Team
* @brief Header file for usbh_core.c
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2015 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* http://www.st.com/SLA0044
*
******************************************************************************
*/
/* Define to prevent recursive ----------------------------------------------*/
#ifndef __USBH_CORE_H
#define __USBH_CORE_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "usbh_conf.h"
#include "usbh_def.h"
#include "usbh_ioreq.h"
#include "usbh_pipes.h"
#include "usbh_ctlreq.h"
It can be clearly seen that, with the first "#include", the file includes itself. The IDE flags this line (line 28 within usbh_conf.h) as the source of the error as the line is prepended with an error indicator in the form of a red square containing a yellow cross. Is this instance of the file including itself some form of overlooked/unintended file-level recursion ? Given the compiler directives that immediately precede this line, this would seem to be the case. I am at a loss at this point.
Stuart
