2024-02-07 06:27 AM
Dear Experts,
I'm currently working on a project involving an STM32 board (B-U585I-IOT02A). I would like to use this board as a TCP Server. Therefore, from the STM32CUBEIDE application, I had observed that there is an example project in which it is possible to render this board as a TCP Server (Nx_TCP_Echo_Server). However, my problem was that it only returns the value returned by the TCP Client. So, I wanted to modify this program so as to be able to retrieve the temperature parameters. So, I created a program based on an example (https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Step4_Sensors_usage). I wanted to combine these two programs to retrieve the temperature data.
To sum up, the diagram is as follows:
Unfortunately, I've encountered errors in the program's implementation. It gives me the following errors:
The project architecture is as follows:
What I've noticed is that when I access the function where the error occurs (e.g. HAL_I2C_GetState), I'm able to access the .c file, as shown in the following image:
Other modifications include:
I don't really understand why I'm getting these errors, because when I ctrl + click on the function with the error, it opens the .c file with the appropriate function.
Would it be possible to help me solve this error?
Thanks for your help,
Nicolas Gnanalingam
Solved! Go to Solution.
2024-02-07 07:32 AM
In project settings -> C/C++ General -> Paths and Symbols -> Source Location, ensure that the HAL library source code file path is in there.
When you compile the project, ensure stm32_*_i2c.c is being compiled.
In your *_hal_conf.h file, ensure the I2C module is being enabled.
2024-02-07 06:52 AM - edited 2024-02-07 06:53 AM
I'm afraid your Project screenshot is too low-resolution to read.
It's best to post the build output as for source code: using the </> button - not as screenshots:
2024-02-07 07:32 AM
In project settings -> C/C++ General -> Paths and Symbols -> Source Location, ensure that the HAL library source code file path is in there.
When you compile the project, ensure stm32_*_i2c.c is being compiled.
In your *_hal_conf.h file, ensure the I2C module is being enabled.