Hi,
I committed an example of a multi-device/multi-board project under ./testhal/STM32/USB_CDC.
The project is able to generate binaries for multiple devices/boards. The main Makefile compiles all the sub-makefiles, output goes in multiple ./build_xxx directories. It is possible to build only a single target using the command:
make -f Makefile_xxx
After importing the project in Eclipse, the "Default" configuration builds all targets, there are extra configurations that allow to build/clean specific ones.
New files have been introduced portab.c and portab.h, define target-specific structures and macros in there, the purpose is to isolate non-portable parts from the main application.
Probably all the demos in ./testhal will be ported to the new system in order to reduce the absurd number of projects we have to maintain.
Giovanni
[NEW] Portable multi-device/board ChibiOS applications
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
-
- Posts: 124
- Joined: Tue Jan 10, 2012 8:42 am
- Has thanked: 21 times
- Been thanked: 5 times
Re: [INFO] Portable multi-device/board ChibiOS applications
Hi Giovanni,
great! But is it possible to have a board.h for each configuration? In my Project i use different CPUs but also the same CPU on different boards with different pinning but the same Signals so my LINE_.... definitions are named the same but the board.h maps them to other physical pins.
regards
Tec
great! But is it possible to have a board.h for each configuration? In my Project i use different CPUs but also the same CPU on different boards with different pinning but the same Signals so my LINE_.... definitions are named the same but the board.h maps them to other physical pins.
regards
Tec
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] Portable multi-device/board ChibiOS applications
Hi,
It is possible, just refer a different board file from the various makefiles, if you have multiple custom board files the you could place them in those configuration directories, board files are basically configuration files.
Giovanni
It is possible, just refer a different board file from the various makefiles, if you have multiple custom board files the you could place them in those configuration directories, board files are basically configuration files.
Giovanni
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [INFO] Portable multi-device/board ChibiOS applications
Hi Giovanni, Hi all,
Great this is a cool feature but also useful.
Can this be use for a project where various architectures are combined?
Great this is a cool feature but also useful.
Can this be use for a project where various architectures are combined?
regards,
Theo.
Theo.
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [INFO] Portable multi-device/board ChibiOS applications
Yes it can, I placed it under /STM32 but if you are successful in adding AVR then it could be moved up one level. The problem is that AVR makefiles are not like ours, not sure if it is possible to relocate directories.
Giovanni
Giovanni
Re: [NEW] Portable multi-device/board ChibiOS applications
I find this to be a very useful feature. I have been wondering if I could make my project compile for both AVR and ARM after converting it to run on ChibiOS. I'm looking forward to seeing the example.
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [NEW] Portable multi-device/board ChibiOS applications
Hello Giovanni,
I just added a demo to the multi folder for the stm32f429 discovery board. The demo build just fine but sorry I do not have the hardware with me so I can't make test until this week-end.
Thanks.
I just added a demo to the multi folder for the stm32f429 discovery board. The demo build just fine but sorry I do not have the hardware with me so I can't make test until this week-end.
Thanks.
regards,
Theo.
Theo.
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [NEW] Portable multi-device/board ChibiOS applications
Giovanni,
Adding the demo for the stm32f429 discovery was easy because this board is similar to the other boards supported at the moment.
(All boards have 2 or more debugging Leds).
What about adding a Nucleo board for example the stm32d401re (Only one debugging Led)?
I found that the main.c file must be modify in that case, Is it allow? Or would it be a good idea to make another directory for the nucleos boards ?
That will also help me to know what to do when I will try this feature with the AVR architecture.
Thanks.
Adding the demo for the stm32f429 discovery was easy because this board is similar to the other boards supported at the moment.
(All boards have 2 or more debugging Leds).
What about adding a Nucleo board for example the stm32d401re (Only one debugging Led)?
I found that the main.c file must be modify in that case, Is it allow? Or would it be a good idea to make another directory for the nucleos boards ?
That will also help me to know what to do when I will try this feature with the AVR architecture.
Thanks.
regards,
Theo.
Theo.
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: [NEW] Portable multi-device/board ChibiOS applications
Nucleo can be added to the same project but I would not add too many F4s, better add one device per family or it will get cluttered.
Giovanni
Giovanni
Return to “Development and Feedback”
Who is online
Users browsing this forum: No registered users and 23 guests