2020-12-22 09:43 AM
/**
******************************************************************************
* @file stm32g474e_eval_errno.h
* @author MCD Application Team
* @brief Error Code.
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2019 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32G474E_EVAL_ERRNO_H
#define STM32G474E_EVAL_ERRNO_H
#ifdef __cplusplus
extern "C" {
#endif
/* Common Error codes */
#define BSP_ERROR_NONE 0
#define BSP_ERROR_NO_INIT -1
#define BSP_ERROR_WRONG_PARAM -2
#define BSP_ERROR_BUSY -3
#define BSP_ERROR_PERIPH_FAILURE -4
#define BSP_ERROR_COMPONENT_FAILURE -5
#define BSP_ERROR_UNKNOWN_FAILURE -6
#define BSP_ERROR_UNKNOWN_COMPONENT -7
#define BSP_ERROR_BUS_FAILURE -8
#define BSP_ERROR_CLOCK_FAILURE -9
#define BSP_ERROR_MSP_FAILURE -10
#define BSP_ERROR_FEATURE_NOT_SUPPORTED -11
/* BSP QSPI error codes */
#define BSP_ERROR_QSPI_ASSIGN_FAILURE -20
#define BSP_ERROR_QSPI_SETUP_FAILURE -21
#define BSP_ERROR_QSPI_MMP_LOCK_FAILURE -22
#define BSP_ERROR_QSPI_MMP_UNLOCK_FAILURE -23
/* BSP BUS error codes */
#define BSP_ERROR_BUS_TRANSACTION_FAILURE -100
#define BSP_ERROR_BUS_ARBITRATION_LOSS -101
#define BSP_ERROR_BUS_ACKNOWLEDGE_FAILURE -102
#define BSP_ERROR_BUS_PROTOCOL_FAILURE -103
#define BSP_ERROR_BUS_MODE_FAULT -104
#define BSP_ERROR_BUS_FRAME_ERROR -105
#define BSP_ERROR_BUS_CRC_ERROR -106
#define BSP_ERROR_BUS_DMA_FAILURE -107
#endif /* STM32G474E_EVAL_ERRNO_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
There is no closing brace when including this file in C++ code.
The included compiler (GCC 7.x?) doesn't provide as helpful information as GCC 10.
A compiler upgrade would be nice. Finding the cause of the issue is difficult otherwise.
../Core/Src/main.cpp:648:1: error: expected '}' at end of input
648 | }
| ^
In file included from ../FATFS/App/app_fatfs.h:29,
from ../Core/Src/main.cpp:23:
../FATFS/Target/sd_diskio.h:26:13: note: to match this '{'
26 | extern "C" {
| ^
make: *** [Core/Src/subdir.mk:37: Core/Src/main.o] Error 1
make: *** Waiting for unfinished jobs....
"make -j8 all" terminated with exit code 2. Build might be incomplete.