Hi,
I am a beginner in embedded software and am trying to integrate Chibi HAL into a small existing project.
I am reading http://www.chibios.org/dokuwiki/doku.ph ... tion_guide which leads me to an error possibly rooted in a misunderstanding.
The project does not use any OS and it's on an STM32F412CE.
So when I followed the steps from the wiki page, I get errors about missing include files.
Especially
os/hal/include/hal.h cannot find board.h
This strikes me as odd because board.h can only be found in the board-specific headers, which I do not use due to the custom board.
And
os/hal/osal/os-less/ARMCMx/osal.h cannot find cmparams.h and osalconf.h.
Both files are not mentioned in the wiki. Also I cannot find the former and the latter is just there in one of the demos.
Where did I take the wrong turn?
Thanks.
Integrating HAL into existing project
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Integrating HAL into existing project
Hi,
The guide is not very updated, now the OSAL has a configuration file. Take it from ./demos/STM32/HAL-STM32F407-DISCOVERY/cfg and place it in your project.
The file cmparams.h is the wrapper around vendor CMSIS headers, you need to include the one for your device, look into ./os/common/startup/ARMCMx/devices, usually our startup files include this so there is no need to do that explicitly, apparently you are using different startups.
About board.h, you need to create board files for your custom board, initialization is done using those definitions. An explanation is here: https://www.playembedded.org/blog/port- ... -platform/
Another note, there is a known bug in OSAL, please use the HAL code from repository trunk, where the bug is already fixed.
Giovanni
The guide is not very updated, now the OSAL has a configuration file. Take it from ./demos/STM32/HAL-STM32F407-DISCOVERY/cfg and place it in your project.
The file cmparams.h is the wrapper around vendor CMSIS headers, you need to include the one for your device, look into ./os/common/startup/ARMCMx/devices, usually our startup files include this so there is no need to do that explicitly, apparently you are using different startups.
About board.h, you need to create board files for your custom board, initialization is done using those definitions. An explanation is here: https://www.playembedded.org/blog/port- ... -platform/
Another note, there is a known bug in OSAL, please use the HAL code from repository trunk, where the bug is already fixed.
Giovanni
Re: Integrating HAL into existing project
Hi,
thank you for your answer.
Done.
I added os/common/startup/ARMCMx/devices/STM32F4xx to the build system's include dirs.
I will go for this tomorrow.
Done.
Thanks again. I hope I will be successful with the board file.
Cheers
thank you for your answer.
Giovanni wrote:The guide is not very updated, now the OSAL has a configuration file. Take it from ./demos/STM32/HAL-STM32F407-DISCOVERY/cfg and place it in your project.
Done.
Giovanni wrote:The file cmparams.h is the wrapper around vendor CMSIS headers, you need to include the one for your device, look into ./os/common/startup/ARMCMx/devices, usually our startup files include this so there is no need to do that explicitly, apparently you are using different startups.
I added os/common/startup/ARMCMx/devices/STM32F4xx to the build system's include dirs.
Giovanni wrote:About board.h, you need to create board files for your custom board, initialization is done using those definitions. An explanation is here: https://www.playembedded.org/blog/port- ... -platform/
I will go for this tomorrow.
Giovanni wrote:Another note, there is a known bug in OSAL, please use the HAL code from repository trunk, where the bug is already fixed.
Done.
Thanks again. I hope I will be successful with the board file.
Cheers
Who is online
Users browsing this forum: No registered users and 22 guests