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

Remove CMake targets specific to the debugging environment #801

Merged
merged 1 commit into from
Sep 17, 2022

Conversation

JF002
Copy link
Collaborator

@JF002 JF002 commented Oct 31, 2021

Remove CMake targets that allowed to flash the firmware and erase the flash memory of the CPU.

These targets were enabled/disabled by CLI parameters USE_JLINK, USE_GDB_CLIENT and USE_OPENOCD.

These targets were not easily portable on every developers setups, were mostly confusing (you had to enable the openocd mode if you didn't want to use any of the other possibility), and I think very few people actually used them.

I think the CMake project files should only focus on building the project. Other things like accessing the hardware, configure the debugger, flash the firmware, erase the memory,.. should not be part of the project as it'll most probably differ from one developer to another.

Copy link
Collaborator

@Avamander Avamander left a comment

Choose a reason for hiding this comment

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

Great. I thought about doing the same at one point, but people used it extensively.

@evergreen22
Copy link
Contributor

Agreed because as stated "These targets were not easily portable...". It should be fairly easy to build the project to encourage participation. Folks using hardware debuggers to flash and test can (and should) look at the documentation on these topics.

@kieranc
Copy link
Contributor

kieranc commented Nov 2, 2021

Hmm. Well I used them and found them useful. I guess I can figure out a different approach.

@JF002
Copy link
Collaborator Author

JF002 commented Nov 2, 2021

Hmm. Well I used them and found them useful. I guess I can figure out a different approach.

Interesting! What config do you use (jlink, openocd, gbd)? I can add instructions in the doc if they are missing!

@Riksu9000
Copy link
Contributor

While I only use DFU, I think these targets could be convenient and lower the barrier to entry. I would probably use them if I had a devkit. I think instead of USE_JLINK, USE_GDB_CLIENT and USE_OPENOCD, all the targets could always be enabled, but with different names like jlink_flash, jlink_erase etc.

@geekbozu
Copy link
Member

geekbozu commented Nov 3, 2021

I would like to see these removed from the cmake as well. Let the cmake focus on getting a build. Leave the flashing to the other tools/user setup available.
@kieranc we can totally work on getting documentation setup so you can continue to work without them and understand the tools instead of this black box!

@JF002
Copy link
Collaborator Author

JF002 commented Dec 12, 2021

Hmm. Well I used them and found them useful. I guess I can figure out a different approach.

@kieranc Have you already found a new approach to build the project? If not, what would you need to be able to work without those targets? Documentation? Examples? Scripts? IDE support?

@kieranc
Copy link
Contributor

kieranc commented Dec 12, 2021

Don't worry about me, if the consensus is that this is a good move then I don't want to hold you back, I will certainly figure out a solution once I do wired programming again, and document it!

@JF002
Copy link
Collaborator Author

JF002 commented Dec 12, 2021

You're probably not the only one to use those targets. If I can do anything to help them too, that would be nice :)

@StarGate01
Copy link
Contributor

In response to #1051 (comment) :

Personally, I do not use any of these targets. I invoke nrfjprog manually or via scripts (see https://github.com/StarGate01/p8b-infinitime/tree/master/scripts ). I can see how the targets might be appealing to newcomers, but I felt rather restricted by the somewhat cumbersome CMake configuration.

@Riksu9000 Riksu9000 mentioned this pull request Jul 13, 2022
@Riksu9000
Copy link
Contributor

Since merging #1236 I'm fine with removing these, as I believe it's now easy enough to find the instructions.

@JF002 JF002 added this to the 1.11.0 milestone Jul 28, 2022
@JF002 JF002 self-assigned this Jul 28, 2022
…c to the debugging environment (USE_JLINK, USE_OPENOCD and USE_GDB_CLIENT).
@JF002 JF002 force-pushed the remove-cmake-targets branch from e65aeac to 8105957 Compare September 17, 2022 19:19
@JF002 JF002 merged commit 6ed8e98 into develop Sep 17, 2022
@Avamander Avamander deleted the remove-cmake-targets branch September 27, 2022 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants