Hi,
I would like to run ChibiOS on this Nucleo Board for beginning while my board is on its way of fabrication and assembly. However, there is no support for this board in the repository yet.
What would be the best way of creating board.c and board.h for the ChibiOS? I hope there is some tool for that and I don't need to type in every single string similar to the ones in the repository.
Is there a way to use STM32 CubeMX for creating these files?
Thanks
ChibiOS & Nucleo L152RE Board
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS & Nucleo L152RE Board
Hi,
That board is supported in both 2.6.6 and 3.0.0.
Board files are generated not hand written, ChibiStudio includes a generator utility:
1) Edit the .chcfg file inside the board directory using the Eclipse XML editor.
2) Select the .chcfg file in the project explorer.
3) A button appears in the toolbar that updates the files.
You can also create your own board files not just modify the existing ones.
If you are expert of XML transformations you may try to convert the Cube XML file into the .chcfg XML format then generate the files.
Giovanni
That board is supported in both 2.6.6 and 3.0.0.
Board files are generated not hand written, ChibiStudio includes a generator utility:
1) Edit the .chcfg file inside the board directory using the Eclipse XML editor.
2) Select the .chcfg file in the project explorer.
3) A button appears in the toolbar that updates the files.
You can also create your own board files not just modify the existing ones.
If you are expert of XML transformations you may try to convert the Cube XML file into the .chcfg XML format then generate the files.
Giovanni
Re: ChibiOS & Nucleo L152RE Board
Oh, great!!!
I'm using EM::Blocks. Its author made ChibiOS support and prepared example with version 2.6.3
I will try 2.6.6 and hopefully will get success
Will report the result here.
When 3.0.0 expected to be available?
Yes, I kind of figured out that ChibiStudio should have some tools for that. Thanks for clearing this.
Unfortunately I never worked with XML yet. So, XML transformation is probably a long way for me. Would it be possible to include such transformation into ChibiStudio? Or direct support of CubeMX files in the new version of ChibiOS?
I'm using EM::Blocks. Its author made ChibiOS support and prepared example with version 2.6.3
I will try 2.6.6 and hopefully will get success
When 3.0.0 expected to be available?
Yes, I kind of figured out that ChibiStudio should have some tools for that. Thanks for clearing this.
Unfortunately I never worked with XML yet. So, XML transformation is probably a long way for me. Would it be possible to include such transformation into ChibiStudio? Or direct support of CubeMX files in the new version of ChibiOS?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS & Nucleo L152RE Board
It is possible such a tool will be included. The version 3.0 is only available on the repository OR by downloading ChibiStudio 8, it is virtually ready but I haven't decided an official release date yet.
Giovanni
Giovanni
Re: ChibiOS & Nucleo L152RE Board
CubeMX is a code generator, and generates ST's standard libs.
Chibios does not use ST's standard libs or there new HAL, Chibios has its own HAL and drivers for all the perhiphals.

Chibios does not use ST's standard libs or there new HAL, Chibios has its own HAL and drivers for all the perhiphals.
Re: ChibiOS & Nucleo L152RE Board
Attached file is project for EM::Blocks with a simple program under ChibiOS 2.6.6.
it is based on simple project by author of emblocks that he placed in download area of emblocks.org (also attached to this posting)
Giovanni,
Emblocks uses assembler startup file. Generating any project in EMBlocks also creates such file, but looks like ChibiOS does not need it. Why is that? Does your system creates its own startup procedure?
It is quite important question, because CubeMX creates it's own startup module written with Assembler. And this file is different from the emblocks startup. I was able to merge CubeMX generated C files with C files by EMblocks, but get in stuck with Assembler. I believe you might get the same problem when you try to merge CubeMX files with ChibiOS. I hope you are more experienced in solving such problems.
May be you could contact emblocks author and you could combine your efforts in support ChibiOS in his IDE. I mean his IDE could generate a project directly by using your system files. May be synchronize libraries and headers... With both yours great products it will be like a bomb
it is based on simple project by author of emblocks that he placed in download area of emblocks.org (also attached to this posting)
Giovanni,
Emblocks uses assembler startup file. Generating any project in EMBlocks also creates such file, but looks like ChibiOS does not need it. Why is that? Does your system creates its own startup procedure?
It is quite important question, because CubeMX creates it's own startup module written with Assembler. And this file is different from the emblocks startup. I was able to merge CubeMX generated C files with C files by EMblocks, but get in stuck with Assembler. I believe you might get the same problem when you try to merge CubeMX files with ChibiOS. I hope you are more experienced in solving such problems.
May be you could contact emblocks author and you could combine your efforts in support ChibiOS in his IDE. I mean his IDE could generate a project directly by using your system files. May be synchronize libraries and headers... With both yours great products it will be like a bomb
- Attachments
-
- ChibiOS_F429.7z
- Original emblocks project for ChibiOS 2.6.3
- (909.67 KiB) Downloaded 355 times
-
- ChibiOS_EMBlocks_Blinky.7z
- ChibiOS 2.6.6/EMBlock 2.30/Blinky project
- (886.07 KiB) Downloaded 381 times
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS & Nucleo L152RE Board
Hi,
Other startup files can be used as long some requirements are satisfied ad documented, basically:
- Dual stack setup.
- Privileged mode on entry.
- Interrupts disabled on entry.
- FPU initialization when required.
There are a lot of details in there and usually some random startup code does not consider all the needs, this is why we provide our startups and recommend their use over compiler/IDE-provided ones.
CubeMX can be used using ChibiOS startup files, there are no special requirements.
I know that ChibiOS has been integrated into Em::Blocks, I imagine they solved those kind of integration problems already because I imagine they would have told me in case of issues.
Giovanni
Other startup files can be used as long some requirements are satisfied ad documented, basically:
- Dual stack setup.
- Privileged mode on entry.
- Interrupts disabled on entry.
- FPU initialization when required.
There are a lot of details in there and usually some random startup code does not consider all the needs, this is why we provide our startups and recommend their use over compiler/IDE-provided ones.
CubeMX can be used using ChibiOS startup files, there are no special requirements.
I know that ChibiOS has been integrated into Em::Blocks, I imagine they solved those kind of integration problems already because I imagine they would have told me in case of issues.
Giovanni
Re: ChibiOS & Nucleo L152RE Board
Giovanni,
one more question for now.
CubeMX uses HAL drivers. ChibiOS has its own pal drivers that described as compatible to HAL.
Should I add HAL drivers library by STM to the project, or ChibiOS has it's own HAL drivers library which is fully compatible with STM's one?
one more question for now.
CubeMX uses HAL drivers. ChibiOS has its own pal drivers that described as compatible to HAL.
Should I add HAL drivers library by STM to the project, or ChibiOS has it's own HAL drivers library which is fully compatible with STM's one?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: ChibiOS & Nucleo L152RE Board
Hi,
The ChibiOS HAL is not related to the CubeMX HAL in any way, you have to choose which one to use in your project.
Giovanni
The ChibiOS HAL is not related to the CubeMX HAL in any way, you have to choose which one to use in your project.
Giovanni