Dear all,
After a long time, I came back to embedded development/Chibios.
I opened again the old code of my old project, and I wanted to port it from Chibios 2.4.3 to Chibios 20.3.
I was aware of the changes, particularly during the transition to Chibios 3 (if I'm not wrong), that changed some names in some os functions.
However, I see that in the 20.3 no demo nor test has a board.h inside (correct me if I'm wrong).
Previously, I used the board.h file to set the pin mode and function, now it seems to be only found in the os/hal/boards/ folder.
Is this a design choice? The appropriate way to setup the board is by using the PAL driver functionality? Or I should still create a board.h and use that?
Sorry if the question are a bit outdated, but my last chibios project was quite old... and I wasn't able to find a solution online.
Information about chibios 20
Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess
- Boris_il_forte
- Posts: 11
- Joined: Mon Sep 17, 2012 10:40 am
- Location: Darmstadt, Germany
- Contact:
- 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: Information about chibios 20
Hi,
Board files are still there pretty much unchanged, look at the inclusion in makefiles.
BTW most changes happened during the transition to RT3, you are correct. If you see differences just ask for details.
Giovanni
Board files are still there pretty much unchanged, look at the inclusion in makefiles.
BTW most changes happened during the transition to RT3, you are correct. If you see differences just ask for details.
Giovanni
- Boris_il_forte
- Posts: 11
- Joined: Mon Sep 17, 2012 10:40 am
- Location: Darmstadt, Germany
- Contact:
Re: Information about chibios 20
Ok, I managed to generate my new board file using the board.chcfg file of the STM32f4_DISCOVERY.
I've also seen that there is a board.fmpp, if I understand correctly is used to generate the chcfg file... But I didn't understand how to do it.
Where can I find reference guide for chibistudio? In the site is "work in progress" and I would like to use chibios/chibistudio "as is supposed to be used" and not "as I'm able to use it".
Indeed, even if I'm able to use the board.h/.c generated, I still had some difficulties: indeed the generated makefile contains this two lines:
# List of all the board related files.
BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.c
# Required include directories
BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY
Given that I left the board with the same name of the original file, I had the original board.h compiled instead of the new one, causing me some troubles.
So, the idea is to put all the new boards inside the boards folder of chibios? or how is it supposed to be used? I'm missing something?
Sorry for the stupid questions, but I wasn't able to find an answer online.
I've also seen that there is a board.fmpp, if I understand correctly is used to generate the chcfg file... But I didn't understand how to do it.
Where can I find reference guide for chibistudio? In the site is "work in progress" and I would like to use chibios/chibistudio "as is supposed to be used" and not "as I'm able to use it".
Indeed, even if I'm able to use the board.h/.c generated, I still had some difficulties: indeed the generated makefile contains this two lines:
# List of all the board related files.
BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.c
# Required include directories
BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY
Given that I left the board with the same name of the original file, I had the original board.h compiled instead of the new one, causing me some troubles.
So, the idea is to put all the new boards inside the boards folder of chibios? or how is it supposed to be used? I'm missing something?
Sorry for the stupid questions, but I wasn't able to find an answer online.
- 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: Information about chibios 20
Hi,
A good place for a custom board is inside your project, create a ./board directory in it and change the makefile to point there.
Giovanni
A good place for a custom board is inside your project, create a ./board directory in it and change the makefile to point there.
Giovanni
Re: Information about chibios 20
A good way to handle boards would be to have the makefile just do:
#BOARD=$(CHIBIOS).../boards/STM32Nucleo072
BOARD=./board
and that the standard 'rules" include at the end of the make file would do:
include $(BOARD)/board.mk
or not even that: All of those just add the board.c file and make the board.h find-able, so those are redundant.... So my proposal would be that a board directory simply has board.h and board.c and that after pointing the BOARD or BOARD_DIR variable at the right one, the rules.mk does the rest.
I am also a big fan of distributing chibios with "minimal" board files that just specify the CPU and then nothing for pre-configuring LEDS as outputs etc etc: All pins just inputs. That would then be a good base for building something for a custom board for.
#BOARD=$(CHIBIOS).../boards/STM32Nucleo072
BOARD=./board
and that the standard 'rules" include at the end of the make file would do:
include $(BOARD)/board.mk
or not even that: All of those just add the board.c file and make the board.h find-able, so those are redundant.... So my proposal would be that a board directory simply has board.h and board.c and that after pointing the BOARD or BOARD_DIR variable at the right one, the rules.mk does the rest.
I am also a big fan of distributing chibios with "minimal" board files that just specify the CPU and then nothing for pre-configuring LEDS as outputs etc etc: All pins just inputs. That would then be a good base for building something for a custom board for.
Who is online
Users browsing this forum: No registered users and 29 guests