I would like to know how do I attach gdbserver to my ARM Base FVP for debugging. All tutorials online explain using DS-5. I would like to use gdb since I am more comfortable with it. I already enabled networking on my FVP.
Thanks for your help!
GDB can be connected to Fast Models (& FVPs) using the extension (plugin) described here: https://developer.arm.com/docs/100964/1110/plug-ins-for-fast-models/gdbremoteconnection. This doesn't get delivered with the Base FVP, but if it's what you are looking for we can see how to deliver. It's a component in the Fast Models deliverable. It's a pretty basic implementation (see the limitations in the document) and we have no plans to enhance the plugin further at this time.
Another way of connecting gdb to the FVP is to add gdbserver to the Linux image running on the model, then run it on the model. It can connect out to a gdb client on the host workstation.
Which of these options are you wanting to use?
Thank you for your reply.
I was trying to get the second option working. I already have an image on the FVP with gdbserver running. However, I am unable to connect to it from my the remote gdb. I am not sure on what parameters to set to target. I can ssh to the FVP successfully but I am not sure why gdb keeps giving me a connection timed out error. What are the proper parameters to give to target?
The first option seems interesting. I already can run gdb on the FVP with the image that I have but the features are very limited. I am using the Linaro LAMP OpenEmbedded image. Is this the same or is this something different?
Thank you very much for your help and support.
Hello, I wrote an older blog on booting a Linux distribution on an FVP, which I believe still applies. See the command options used to enable networking etchttps://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/booting-linux-on-the-armv8-a-model-provided-with-ds-5-ultimate-edition-5-24-and-laterWhen Linux is booted, do you have network access? For example, can you ping any website from the FVP?PS please note there is a dedicated forum for questions related to simulation models:https://community.arm.com/developer/tools-software/f/simulation-models
Thank you for your reply,
Yes, I can ping any website and have networking enabled. I was even able to use wget to download files. Networking works fine, but my issue is hooking the gdb on my host machine to the gdbserver on the FVP.
Thanks for your blog link. I took a look at it and it uses DS-5 to run the FVP. I was hoping to avoid using external software. Are there any advantages of using the DS-5 software?
Thanks for the forum link also. I'll take a look there.
Hi Mohannad,DS-5 (and now Arm Development Studio) are the toolchains from Arm, hence my blog(s) on these products. However for this specific case of application debug, a standard gdb debug connection is used, and so it should work in the same way (though it is not something I personally have looked into). Is you set the IP address of the target in gdb as localhost, are you able to connect?RegardsRonan
I finally got it to work! It was a silly mistake from my end. Thanks to your blog, I noticed the bp.hostbridge.userNetPorts parameter in my script did not include an extra port for connecting the gdb server. It only had the ssh port. I am able to hook to it successfully now. I am so frustrated I never noticed this earlier!
Thank you very much for your help!
I also use GDBRemoteConnection.so. When I connect gdbserver I set breakpoint but it can't stop it.
cmd1: FVP_BaseR_AEMv8R -f cfg.txt -a startup_Cortex-R52.axf -D --plugin GDBRemoteConnection.so
cmd2：arm-none-eabi-gdb -tui ~/eagle/test/startup_Cortex-R52.axf