2021-02-09 06:27 AM
I am designing a sensor board from scratch. It will be similar to evaluation board ..\STM32Cube\Repository\STM32Cube_FW_L4_V1.16.0\Projects\B-L475E-IOT01A.
I have tried example projects, they work great. Since ST do not have .ioc files for the this board, I do not know what IDE was used and how the codes were generated with correct configuration and correct driver files in the correct directory structure.
I tried recreating a project with this board (using CubeMX ) and adding one component only from
It created the project with this structure
It builds without any errors. So far so good.
Now I want to copy just one function from the example such as
while (1)
{
Temperature_Test();
}
This code will look for the associated driver files, API and other supporting configuration codes.
Can someone guide me or show me a procedure to identify the files with their locations and copy them to relevant directory and also paste the codes (with any changes if necessary) so that it will be compatible and will build without errors.
I have tried doing this, but encountered too many errors. I do not want to start debugging as the codes are from a working example for the same board. My understanding is it is more of configuration issue and adding missing driver files. Copying drivers files similar to the example project did not work, I think there is more to that than just copy.
Regards
Shaun
Solved! Go to Solution.
2021-02-12 05:27 AM
Hi @Shaun.t ,
A step by step tutorial is provided in STM32 MCUs Wiki at this page.
It describes how to build your own example to collect measurements using the sensors available on B-L475E-IOT01A board.
You will find there a precision about the files that are required and where to copy then use them.
-Amel
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.
2021-02-09 11:24 AM
Not my circus..
Make sure all the modules you want are pulled via stm32l4xx_hal_conf.h, and selectively enabled.
If the project directory, or sub-directory contains a copy/subset of the library files, pull them from the repository tree
..\Repository\STM32Cube_FW_L4_V1.14.0\Drivers\STM32L4xx_HAL_Driver\Src
..\Repository\STM32Cube_FW_L4_V1.14.0\Drivers\STM32L4xx_HAL_Driver\Inc
Most top level CubeMX code is boiler-plate, a lot of the meat is in stm32L4xx_hal_msp.c deals with peripheral and pin level configuration.
Use merge tools (ie AxMerge, WinMerge) to understand how different projects initialize things, and where the details are buried.
2021-02-12 05:27 AM
Hi @Shaun.t ,
A step by step tutorial is provided in STM32 MCUs Wiki at this page.
It describes how to build your own example to collect measurements using the sensors available on B-L475E-IOT01A board.
You will find there a precision about the files that are required and where to copy then use them.
-Amel
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.
2021-02-13 07:56 PM
Hi Amel,
That's a great news! I will try it out.
thank you
Regards
Shaun