-
Notifications
You must be signed in to change notification settings - Fork 2k
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
boards/nucleo: share board.h and board.c #8065
boards/nucleo: share board.h and board.c #8065
Conversation
3a836fb
to
5a3233c
Compare
rebased, as #8058 was merged. |
5a3233c
to
74bd1b5
Compare
Looks good. I have no time to test it today. Let's give Murdock a try. |
please also consider #8189 to keep the doc consistent |
yes, will adapt the doc |
great! Merging #8189 (before this one), would be nice, too - but it needs approval, first 😉 |
will take a look later today |
#8189 is merged, can you rebase @haukepetersen ? |
74bd1b5
to
bee0f13
Compare
sorry for the delay: adapted doxygen groups to the changes in #8189 and rebased. |
Looks good for me. I'll test on a subset of boards next week. |
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.
Tested examples/default
on a set of nucleo boards: works for nucleo32-l031, nucleo-l152 (when disabling LSE), nucleo-l476, nucleo32-l432, nucleo-f072, nucleo144-f207, nucleo32-f303, nucleo-f446 and nucleo144-f746. I don't have a nucleo-f103 (I lent it) but except this one I tested all nucleo cpu families.
Otherwise, I think I found an issue with doxygen grouping and there's the problem with the AUTO_INIT_LED0
that doesn't apply to nucleo144 boards.
boards/common/nucleo/board.c
Outdated
*/ | ||
|
||
/** | ||
* @ingroup boards_nucleo |
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.
If I get it right, it should be boards_common_nucleo
|
||
/* initialization of on-board LEDs | ||
* NOTE: LED0 must be explicitly enabled as it is also used for SPI_DEV(0) */ | ||
#ifdef AUTO_INIT_LED0 |
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.
This is only the case for nucleo32 and nucleo64 boards. nucleo144 boards are using different pins for SPI and on-board leds.
Please rebase @haukepetersen |
bee0f13
to
99c847f
Compare
rebased and added a fix to always initialize LED0 for Nucleo144 boards. |
|
||
# select OpenOCD configuration depending on CPU type | ||
ifeq (,$(OPENOCD_CONFIG)) | ||
ifeq ($(CPU),stm32f0) |
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.
how about
export OPENOCD_CONFIG := $(RIOTBOARD)/common/nucleo/dist/$(patsubst stm32%,openocd-%.cfg,$(CPU))
.
And please add an error case, e.g., err out on if $(,$(filter stm32%,$(CPU))
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.
sounds good. Ok if I do it in a separate 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.
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.
ok
e8cc937
to
4f1ce14
Compare
adapted to #8405 |
@kaspar030 @aabadie: you think we could this in soonish? I get tired of maintaining this PR and all of your previous comments should be addressed :-) |
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.
Un-retested ACK. The change of auto init led0 should be ok with nucleo-144.
Thanks for rebasing again btw
Tested on nucleo-f401. ACK. |
finally, thanks a lot for reviewing and testing! |
Based on #8058and cuts out part from #8044As #8044 is getting out of hand, I think it makes sense to split its aspects into separate PRs. This PR does two things:
common/nucleo
andcommon/nucleo64
board.h
(by type, one for 32, 64, and 144) and a single sharedboard.c
fileEspecially the diff of the last commit (
175 additions and 2,293 deletions
) seems to be a good start :-)