I followed the steps on how to load and debug application on Cortex-M.
On my Ubuntu 22.04 VM I downloaded exactly the same toolchain gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz but the problem is that ./arm-none-eabi-gdb --version
returns ./arm-none-eabi-gdb: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory
Following that topic you can find the “solution”
Thank you for pointing out the issues around python incompatibility.
For Ubuntu 20.04, Python 3.6 could be installed through the PPA route as mentioned in 5842 – arm-none-eabi-gdb 11.2 doesn't start on Ubuntu 20.04 host, however, this might not work for Ubuntu 22.04.
For the next release, we are working on updating the version of Python that is used in GDB, so that there will be better compatibility for the newer linux distros. Following on from that, we do want to take a look at other approaches, such as the two binary approach or static linking approach, to improve on the compatibility.
Yes, it was me. This issue is related to a python library unavailable on Ubuntu 22.04. So instead we need to compile this library ourselves and point out to GDB where it’s located. The steps that I’ve done are described in this article: Cortex-M JTAG Debugging | Toradex Developer Center, on this part:
Apparently, the ARM GDB developers didn’t update their python libraries yet, so instead, we need to do this workaround. Can you please check if that solves your issue?
I followed the exact same steps and it compiled successfully. I’m not sure where this error is coming from, but regardless of this error, are you able to run the GDB with the LD_LIBRARY_PATH now?
Hello @hfranco.tx
I tried to sertup a fresh environment and I discovered that:
after make -j$(nproc), find . -name libpython3.6m.so.1.0 returns ONLY./libpython3.6m.so.1.0
it’s only AFTERmake install -j$(nproc) (that on my PC fails as I described above), that find . -name libpython3.6m.so.1.0 returns ./libpython3.6m.so.1.0 AND .lib//libpython3.6m.so.1.0
And without ./lib/libpython3.6m.so.1.0, I can’t run GDB, even if I tried to export
export LD_LIBRARY_PATH=/home/$USER/python3.6
(without the final lib/)
You have to re-add the step $ make install -j$(nproc)
that is necessary, even if it fails.
I confrim one more time that only the toolchain gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz can be used.
The new arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz doesn’t work at the moment.
In case someone is interested, this is the topic on ARM community where I’ve been discussing why the new toolchain arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz doesn’t work on Ubuntu 22.04.
Hello @hfranco.tx
I’ve just found another issue while trying to setup my new development machine iwht Ubuntu 22.04.
The same steps described here and that worked some weeks ago, now don’t work anymore because
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libpython3.6-dev
E: Couldn't find any package by glob 'libpython3.6-dev'
E: Couldn't find any package by regex 'libpython3.6-dev'
Is it possible that Python 3.6 has been removed by Ubuntu 22.04 upstream?
Or something like that?
to tell GDB where this library is. Have you tried that already?
Yes, they were removed from 22.04, but that’s still a dependency from the GDB ARM. I’m not sure if they released a new version and fixed this problem, but the last time I tried it was still a problem.