Skip to content
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/frdm: remove exporting unset OPENOCD_EXTRA_INIT #12289

Conversation

cladmi
Copy link
Contributor

@cladmi cladmi commented Sep 23, 2019

Contribution description

Remove exporting the unset OPENOCD_EXTRA_INIT
The default value in openocd.sh is being empty, so no use for exporting it.

Testing procedure

The first match shows the default value is empty.
And there is no definition of OPENOCD_EXTRA_INIT in the frdm boards (and not in RIOT in general).

git grep -C 1 OPENOCD_EXTRA_INIT
git grep -C 1 OPENOCD_EXTRA_INIT
dist/tools/openocd/openocd.sh-# Extra board initialization commands to pass to OpenOCD
dist/tools/openocd/openocd.sh:: ${OPENOCD_EXTRA_INIT:=}
dist/tools/openocd/openocd.sh-# Debugger interface initialization commands to pass to OpenOCD
--
dist/tools/openocd/openocd.sh-            -f '${OPENOCD_CONFIG}' \
dist/tools/openocd/openocd.sh:            ${OPENOCD_EXTRA_INIT} \
dist/tools/openocd/openocd.sh-            ${OPENOCD_EXTRA_RESET_INIT} \
--
dist/tools/openocd/openocd.sh-            -f '${OPENOCD_CONFIG}' \
dist/tools/openocd/openocd.sh:            ${OPENOCD_EXTRA_INIT} \
dist/tools/openocd/openocd.sh-            -c 'tcl_port ${TCL_PORT}' \
--
dist/tools/openocd/openocd.sh-            -f '${OPENOCD_CONFIG}' \
dist/tools/openocd/openocd.sh:            ${OPENOCD_EXTRA_INIT} \
dist/tools/openocd/openocd.sh-            -c 'tcl_port ${TCL_PORT}' \
--
dist/tools/openocd/openocd.sh-            -f '${OPENOCD_CONFIG}' \
dist/tools/openocd/openocd.sh:            ${OPENOCD_EXTRA_INIT} \
dist/tools/openocd/openocd.sh-            ${OPENOCD_EXTRA_RESET_INIT} \

Issues/PRs references

Found after cleaning #12151

The default value in `openocd.sh` is being empty, so no use for exporting it.
@fjmolinas fjmolinas added Area: build system Area: Build system Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Sep 23, 2019
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes make sense, I verified there is no usage for OPENOCD_EXTRA_INIT. ACK

@fjmolinas fjmolinas merged commit 2346f35 into RIOT-OS:master Sep 23, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Sep 23, 2019

Thank you for the review.

@cladmi cladmi deleted the pr/frdm/minor/remove_export_openocd_extra_init branch September 23, 2019 13:29
@cladmi
Copy link
Contributor Author

cladmi commented Sep 23, 2019

I first was thinking about completely removing OPENOCD_EXTRA_INIT, but I do not know if there is not a use case. So better keep it for the moment.

@fjmolinas
Copy link
Contributor

I first was thinking about completely removing OPENOCD_EXTRA_INIT, but I do not know if there is not a use case. So better keep it for the moment.

I Think its useful even if never assigned a variable. You can easily test command variation by assigning a value to OPENOCD_EXTRA_INIT when calling make.

@cladmi
Copy link
Contributor Author

cladmi commented Sep 23, 2019

That is a good use case.

@kb2ma kb2ma added this to the Release 2019.10 milestone Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants