STM32CubeIDE: Problems with including files
I know this has been discussed before before, but for some reasons, I still can't make my project compile without having errors in it, because of including one file. I have included the path in "Paths and Symbols" tab.
Code in "main.h" file
This is the only line of code I added in the main.h file. What is inside this file is as it follows:
/*
* Process_variables_and_parameters.h
*
* Created on: Mar 7, 2021
* Author: FredG
*/
#include <stdio.h>
#ifndef PROCESS_VARIABLES_AND_PARAMETERS_H_
#define PROCESS_VARIABLES_AND_PARAMETERS_H_
#endif /* PROCESS_VARIABLES_AND_PARAMETERS_H_ */
//variable values and their memory addresses for the EEPROM storage
//process mode
uint8_t process_mode_val = 0; //1 = manual off, 2 = manual on, 3 = auto
const uint8_t process_mode_addr = 0x00;
//operation mode
uint8_t operation_mode_val = 0; //1 = sensor mode, 2 = clock mode
const uint8_t operation_mode_addr = 0x01;
/*
* Sensor mode operation parameters
*/
typedef struct
{
float min_humid_val;
uint8_t min_humid_addr; //= 0x02;
float max_humid_val;
uint8_t max_humid_addr; //= 0x06;
RTC_TimeTypeDef runtime;
uint8_t runtime_hours_addr; //= 0x0A;
uint8_t runtime_minutes_addr; //= 0x0B;
uint8_t runtime_seconds_addr; //= 0x0C;
RTC_TimeTypeDef delay;
uint8_t delay_hours_addr; //= 0x0D;
uint8_t delay_minutes_addr; //= 0x0E;
uint8_t delay_seconds_addr; //= 0x0F;
}sensmodeValues;
/*
* Clock mode operation parameters
*/
typedef struct
{
RTC_TimeTypeDef runtime;
const uint8_t runtime_hours_addr; //= 0x10;
const uint8_t runtime_minutes_addr; //= 0x11;
const uint8_t runtime_seconds_addr; //= 0x12;
RTC_TimeTypeDef delay;
const uint8_t delay_hours_addr; //= 0x13;
const uint8_t delay_minutes_addr; //= 0x14;
const uint8_t delay_seconds_addr; //= 0x15;
} clockmodeValues;
/*
* Parameters for sensor calibration
*/
typedef struct
{
uint16_t wet_val;
const uint8_t wet_addr; //= 0x16;
uint16_t dry_val;
const uint8_t dry_addr; //= 0x18;
} sens_calibValues;
Basically those are values, most of them contained inside structs. I had another case of problems with including a file in another project and both have in common that I'm defining a variable based on a struct (in the other one though, I'm just defining a time variable based on the RTC_TimeTypeDef variable type).
I'd like to know if it's because there are some errors in the code preventing compilation or something else. Thanks for the answer already.
[Edit]: Don't mind the "const" parts in the members of each struct, I took them away since I know they are a problem anyways. Even without them I get errors.
