2023-01-10 11:34 PM
Hello STM,
currently, I am confirming the AN4636 document
This document is about LC sensor.
My require is as follows,
I want to know how to use the firmware provided.
I am currently trying to use the firmware provided using stm32cubeMX or stm32cubeIDE, but it does not work.
I am testing with a nucleoboard based on the stm32L4xx series, and I have tried many times to use the provided firmware 'STM32CubeExpansion-LC-Sensor-L4-V1.0.0'
but I found it impossible.
I want to know what kind of environment I need to configure to use this firmware.
Thanks
2023-01-13 01:36 AM
Hello @MinHyukKim and welcome to the Community :smiling_face_with_smiling_eyes:
After downloading the firmware in question from here
You can either use stm32CubeIDE by following this path :
X-CUBE-CSENSOR_V2.0.0\STM32CubeExpansion_LC_Sensor_L4_V1.0.0\Projects\STM32L476RG-Nucleo\SW4STM32\AN4636_STM32L476RG
Or you can use IAR workbench by following this path :
X-CUBE-CSENSOR_V2.0.0\STM32CubeExpansion_LC_Sensor_L4_V1.0.0\Projects\STM32L476RG-Nucleo\EWARM
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-01-15 04:12 PM
Hi, Sarra
Thanks you for your reply
I replied using my company email. If you didn't receive the mail, it could be occurred a security problem by the attached file. If so, please reply to me again.
The contents I sent through the company email are as follows.
________________________________________________________________________
Hi Sarra
Thank you for your reply.
I already imported the project you suggested from stm-32-CUbe-IDE and tested it and confirmed that it was not being built.
-------------------------------------------------------------------------------------------------------------------------
arm-none-eabi-gcc "D:/stm32/en.x-cube-lcsensor-v2-0-0/X-CUBE-LCSENSOR_V2.0.0/STM32CubeExpansion_LC_Sensor_L4_V1.0.0/Libraries/STM32L4xx_Driver/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c" -mcpu=cortex-m4 -std=c99 -g3 '-D__weak=__attribute__((weak))' '-D__packed=__attribute__((__packed__))' -DUSE_HAL_DRIVER -DSTM32L476xx -DUSE_STM32L4XX_NUCLEO -c -IROJ_DIR../../../../Inc -IROJ_DIR../../../../../../Libraries/STM32L4xx_Driver/STM32L4xx_HAL_Driver/Inc -IROJ_DIR../../../../../../Libraries/STM32L4xx_Driver/STM32L4xx_HAL_Driver/Inc/Legacy -IROJ_DIR../../../../../../Libraries/STM32L4xx_Driver/CMSIS/Device/ST/STM32L4xx/Include -IROJ_DIR../../../../../../Libraries/STM32L4xx_Driver/CMSIS/Include -IROJ_DIR../../../../../../Libraries/STM32L4xx_Driver/BSP/STM32L4xx_Nucleo -O3 -ffunction-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32L4xx_HAL_Driver/stm32l4xx_hal.d" -MT"Drivers/STM32L4xx_HAL_Driver/stm32l4xx_hal.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32L4xx_HAL_Driver/stm32l4xx_hal.o"
D:/stm32/en.x-cube-lcsensor-v2-0-0/X-CUBE-LCSENSOR_V2.0.0/STM32CubeExpansion_LC_Sensor_L4_V1.0.0/Libraries/STM32L4xx_Driver/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:54:10: fatal error: stm32l4xx_hal.h: No such file or directory
#include "stm32l4xx_hal.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Drivers/STM32L4xx_HAL_Driver/subdir.mk:84: Drivers/STM32L4xx_HAL_Driver/stm32l4xx_hal.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
08:46:22 Build Failed. 2 errors, 0 warnings. (took 2s.677ms)
---------------------------------------------------------------------------------------------------------------------------------------
By default, the header of the hal-driver is not referenced.
Also, because of this problem, I have created a blank project and implanted AN4636 example.
As a result, it can be built, but when I ran it in debug mode, I found that it stopped in an infinite loop in the first-cal part.
I will attach the project I made, so please check it.
** When I created this project, I didn't use cubemx and implemented it only with code.
Thanks.