BRT Community

General Category => Discussion - MCU => Topic started by: KTrenholm on November 11, 2021, 04:55:12 PM

Title: MM900EV1B Module - Unable to Debug
Post by: KTrenholm on November 11, 2021, 04:55:12 PM
Hello, 

I'm evaluating the FT900 series with a MM900EV1B module connected to a UMFTPD2A for programming/debugging.  I am using the FT9xx Toolchain v2.5.0.
I'm having an issue where I am able to program the FT900 with no problems, but I am unable to launch the debugger.

When I begin debugging, the part is flashed properly, but then it bombs trying to begin debugging.
The message I receive is:

    'Launching FT9XX DEBUG' has encountered a problem.
    Error in final launch sequence
        Failed to execute MI command:
        -target-select remote localhost:9998
    Error message from debugger back end:
    localhost:9998: No connection could be made because the target machine actively refused it.
    localhost:9998: No connection could be made because the target machine actively refused it.


The console log shows:

    11:39:17 Running GDB started...
    Launching Debug Server (GDB Bridge)...
    python.exe "C:/Program Files (x86)/Bridgetek/FT9xx Toolchain/Toolchain/utilities/gdb_bridge.py" live flash
    Launching Debug Client (ft32-elf-gdb)...
    C:/Program Files (x86)/Bridgetek/FT9xx Toolchain/Toolchain/tools/bin/ft32-elf-gdb.exe


It looks like the gdb_bridge.py is starting, I can see a command prompt window open then quickly close when it attempting to launch the debugger.  Might there be a way to hold the window open or does it maybe catch some log information to get a better idea of what's going on?

When I run GDB Bridge.bat from the command prompt manually, it looks to start up OK:

    GDB Bridge Application
    Is Python v3 running? no

    D2XX library loaded OK
    D2XX devices detected: 4
    Device[0]: UMFTPD2A A
    Device[1]: UMFTPD2A B
    Device[2]: UMFTPD2A C
    Device[3]: UMFTPD2A D
    D2XX device opened: UMFTPD2A A

    Waiting for GDB connection request


So the python script seems to be running OK when run manually, at least to start.  Not sure where I should look from here.

Thanks in advance for the help!  Let me know if there's any additional information I can provide that might be of use!


Title: Re: MM900EV1B Module - Unable to Debug
Post by: BRT Community on April 29, 2022, 12:45:06 PM
Hello,

For some general background information, the bootloader presents an interface for both programming the FT900 and for the GDB bridge to query the hardware during debugging. In simplified terms, some of the functionality for debugging is on the GDB bridge debugger and the rest is in the bootloader. The bootloader is 4kB but it is not in a protected area unless the linker script is modified (the v2.6.0 default linker script protects the bootloader).

Here are some possible reasons that could be causing the debugger issue.

Best regards, BRT Community