-
Notifications
You must be signed in to change notification settings - Fork 255
Adds some missing PEMicro GDB server functionality #989
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
base: master
Are you sure you want to change the base?
Conversation
KGU-SRE
commented
Feb 27, 2024
- fixes pemicro loading of multiple files - current release [1.12.1] erases whole flash for each object/binary file this fixes it so erase only happens once
- adds pemicro preserving of memory ranges
- adds pemicro catching of exceptions
* adds pemicro preserving of memory ranges * adds pemicro catching of exceptions
@KGU-SRE Many thanks for this! It's exactly what I need. Hopefully, this PR gets merged soon. |
@KGU-SRE I have your 1.12.2-pre installed in my VS Code. I've attempted to define a preserved range as follows, but it doesn't seem to be working. Is my configuration correct? Do you have a working launch.json (successfully preserves a flash range) that you could share?
|
here is a sample "pemicro" configuration snippet:
If you use intellisense (ctrl+space) it will also give you the correct syntax |
I just confirmed with the pre-release that the ability to define preserved memory ranges works as expected. |
Can we separate this into two PRs. One for loading/preserving and one for exceptions. Other questions
Finally, are you willing to support the pemicro server interface support in the future? |
@haneefdm Regarding your question about why it's needed -- For those transitioning from NXP's S32 Design Studio, these are features we're used to having available. |
I still think "Why preserve0/1/2 instead of an array of preserves?" is valid. NXP may have done it that way for GUI convenience but doesn't an array make more sense? Waiting on @KGU-SRE to respond. Also, why can't this be done with existing launch.json properties? The changes we make should make sense for the longer term and be coherent with how we support other gdb servers. |
@haneefdm If these PE specific properties did not exist, how would PE users know these capabilities exist and how to use them? |
@haneefdm this structure mirrors the syntax of the raw commands being passed to the GDB server. I like it because it explicitly defines the the whole interface (3 separate named ranges that can be enabled/disabled) in a way that is discover-able via intellisense suggestions. |
I don't like device-specific information creep into what is supposed to be support for a particular probe. I would rather go by the capabilities of the probe rather than one specific device/family from one specific vendor. |
@haneefdm this functionality is probe specific. It just had to be reverse-engineered from the STM32 IDE. |
We had to do that to all the probes we supported to some extent, at least initially. But they eventually co-related with the probe documentation. Reverse engineering should not be our only reference.
The stuff that is in the "Debugger" tab of Eclipse may be probe specific. The other dialog stuff is not. Please point me to the documentation from PEMicro documentation. You can also do |
@haneefdm As a user of these tools, I would say usability of the tool should be right up there as a goal along with code maintainability. Otherwise, few are going to use it. It's not clear if you share that view. Settings up a new dev environment can be (and often is) a long and frustrating experience as it is without building obscurity in as a feature. Please put the development ideology aside and think link a user who is new to all of this and trying to figure it all out. |
I am not going to argue about this anymore. Your idea of usability is different from mine. I care a LOT about usability -- but for all and on balance.
Thanks for the free lecture, but not sure what you are talking about. I am asking questions and instead of answers to help me understand, I am getting lectures. For every probe that needs special attention, we have a (short) Wiki page that describes it. Anyone can edit/create it. If there is zero probe documentation we can refer to, then we have an issue. Adding functionality comes with responsibility. Maybe PEMicro is too proprietary and closed for me to support/add. |
The PEMicro GDB server is only provided by PEMicro for use as part of an eclipse plugin https://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320151 Public documentation of the functionality is only provided of the GUI interface https://www.pemicro.com/downloads/download_file.cfm?download_id=459 For clarity here is the full extent of GDB commands documented publicly in the documentation provided by PEMicro The missing/undocumented functionality was discovered as a part of my personal reverse-engineering efforts. Unfortunately I no longer have access to the probe HW so I am no longer able to provide extra input. If more documentation/development effort is needed someone else needs to provide it. |
Hello, I hope this is the right place to ask a further question for loading multiple files using a PEMicro probe with the cortex-debug extension. I am using a PEMicro Debugger for several years now and currently I am switching from eclipse based development to VS code with your cortex-debug extension. I can't catch up how you did access the PEMicro GDB server with cortex-debug v1.12.1 or v1.12.2 prerelease without having the GDB version restrictions. Furthermore: is there any plan to update the cortex-debug extension as a full release with this feature? Kind regards. |
First, PEMicro needs a maintainer. I can't do it since I don't have any HW and I do not like huge customizations for silicon vendors or proprietary probes with no documentation or support. So, this PR is unlikely to make it into a release. Second, we will not support super old versions of GDB as that will break many aspects of what cortex-debug does. We had big compatibility issues. We moved to version 9+ and not looking back. I am not sure that there is even a dependency between PEMicro and gdb. It may be specific to the Eclipse plugin you were using. Also, it is not that PEMicro uses gdb, it is the other way around gdb is a client of PEMicro's gdb-server. Also, gdb 8.3 is from 2019. I am surprised that PEMicro has not been updated since. |
Ok so at first thank you for the super quick response! I already contacted the PEMicro support due to the old gdb version they are using but to me it seems they don't see a strong necessity of upgrading, as the old version fully fits their needs. Nevertheless they put my request to the development list, so lets see how this develops in the future. As they also mentioned that GDB is generally good at maintaining backwards compatibility, they suggested using just a never version of the arm-none-eabi-gdb with my current gdbserver console. The latest version from the latest toolchain failed when trying to flash my device, but earlier releases (in my case GNU gdb 10.2.90.20210621-git from GNU Arm Embedded Toolchain 10.3-2021.10) works just fine with both the latest version of your extension as well as the pemicro gdb server console. So at this point, thank you for the idea of exchanging this! Finally there is just one question for me: kind regards |