Hi Team,
can anyone suggest me how to solve this issue.
Hello Praveen,
Your project was created for Linux target, but it seems you are trying to debug with baremetal/bareboard configuration. Please make sure the target is not booted with Linux BSP running at the time the debug session with S32 Debugger and S32 Debug Probe is used. For example, if Linux BSP is loaded to SD card and board is set for boot from RCON, with RCON set to SD card, then either remove the SD card from the slot or reconfigure the board to boot from serial instead.
The S32 Debugger does not support Linux-aware debugging at this time.
Best Regards,
Mike
Hi Mike,
I had created my project with Linux Target only. Initially I tried without removing from SD card from EVK, later I removed the SD card from the EVK and tried to debug it with different Boot configuration settings. Even though I am facing the same error.
Is there any other way to debug that issue?
I tried with "How to debug using Command line GDB Debugging with S32R45" by referred this link from NXP community --> "https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Command-Line-GDB-Debugging-with-..."
In this, I was able to reach till step 4.. while trying with step 5, I am getting error like this.
Kindly suggest me know how to proceed further.
Thanks.
Hi Praveen,
The best way to debug this application, since it is built for Linux, is by using the C/C++ Remote Application debug configuration:
I suggest you follow the steps detailed in the following article. While it is for another device, the steps are nearly the same.
HOWTO: Setup A Remote Linux Connection in S32DS fo... - NXP Community
Be sure to download the SW32R45_RSDK_Linux_SDCARD_0.9.5_D2204 from this site:
https://nxp.flexnetoperations.com/control/frse/product?child_plneID=820747
First login to your account on NXP.com, select Software Licensing and Support, then proceed until you reach the Product List page, then use the link above.
Use the image from this download and program it to an SD card and install to the EVB. Setup to boot from SD card. Just like described in the HOWTO linked above. Sorry, we don't have a HOWTO like this for S32R45.
Please try it and let me know,
Mike
Hi Mike, Thanks for your quick reply.
I followed the steps with Remote Linux connection for S32R45. i was able to ping the IP address of my Target from Putty Terminal but while starting debugging with the Target gives error again.
Hi Praveen,
From the error message, it seems it is not able to establish a connection to the target board. Probably the IP address is not correct. I know for my home network, each time I reboot the Linux on the EVB, the IP address is incremented by 1. So instead of 192.168.3.116, it would be 192.168.3.117. Please check the IP address again by using the 'ifconfig' command when connected using PuTTY over the USB connection. One additional thing, you can also setup PuTTY to connect to the board over ethernet, this way you can confirm the ethernet settings are correct.
Best Regards,
Mike
Hi Mike,
sorry for the delay from my side. yes as you said, each time I reboot the Linux on the EVB the IP address is incrementing. I am checking the IP address everytime & changing in the setting in Debug settings. I also setup PuTTY to connect to the board over ethernet, still i am not able debug the issue.
let me know if i can check any other way to debug.
Thanks.
Hello,
If you were successful in connecting to the board via ethernet with PuTTY, could you share the screen capture of the result?
If this is working, then there should not be an error from S32DS regarding connection issue with the board. They are using same communication setup. I see you have changed from Windows host to Linux host for S32 Design Studio installation. Could we focus on getting one working before we introduce potential new sources for issues? Perhaps switch back to Windows, as this is what I am more familiar with and can help you best on?
Best Regards,
Mike
Hello Praveen,
After the error is received, without terminating or deleting the debug thread, go to Window -> Preferences menu, enter GDB in the search field. Next, click on the GDB in the results panel and look for 'Show the GDB traces console with character limit:' check box and check it. Click 'Apply and Close'.
Now, go to console panel and select the 'GDB traces' console:
Send us the log displayed in this view.
Best Regards,
Mike
Thanks for the reply @mikedoidge
check this log from "GDB Trace console"
113,458 2-gdb-version
113,474 ~"GNU gdb (GDB build.sh rev=g0219b1f s=F930 Earmv8GDB (BLD = 1701)) 9.2\n"
113,475 ~"Copyright (C) 2020 Free Software Foundation, Inc.\n"
113,475 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is fre\
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law."
113,476 ~"\nType \"show copying\" and \"show warranty\" for details.\n"
113,476 ~"This GDB was configured as \"--host=i686-w64-mingw32 --target=aarch64-none-elf\".\n"
113,476 ~"Type \"show configuration\" for configuration details.\n"
113,476 ~"For bug reporting instructions, please see:\n"
113,477 ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
113,477 ~"Find the GDB manual and other documentation resources online at:\n <http://www.gnu.org/\
software/gdb/documentation/>."
113,477 ~"\n\n"
113,477 ~"For help, type \"help\".\n"
113,477 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
113,477 2^done
113,478 (gdb)
113,478 3-environment-cd D:/MetaWave/WorkspaceS32/test_example
113,491 3^done
113,491 (gdb)
113,491 4-gdb-set breakpoint pending on
113,511 4^done
113,511 (gdb)
113,512 5-gdb-set detach-on-fork on
113,527 5^done
113,527 (gdb)
113,527 6-enable-pretty-printing
113,543 6^done
113,543 (gdb)
113,543 7-gdb-set python print-stack none
113,564 7^done
113,564 (gdb)
113,565 8-gdb-set print object on
113,581 8^done
113,581 (gdb)
113,582 9-gdb-set print sevenbit-strings on
113,596 9^done
113,596 (gdb)
113,597 10-gdb-set host-charset UTF-8
113,611 10^done
113,611 (gdb)
113,613 11-gdb-set target-charset WINDOWS-1252
113,634 11^done
113,634 (gdb)
113,635 12-gdb-set target-wide-charset UTF-16
113,655 12^done
113,655 (gdb)
113,656 13-gdb-set dprintf-style call
113,670 13^done
113,672 (gdb)
113,673 14source .gdbinit
113,686 &"source .gdbinit\n"
113,689 &".gdbinit: No such file or directory.\n"
113,689 14^error,msg=".gdbinit: No such file or directory."
113,690 (gdb)
113,691 15-gdb-set target-async off
113,702 15^done
113,702 (gdb)
113,704 16-gdb-set record full stop-at-limit off
113,717 16^done
113,718 (gdb)
113,719 17-gdb-set auto-solib-add on
113,738 17^done
113,738 (gdb)
114,758 18py _IS_LOGGING_ENABLED = False
114,758 19py _REMOTE_TIMEOUT = 30
114,758 20py _CORE_NAME = "A53_0"
114,758 21py _SOC_NAME = "S32R45"
114,759 22py _GDB_SERVER_PORT = 45000
114,760 23py _JTAG_SPEED = 16000
114,760 24py _RESET_DELAY = 0
114,760 25py _PROBE_IP = "s32dbg:169.254.157.6"
114,760 26py _RESET_TYPE = None
114,760 27source C:\NXP\S32DS.3.4\eclipse\../S32DS/tools/S32Debugger/Debugger/scripts/s32r45/s32r45_\
generic_bareboard.py
114,768 &"py _IS_LOGGING_ENABLED = False\n"
114,769 18^done
114,769 (gdb)
114,770 &"py _REMOTE_TIMEOUT = 30\n"
114,770 19^done
114,770 (gdb)
114,771 &"py _CORE_NAME = \"A53_0\"\n"
114,771 20^done
114,771 (gdb)
114,772 &"py _SOC_NAME = \"S32R45\"\n"
114,773 21^done
114,773 (gdb)
114,774 &"py _GDB_SERVER_PORT = 45000\n"
114,774 22^done
114,775 (gdb)
114,776 &"py _JTAG_SPEED = 16000\n"
114,776 23^done
114,776 (gdb)
114,777 &"py _RESET_DELAY = 0\n"
114,777 24^done
114,777 (gdb)
114,779 &"py _PROBE_IP = \"s32dbg:169.254.157.6\"\n"
114,779 25^done
114,779 (gdb)
114,780 &"py _RESET_TYPE = None\n"
114,780 26^done
114,780 (gdb)
114,782 &"source C:\\NXP\\S32DS.3.4\\eclipse\\../S32DS/tools/S32Debugger/Debugger/scripts/s32r45/s32\
r45_generic_bareboard.py\n"
114,846 =cmd-param-changed,param="pagination",value="off"
114,859 27^done
114,859 (gdb)
115,865 28py board_init()
115,881 &"py board_init()\n"
115,881 ~"Primary session connecting...\n"
132,142 ~"^Error:127.0.0.1:41475: (undocumented errno 138).:ConnectError(102) File \"<string>\", li\
ne 1, in <module>\n\n File \"C:\\NXP\\S32DS.3.4\\eclipse\\../S32DS/tools/S32Debugger/Debugger/scrip\
ts/s32r45/s32r45_generic_bareboard.py\", line 117, in board_init\n connect()\n\n File \"C:\\NXP\\
\S32DS.3.4\\eclipse\\../S32DS/tools/S32Debugger/Debugger/scripts/s32r45/s32r45_generic_bareboard.py\\
", line 83, in connect\n secure_type, secure_key).unwrap()\n\n File \"C:\\NXP\\S32DS.3.4\\S32DS\\
\tools\\S32Debugger\\Debugger\\scripts\\s32r45/../utils\\gta_lib.py\", line 46, in establish_connect\
ion\n return connect(ctx, probe_ip, jtag, port, timeout, log, preinit_callback_fn, auth_type, sec\
ure_dbg_pwd, target_lifecycle, ccs_port)\n\n File \"C:\\NXP\\S32DS.3.4\\S32DS\\tools\\S32Debugger\\\
Debugger\\scripts\\s32r45/../utils\\errors.py\", line 218, in wrapper\n return Result(Error(error\
code, \"%s\" % e.message))\n\n File \"C:\\NXP\\S32DS.3.4\\S32DS\\tools\\S32Debugger\\Debugger\\scri\
pts\\s32r45/../utils\\errors.py\", line 89, in __init__\n self.stack = traceback.format_stack()\n\
\n"
kindly let me know how to proceed further to solve this issue. Thank you.
Referring to HOWTO: Command Line GDB Debugging with S32 Debug P... - NXP Community
I am able to complete the steps until step #5.a after which I am facing the issue for board_init(), I think you were facing a similar kind of issue at some point, so can you please guide me through over it @PraveenKumar_K ? thankyou.
FYR the GDB Trace Console :
C:\Users\Lab>set PYTHONPATH=C:\NXP\S32DS.3.4\S32DS\build_tools\msys32\mingw32\lib\python2.7;C:\NXP\S32DS.3.4\S32DS\build_tools\msys32\mingw32\lib\python2.7\site-packages
C:\Users\Lab>
C:\Users\Lab>
C:\Users\Lab>C:\NXP\S32DS.3.4\S32DS\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb-py.exe
C:\NXP\S32DS.3.4\S32DS\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb-py.exe: warning: Couldn't determine a path for the index cache directory.
GNU gdb (GDB build.sh rev=g0219b1f s=F930 Earmv7nGDB (BLD = 1701)) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)
(gdb)
(gdb) source C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx\s32g2xx_generic_bareboard_all_cores_prabhat.py
(gdb)
(gdb)
(gdb) py board_init()
Primary session connecting...
^Error:127.0.0.1:45000: (undocumented errno 138).:ConnectError(102) File "<string>", line 1, in <module>
File "C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx\s32g2xx_generic_bareboard_all_cores_prabhat.py", line 90, in board_init
connect()
File "C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx\s32g2xx_generic_bareboard_all_cores_prabhat.py", line 72, in connect
secure_type, secure_key).unwrap()
File "C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx/../utils\gta_lib.py", line 46, in establish_connection
return connect(ctx, probe_ip, jtag, port, timeout, log, preinit_callback_fn, auth_type, secure_dbg_pwd, target_lifecycle, ccs_port)
File "C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx/../utils\errors.py", line 218, in wrapper
return Result(Error(errorcode, "%s" % e.message))
File "C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx/../utils\errors.py", line 89, in __init__
self.stack = traceback.format_stack()
Hello @prabhat_ and @PraveenKumar_K,
I finally had a chance to get back to this thread. I noticed there was an error message 'Import Error: no module named enum'. This means that the enum package is missing from the Linux Host OS where S32 Design Studio is installed.
Please see the below section from the install guide:
Best Regards,
Mike
yes already did that one, forgot to update. It is working fine now.