Not sure whether this is a bug or a 'feature'.
Using Chibistudio V17
With the configuration files for the (single) current hardware in a directory off the project directory, edit the .chcfg file and generate the board files.
The board files are put in the correct place (i.e. one directory level up from the .chcfg file)
However the paths in the make file assume a directory off os/hal/boards/. They should pick up the current directory of the board files.
Even better would be for the board make file to calculate the paths at make-time, so that the board files could be moved around without changes.
There's a possible solution for this at the end of the first post here
Board file generation paths Topic is solved
- 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: Board file generation paths
Hi,
The path is one of the options in the .chcfg file, by default it is .. but it can be changed.
Giovanni
The path is one of the options in the .chcfg file, by default it is .. but it can be changed.
Giovanni
Re: Board file generation paths
Slight misunderstanding here, possibly.
There's no problem with the path where the board files are actually stored - '..' is fine.
The problem is with the content of the make file. It appears that the paths for the include and source directories are hard-coded assuming the board file is stored within the os/hal/boards tree. So they're wrong if the board files are stored somewhere else (e.g. within the project directory).
There's no problem with the path where the board files are actually stored - '..' is fine.
The problem is with the content of the make file. It appears that the paths for the include and source directories are hard-coded assuming the board file is stored within the os/hal/boards tree. So they're wrong if the board files are stored somewhere else (e.g. within the project directory).
- 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: Board file generation paths
Ah, you meant the paths in the board.mk file. That would require another attribute in the XML which is not so immediate because we would have to update all board files or do tricks intemplates if the new attribute is not present.
Giovanni
Giovanni
Re: Board file generation paths
I think it would be possible to cover a number of likely use cases with just some fairly simple coding in the generation script. I'm thinking along the lines of looking at the full path for storing the generated board files:
1. If it includes the string 'os/hal/boards' it's the standard Chibi path.
2. If it includes the string for the environment variable PROJECT_LOC give the files a project-based path
3. If it includes the string for the environment variable WORKSPACE_LOC give the files a workspace-based path
4. Otherwise, two possible options:
a) Default to the standard Chibi path
b) Insert an absolute path
This would certainly be easier than modifying all the templates! And in most cases the board files would probably be portable.
1. If it includes the string 'os/hal/boards' it's the standard Chibi path.
2. If it includes the string for the environment variable PROJECT_LOC give the files a project-based path
3. If it includes the string for the environment variable WORKSPACE_LOC give the files a workspace-based path
4. Otherwise, two possible options:
a) Default to the standard Chibi path
b) Insert an absolute path
This would certainly be easier than modifying all the templates! And in most cases the board files would probably be portable.
- 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: Board file generation paths
Hi,
I added the new option in the latest ChibiStudio (plugins 2.5.0). You can add a new element under the "configuration" element and override the default path written in board.h.
Giovanni
I added the new option in the latest ChibiStudio (plugins 2.5.0). You can add a new element under the "configuration" element and override the default path written in board.h.
Giovanni
Re: Board file generation paths
Can you modify the templates in gencfg/xml which show all the possible tags - so that they are *true* templates which we can use for new projects. For example, I am using <board_files_path> and had to manually figure out that the .ftl files support that tag.
Who is online
Users browsing this forum: No registered users and 71 guests