-
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-X: enable cpy2remed programmer #18057
Conversation
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.
See inline. Maybe your editor has forcefully broken the line mid-word at 80 chars?
Note that e.g. links often tend to be longer than 80 chars, so just ignore the CI complaining about overlong lines if the line contains a link. If the link is less than 80 chars, you could also have the link on its own line and break the line early.
@maribu thanks for spotting and fixing this issue. I commit all changes. |
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.
Why not move all this copy2remed code in a common place and use some Make magic ?
For example, I'm pretty sure the following would work for all nucleo boards:
index eeed8f95d8..661a81aa8d 100644
--- a/boards/common/nucleo/Makefile.include
+++ b/boards/common/nucleo/Makefile.include
@@ -6,3 +6,9 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
# Setup of programmer and serial is shared between STM32 based boards
include $(RIOTMAKE)/boards/stm32.inc.mk
+
+# variable needed by cpy2remed PROGRAMMER
+# it contains name of ST-Link removable media
+DIR_NAME_AT_REMED = "NODE$(call uppercase,$(subst -,_,$(subst nucleo,,$(BOARD))))"
+
+PROGRAMMERS_SUPPORTED += cpy2remed
In my initial PR (#17550) I first add this at global level but was decided that should be moved to particular boards. |
It seems that in #17550, you were only adding the cpy2remed to the supported programmers at a (too) central level (stm32.inc.mk) and were only setting the directory for nucleo-l552ze-q. |
Ok. I check if suggested solution works for tested Nucleo boards and introduce necessary changes. |
I checked names of nucleo boards and code provided by @aabadie (once again thanks!). It should works for all nucleo boards - two boards have different name and some manual overwrite of DIR_NAME_AT_REMED is needed. I introduce necessary changes for nucleo-l552ze-q and p-nucleo-wb55. I tested it on few boards to which I have access and everything is working. Moreover, I clean previously introduced changes in the Makefile.include files. I have one question, due to fact that this PR adds new programmer not only for mentioned 4 boards but for all nucleo boards should I open a new PR? Or only change this PR title and description to reflect final changes? |
@benpicco can move this PR forward ? |
Of course, please squash! |
105d46e
to
0c2d257
Compare
Final Contribution description
Finally this PR enables cpy2remed programmer (see #17550) to all STM Nucleo boards.
Initial Contribution description
This PR enables cpy2remed programmer (see #17550) to four STM Nucleo boards: l031k8, l073rz, f303k8 and l432kc .
All boards have initially older ST-LINK firmware - the oldest was:
All are updated (without any problems) to minimal firmware which works with cpy2remed programmer - 2.37.36 (V2.J37.M26 - shown in the ST-LinkUpgrade program).
Testing procedure
Go to RIOT/examples/blinky and run command
After a while, green LED (LED0) should start blinking.
Changes in documentaion can be observed using commands:
Issues/PRs references
#17550