I'm trying to use arm-none-eabi-gdb as the debugger for my stm32 project, but when I try to execute it, it return the following error:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f75639ddc00 (most recent call first):
Aborted (core dumped)
I look online and find this solution, but when I enter export PYTHONHOME=/usr/local
it come out annother error message that I cannot find any solution:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fcc24680c00 (most recent call first):
Aborted (core dumped)
I've check that my python and python3 work ok, Is there anything I should check for?
Thank you ~
The arm gcc_tool_chain version I'm using is 11.2-2022.02 for x86_64 Linux hosted which I download from the official website. And After downloading it, I just unzip it and add the toolchain directory into $PATH
. I did not compile or install and I'm not sure if I should do any of those since I download the binary version(gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz) and the arm-none-eabi-g++ compiler works perpectly.