-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] clarify "customization" section of BSP page #286
Conversation
- Break one step into two, and clarify the wording of the first half - Correct path to copy files from: there isn't an extra path segment after the "board" directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is clearer!
Ya know... I think this needs more steps. Because if you follow it as stated, due to #285, you get this:
|
I need to go get some sleep. |
2. In your `project.xml` remove the board config inheritance (`<extends>`) and | ||
1. Generate the BSP closest to your custom hardware (using `lbuild build`). | ||
2. Copy the files from `modm/src/modm/board` to your own project and modify them. | ||
3. In your `project.xml` remove the board config inheritance (`<extends>`) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also clarify this while we're at it... if I figure out what it means I'll update the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're using a custom board config, you cannot extend the modm config anymore, or there would be conflicts. Technically you now need to manually merge the board.xml
into your project.xml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then obviously modify the config to your needs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The part I'm unsure about is "copy the pre-defined options into your own config". I clearly need to copy in the module dependencies, but then now I presumably need to do something to replace:
env.collect(":build:openocd.source", "board/stm32f429discovery.cfg"); |
And I am not sure what that is yet.
And then I need a target
option set, which is listed in another repo (e.g. here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that depends on your board. There's probably no predefined openoce config, you'll need to provide your own (see https://modm.io/reference/module/modm-build/#openocdsource).
You can also lbuild discover -n :target
for the target, but you should already know the identifier.
I'm using my own custom BSP copied over from modm with some added quality-of-life stuff like logging and fault handler included in BSP and several assumptions on board usage. |
This has been clarified in the new guide: https://modm.io/guide/custom-project/#using-a-board-support-package |
Minor updates. I did make a change to the actual meaning of the instructions by changing a path, so please make sure I didn't make a mistake. I see: