Separate path variables for *conf.h files Topic is solved

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Separate path variables for *conf.h files  Topic is solved

Postby faisal » Wed Nov 07, 2018 1:42 am

I'm currently integrating ChibiOS into another framework, and it is evident that I need separate configuration paths for where to find chconf.h, halconf.h, and mcuconf.h . It makes sense too from a Chibi product offering standpoint since the OS and HAL are separate modules.

Currently the makefiles (rt.mk, hal.mk, and platform.mk) assume that the related ch/hal/mcuconf.h are in a single directory $CONFDIR . It would be good to have those makefile reference CHCONFDIR, HALCONFDIR, and MCUCONFDIF. The user's project makefile may set all of them to be the same if they want - but it allows for greater flexibility in those projects where ChibiOS is part of a larger system.

User avatar
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: Separate path variables for *conf.h files

Postby Giovanni » Wed Nov 07, 2018 8:35 am

It looks like a good idea, I need to make it in a way that does not require updating all makefiles. Maybe checking first XXXCONFDIR then CONFDIR in the .mk files.

Giovanni

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: Separate path variables for *conf.h files

Postby faisal » Wed Nov 07, 2018 2:10 pm

Giovanni wrote:It looks like a good idea, I need to make it in a way that does not require updating all makefiles. Maybe checking first XXXCONFDIR then CONFDIR in the .mk files.

Giovanni


A mass update of the makefiles should be easy. If a CONFDIR is defined, just define the XXXCONFDIRs pointing to the same path. A search and replace would do it. Any other reason for not wanting to update makefiles?

User avatar
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: Separate path variables for *conf.h files

Postby Giovanni » Wed Nov 07, 2018 2:14 pm

Demos put all configuration files in the same directory, so it is convenient to still support the generic CONFDIR.

Giovanni

User avatar
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: Separate path variables for *conf.h files

Postby Giovanni » Sat Jan 05, 2019 4:52 pm

Hi,

Now it is possible to define CHCONFDIR, HALCONFDIR or simply CONFDIR (in smart mode of course). Note that mcuconf.h files have to go with HALCONFDIR because LLDs are not a separate thing.

Giovanni


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 44 guests