BAT shell redirect to eclipse CDT Console(GDB Hardware Debugging under eclipse CDT) [message #1860749] |
Thu, 31 August 2023 12:48 |
Robert Smith Messages: 1 Registered: August 2023 |
Junior Member |
|
|
Hi,
We use a in-house chip simulator to debug some embedded projects (mix of C + ASM) using eclipse CDT and GDB. (The chip simulator implements a GdbServer stub which is good enough for our purposes).
Originally we used a 'Zylin embedded debug' configuration (under eclipse CDT [Juno 2013-02], Windows 10), which worked fine. Under GDB 'Initialization' commands we launched the simulator from within a shell like this:
shell x:/some/path/to/launch.bat
launch.bat took some actions, which included prompting the user for some choices, and then launches the simulator. The reason for this is that the simulator had to complete some actions first before it could start to listen for the GDB connection.
So the shell launched from eclipse CDT only returned after these actions were completed by launch.bat. Only then did GDB (under eclipse CDT) connect with:
target remote:1234
Another thing to note was that the bat file was launched in an external Windows console (eg. cmd.exe), which stayed open for the duration of the execution of the simulator (and is never redirected to the eclipse Console).
Recently we upgraded to eclipse CDT 2022-06. This does not have the 'Zylin embedded debug' option anymore, so I used the 'GDB Hardware Debugging' option.
I tried to duplicate the same solution as before, but now eclipse, directly after the launch.bat prompted the user (in an external cmd.exe), suddenly is redirecting the shell output to the eclipse Console. But this somehow interrupts the bat file (the simulator never starts) and the GDB remote communication is never established.
If I comment the shell x:/some/path/to/launch.bat line and execute launch.bat manually, and then start the debug configuration in eclipse CDT, everything works fine i.e. like what I want.
So it seems that 'GDB Hardware Debugging' itself does not cause this, but that the redirection of the shell output causes this.
So my question is: how can I force the 'shell [command]' to launch in an external console, and not be redirected back to the eclipse console?
Best regards
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08733 seconds