2020-10-26 10:08 AM
I built the project using the STM32CubeExpansion_LRWAN_V1.1.2 example, and I want to use the EEPROM function in LoRa Application.
I am trying to declare eeprom related code in a separate file, but the linker cannot import HAL functions.
.\mlm32l07x01\Lora.axf: Error: L6218E: Undefined symbol HAL_FLASHEx_DATAEEPROM_Erase (referred from eeprom.o).
.\mlm32l07x01\Lora.axf: Error: L6218E: Undefined symbol HAL_FLASHEx_DATAEEPROM_Lock (referred from eeprom.o).
.\mlm32l07x01\Lora.axf: Error: L6218E: Undefined symbol HAL_FLASHEx_DATAEEPROM_Program (referred from eeprom.o).
.\mlm32l07x01\Lora.axf: Error: L6218E: Undefined symbol HAL_FLASHEx_DATAEEPROM_Unlock (referred from eeprom.o).
// eeprom.h
#ifndef __USER_EEPROM_H__
#define __USER_EEPROM_H__
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
// #include "stm32l0xx_hal.h"
// #include "stm32l0xx_hal_def.h"
// #include "stm32l0xx_hal_conf.h"
// #include "stm32l0xx_hal_flash.h"
#include "stm32l0xx_hal_flash_ex.h"
#include "tools.h"
#include "tiny_sscanf.h"
// eeprom.c
include "eeprom.h"
Also, if use "include" the hal.h file or other file to use HAL_Delay, the following warring occurs.
Where am I doing stupid things?
..\..\inc\hw_conf.h(93): warning: #47-D: incompatible redefinition of macro "assert_param" (declared at line 312 of "..\..\inc\stm32l0xx_hal_conf.h")
Solved! Go to Solution.
2020-10-26 12:48 PM
Hello @DPark.2
The "Undefined symbol" error means that your application does not include object, source or libraries including this function.
You should review the configuration of your project, and the files included. Make sure that your project contains all the required library source files.
Imen
2020-10-26 12:48 PM
Hello @DPark.2
The "Undefined symbol" error means that your application does not include object, source or libraries including this function.
You should review the configuration of your project, and the files included. Make sure that your project contains all the required library source files.
Imen
2020-10-26 03:26 PM
Generally you do not include individual HAL files, you only include the top-level file, which in this case would be "stm32l0xx_hal.h". That file will include others as needed, as long as your "stm32l0xx_hal_conf.h" file is correctly configured.
2020-10-26 07:30 PM
Thanks for the answer. Since en.i-cube_lrwan_v1.1.2 does not solve well, the latest version, en.i-cube_lrwan_v1.3.1, is in progress.
I think en.i-cube_lrwan_v1.3.1 also includes the stm32l0xx_hal library, but I'm not sure what the problem is. Let me look for more.
2020-10-26 07:31 PM
While including the headers commented out in version 1.2.1 one by one, an error that assert_param was declared redundantly appeared, and I thought that the least error was to include that header file, so I did that. As mentioned in 1.3.1, I only included the _hal.h file.
2020-11-04 10:00 AM
Hi @DPark.2
Do you have still this problem to solve?
Imen
2020-11-26 11:11 PM
Just I use 1.3.1 Library..