Geehy APM32 MCU support

Sysprogs forums Forums VisualGDB Geehy APM32 MCU support

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35174
    matstumpf
    Participant

    Hi!

    I normally use ST STM32 devices without any issue, but on the last batch of PCBs we received, the supplier changed to Geehy APM32.

    Well, I use ST-Link V2, and I could program without issues and also debug for some seconds.

    Also, the DFU bootloader wont work and eighter the Board Config that I store on Flash, and as i cannot debug for more than 10 seconds, I cannot see what is going wrong.

    This is the VisualGDB output:

    Hi!

    I normally use ST STM32 devices without any issue, but on the last batch of PCBs we received, the supplier changed to Geehy APM32.

    Well, I use ST-Link V2, and I could program without issues and also debug for some seconds.

    Also, the DFU bootloader wont work and eighter the Board Config that I store on Flash, and as i cannot debug for more than 10 seconds, I cannot see what is going wrong.

    This is the VisualGDB output:

    C:\Users\i9-matsRD\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\bin\openocd.exe -c “gdb_port 58217” -c “telnet_port 58215” -f interface/stlink-v2.cfg -c “transport select hla_swd” -f target/stm32f4x.cfg -c init -c “reset init” -c “echo VisualGDB_OpenOCD_Ready”
    Open On-Chip Debugger 0.12.0 (2023-10-02) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
    For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
    WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg
    hla_swd
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    Info : clock speed 2000 kHz
    Info : STLINK V2J39S7 (API v2) VID:PID 0483:3748
    Info : Target voltage: 3.254076
    Info : [stm32f4x.cpu] Cortex-M4 r0p1 processor detected
    Info : [stm32f4x.cpu] target has 6 breakpoints, 4 watchpoints
    Info : starting gdb server for stm32f4x.cpu on 58217
    Info : Listening on port 58217 for gdb connections
    Info : Unable to match requested speed 2000 kHz, using 1800 kHz
    Info : Unable to match requested speed 2000 kHz, using 1800 kHz
    [stm32f4x.cpu] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x08007aac msp: 0x20020000
    Info : Unable to match requested speed 8000 kHz, using 4000 kHz
    Info : Unable to match requested speed 8000 kHz, using 4000 kHz
    VisualGDB_OpenOCD_Ready
    Info : Listening on port 6666 for tcl connections
    Info : Listening on port 58215 for telnet connections
    Info : accepting ‘gdb’ connection on tcp/58217
    Info : device id = 0x0015a433
    Info : flash size = 512 KiB
    Info : flash size = 512 bytes
    Warn : Prefer GDB command “target extended-remote :58217” instead of “target remote :58217”
    Info : device id = 0x0015a433
    Info : flash size = 512 KiB
    Info : flash size = 512 bytes
    Info : Unable to match requested speed 2000 kHz, using 1800 kHz
    Info : Unable to match requested speed 2000 kHz, using 1800 kHz
    [stm32f4x.cpu] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x08007aac msp: 0x20020000
    Info : Unable to match requested speed 8000 kHz, using 4000 kHz
    Info : Unable to match requested speed 8000 kHz, using 4000 kHz
    Info : Erasing FLASH: 0x08000000-0x0800c000…
    Info : Programming FLASH (2 sections, 36200 bytes)…
    Info : Programming FLASH section 1/2 (408 bytes) at 0x08000000…
    Info : Padding image section 0 at 0x08000198 with 8 bytes
    Info : flash_write_start:0x8000000|0x8008d70|stm32f4x.flash
    Info : flash_write_done:stm32f4x.flash
    Info : Unable to match requested speed 2000 kHz, using 1800 kHz
    Info : Unable to match requested speed 2000 kHz, using 1800 kHz
    [stm32f4x.cpu] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x08007aac msp: 0x20020000
    Info : halted: PC: 0x08000e58
    Info : halted: PC: 0x08000670
    Info : halted: PC: 0x08000672
    Info : halted: PC: 0x080044e6
    Info : halted: PC: 0x08000678
    Info : halted: PC: 0x0800067a
    Info : halted: PC: 0x0800067e
    Info : halted: PC: 0x08000680
    Info : halted: PC: 0x08000682
    Info : halted: PC: 0x08000684
    Info : halted: PC: 0x08000686
    Info : halted: PC: 0x08000688
    Info : halted: PC: 0x0800068a
    Info : halted: PC: 0x0800068c
    Info : halted: PC: 0x0800068e
    Info : halted: PC: 0x08000690
    Info : halted: PC: 0x08000692
    Info : halted: PC: 0x08000694
    Info : halted: PC: 0x08000696
    Info : halted: PC: 0x08000698
    Info : halted: PC: 0x0800069a
    Info : halted: PC: 0x0800069c
    Info : halted: PC: 0x0800069e
    Info : halted: PC: 0x080006a0
    Info : halted: PC: 0x080006a2
    Info : halted: PC: 0x080006a4
    Info : halted: PC: 0x080006a6
    Info : halted: PC: 0x080006a8
    Info : halted: PC: 0x080006aa
    Info : halted: PC: 0x080006ac
    Info : halted: PC: 0x080006ae
    Error: jtag status contains invalid mode value – communication failure
    Polling target stm32f4x.cpu failed, trying to reexamine
    Examination failed, GDB will be halted. Polling again in 100ms
    Info : Previous state query failed, trying to reconnect
    Error: jtag status contains invalid mode value – communication failure
    Polling target stm32f4x.cpu failed, trying to reexamine
    Examination failed, GDB will be halted. Polling again in 300ms
    Info : Previous state query failed, trying to reconnect
    Error: jtag status contains invalid mode value – communication failure
    Polling target stm32f4x.cpu failed, trying to reexamine

     

    There are some thing that I can do to make it work? Anyone tried?

    Thanks!

    There are some thing that I can do to make it work? Anyone tried?

    Thanks!

    • This topic was modified 4 months ago by matstumpf.
    • This topic was modified 4 months ago by matstumpf.
    #35177
    support
    Keymaster

    Hi,

    The ST-Link devices are specifically designed to work with ST microcontrollers only, so it makes sense that they wouldn’t work with APM32. You can try contacting the device vendor- maybe they supply their own version of ST-Link or OpenOCD.

    #35181
    matstumpf
    Participant

    Yes they have their own programmer (Geehy-Link), but as others Chinese stm32 copy MCUs that works only changing the id with the ST-Link, this should work too, as it programs successful (I can test my PCB and it works) but the debug connection drop suddenly.

    How can i check why it’s dropping?

    #35182
    support
    Keymaster

    You can try contacting the device vendor, or your supplier. Maybe, they could have some suggestions.

    As far as VisualGDB is concerned, it runs OpenOCD in order to handle the low-level debug functionality. The STM32 support in OpenOCD is developed by ST and generally works very well with genuine ST devices. If it’s not working with a particular device, the issue is somewhere between OpenOCD and that specific device. If you can get OpenOCD working via command line, we can help you configure VisualGDB to use that command line when you start a debug session. If not, it won’t work with VisualGDB either.

    #35412
    matstumpf
    Participant

    Hi!

    I ended up buying a Segger J-Link programmer and could make it work without any issues.

    Strangely the default ST-Link programmer do program fine, but only debug for few seconds.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.