Menu

#439 OpenOCD failed with code (-1073741819)

0.10.0
new
nobody
OpenOCD (1)
2025-07-26
2024-10-11
Alex
No

Trying to use Microchip SoftConsole 2022 on PolarFire SoC Icicle Kit to debug example application, but OpenOCD failing with message: OpenOCD failed with code (-1073741819). We tried to Google but nothing comes up. Could you tell us what that error code means?
It is a new DELL laptop running Windows 11. We use SoftConsole on other 4 PCs and no problems. The interesting part that OpenOCD detects two Embedded FlashPro6 as shown on attached image and we did not see that before.
Thank you

1 Attachments

Related

Tickets: #439

Discussion

  • Antonio Borneo

    Antonio Borneo - 2024-10-11

    Looks like you are using a fork of OpenOCD from MicroChip.
    I don't expect we could help you on that code. I even cannot find the code published anywhere.

     
    • Tommy Murphy

      Tommy Murphy - 2024-10-11

      Yes - Microchip use a custom(ised) version of OpenOCD, I can't see that the sources/changes were ever published, and you will probably have to contact Microchip support for help with problems like this. Good luck!

      (Disclaimer: I used to work for Microchip on the SoftConsole tools).

      Edit: you should probably try to get OpenOCD working on the command line separate from SoftConsole/Eclipse first. And maybe use -d3 to get verbose logging in case that sheds any light on the failure.

       

      Last edit: Tommy Murphy 2024-10-11
      • Paul Fertser

        Paul Fertser - 2024-10-12

        On Fri, Oct 11, 2024 at 07:44:16PM -0000, Tommy Murphy wrote:

        Yes - Microchip use a custom(ised) version of OpenOCD, I can't see that the
        sources/changes were ever published, and you will probably have to contact
        Microchip support for help with problems like this. Good luck!

        Also Microchip seems to be violating GPL which is illegal and
        offensive. I suggest you request full corresponding source code for
        their OpenOCD fork from them, there's a legal obligation to provide
        it. Linking with proprietary DLLs is prohibited by GPL too.

        --
        Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
        mailto:fercerpav@gmail.com

         
        👍
        1
        • Tommy Murphy

          Tommy Murphy - 2024-11-18

          Thought I posted about this last week but I don't know what happened.
          FWIW it looks like Microchip are upstreaming their changes now and the latest version seems to no longer require the use of the closed source fpServer component.

           
  • Alex

    Alex - 2024-10-12

    Thank you for your reply. I created a case on Microchip community forum but no response. It is very hard to get any support from them.

     
    😕
    1
  • Andy Potter

    Andy Potter - 2024-11-18

    I am trying to do the same with Artery as I want to talk to their AT32F4xx chips and they have posted copies of their versions of OpenOCD, both 0.10.0 and 0.11.0 within some of their Application Notes (AN0033, AN0130, AN0186, AN0191 and AN0193 to name a few) without access to the varying sources they were built with. I have used their contact form to request the required sources as per the terms of the GPL but as I am not a copyright holder of any of the code my options are limited. Is there a copyright holder who could give them a gentle push/probe?

     
    • Tommy Murphy

      Tommy Murphy - 2024-11-18

      Does this repo contain anything of relevance?

       
      • Andy Potter

        Andy Potter - 2024-11-18

        It appears to be some sources but nothing in it ties in with the
        dates/times of the builds they released in their app notes.
        There are two totally different builds (one does appear in their App Note
        AN0186) with what appears to be only 1 set of sources. Nice.

        Having been through similar issues with Inventel, Sagem and Thomson/BT I'd
        like to be able to build a matching executable to theirs before starting to
        see what changes need porting.

        Andy

        On Mon, 18 Nov 2024 at 22:47, Tommy Murphy tm1234@users.sourceforge.net
        wrote:

        Does this repo contain anything of relevance?


        [tickets:#439] https://sourceforge.net/p/openocd/tickets/439/ OpenOCD
        failed with code (-1073741819)

        Status: new
        Milestone: 0.10.0
        Labels: OpenOCD
        Created: Fri Oct 11, 2024 02:23 PM UTC by Alex
        Last Updated: Mon Nov 18, 2024 10:42 PM UTC
        Owner: nobody
        Attachments:

        Trying to use Microchip SoftConsole 2022 on PolarFire SoC Icicle Kit to
        debug example application, but OpenOCD failing with message: OpenOCD
        failed with code (-1073741819).
        We tried to Google but nothing comes up.
        Could you tell us what that error code means?
        It is a new DELL laptop running Windows 11. We use SoftConsole on other 4
        PCs and no problems. The interesting part that OpenOCD detects two Embedded
        FlashPro6 as shown on attached image and we did not see that before.
        Thank you


        Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is
        subscribed to https://sourceforge.net/p/openocd/tickets/

        To unsubscribe from further messages, a project admin can change settings
        at https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this
        is a mailing list, you can unsubscribe from the mailing list.

         

        Related

        Tickets: #439

  • Andy Potter

    Andy Potter - 2024-11-19

    Hi Marc,

    Ready, willing and able. I have a couple of 415 and 435 Goteks I can try it
    with.

    Regards

    Andy

    On Tue, 19 Nov 2024 at 08:48, Marc Schink dev@zapb.de wrote:

    Hi Andy,

    just to let you know, I have a working driver for the ArteryTek AT32F4x
    series. It just needs some code cleanup. I hope I can push it soon on
    Gerrit. Would be nice if you can give it a try then.

    Best regards,
    Marc

    On Mon, 2024-11-18 at 22:32 +0000, Andy Potter wrote:

    I am trying to do the same with Artery as I want to talk to their
    AT32F4xx chips and they have posted copies of their versions of
    OpenOCD, both 0.10.0 and 0.11.0 within some of their Application
    Notes (AN0033, AN0130, AN0186, AN0191 and AN0193 to name a few)
    without access to the varying sources they were built with. I have
    used their contact form to request the required sources as per the
    terms of the GPL but as I am not a copyright holder of any of the
    code my options are limited. Is there a copyright holder who could
    give them a gentle push/probe?
    [tickets:#439] OpenOCD failed with code (-1073741819)
    Status: new
    Milestone: 0.10.0
    Labels: OpenOCD
    Created: Fri Oct 11, 2024 02:23 PM UTC by Alex
    Last Updated: Sat Oct 12, 2024 07:48 PM UTC
    Owner: nobody
    Attachments:
    * image_2024_10_11T13_44_15_984Z.png (44.5 kB; image/png)
    Trying to use Microchip SoftConsole 2022 on PolarFire SoC Icicle Kit
    to debug example application, but OpenOCD failing with message:
    OpenOCD failed with code (-1073741819). We tried to Google but
    nothing comes up. Could you tell us what that error code means?
    It is a new DELL laptop running Windows 11. We use SoftConsole on
    other 4 PCs and no problems. The interesting part that OpenOCD
    detects two Embedded FlashPro6 as shown on attached image and we did
    not see that before.
    Thank you
    Sent from sourceforge.net because openocd-devel@lists.sourceforge.net
    is subscribed to https://sourceforge.net/p/openocd/tickets/
    To unsubscribe from further messages, a project admin can change
    settings at https://sourceforge.net/p/openocd/admin/tickets/options.
    Or, if this is a mailing list, you can unsubscribe from the mailing
    list.

     

    Related

    Tickets: #439

  • Andy Potter

    Andy Potter - 2024-12-21

    HI Marc,

    I've just seen it. Will give it a try as soon as I can.

    Thanks

    Andy

    On Sat, 21 Dec 2024 at 12:18, Marc Schink dev@zapb.de wrote:

    Hi Andy,

    I just pushed an initial flash driver for Artery devices. No dual-bank
    and flash loader support for now. The latter is almost ready but I need
    some more time for testing and debugging. I hope the current version is
    already helpful for you.

    Best regards
    Marc

    On Tue, 2024-11-19 at 08:52 +0000, Andy Potter wrote:

    Hi Marc,
    Ready, willing and able. I have a couple of 415 and 435 Goteks I can
    try it
    with.
    Regards
    Andy
    On Tue, 19 Nov 2024 at 08:48, Marc Schink dev@zapb.de wrote:

    Hi Andy,
    just to let you know, I have a working driver for the ArteryTek
    AT32F4x
    series. It just needs some code cleanup. I hope I can push it soon
    on
    Gerrit. Would be nice if you can give it a try then.
    Best regards,
    Marc
    On Mon, 2024-11-18 at 22:32 +0000, Andy Potter wrote:

    I am trying to do the same with Artery as I want to talk to their
    AT32F4xx chips and they have posted copies of their versions of
    OpenOCD, both 0.10.0 and 0.11.0 within some of their Application
    Notes (AN0033, AN0130, AN0186, AN0191 and AN0193 to name a few)
    without access to the varying sources they were built with. I
    have
    used their contact form to request the required sources as per
    the
    terms of the GPL but as I am not a copyright holder of any of the
    code my options are limited. Is there a copyright holder who
    could
    give them a gentle push/probe?
    [tickets:#439] OpenOCD failed with code (-1073741819)
    Status: new
    Milestone: 0.10.0
    Labels: OpenOCD
    Created: Fri Oct 11, 2024 02:23 PM UTC by Alex
    Last Updated: Sat Oct 12, 2024 07:48 PM UTC
    Owner: nobody
    Attachments:
    * image_2024_10_11T13_44_15_984Z.png (44.5 kB; image/png)
    Trying to use Microchip SoftConsole 2022 on PolarFire SoC Icicle
    Kit
    to debug example application, but OpenOCD failing with message:
    OpenOCD failed with code (-1073741819). We tried to Google but
    nothing comes up. Could you tell us what that error code means?
    It is a new DELL laptop running Windows 11. We use SoftConsole on
    other 4 PCs and no problems. The interesting part that OpenOCD
    detects two Embedded FlashPro6 as shown on attached image and we
    did
    not see that before.
    Thank you
    Sent from sourceforge.net because
    openocd-devel@lists.sourceforge.net
    is subscribed to https://sourceforge.net/p/openocd/tickets/
    To unsubscribe from further messages, a project admin can change
    settings at
    https://sourceforge.net/p/openocd/admin/tickets/options.
    Or, if this is a mailing list, you can unsubscribe from the
    mailing
    list.
    [tickets:#439] OpenOCD failed with code (-1073741819)
    Status: new
    Milestone: 0.10.0
    Labels: OpenOCD
    Created: Fri Oct 11, 2024 02:23 PM UTC by Alex
    Last Updated: Mon Nov 18, 2024 10:45 PM UTC
    Owner: nobody
    Attachments:
    * image_2024_10_11T13_44_15_984Z.png (44.5 kB; image/png)
    Trying to use Microchip SoftConsole 2022 on PolarFire SoC Icicle Kit
    to debug example application, but OpenOCD failing with message:
    OpenOCD failed with code (-1073741819). We tried to Google but
    nothing comes up. Could you tell us what that error code means?
    It is a new DELL laptop running Windows 11. We use SoftConsole on
    other 4 PCs and no problems. The interesting part that OpenOCD
    detects two Embedded FlashPro6 as shown on attached image and we did
    not see that before.
    Thank you
    Sent from sourceforge.net because openocd-devel@lists.sourceforge.net
    is subscribed to https://sourceforge.net/p/openocd/tickets/
    To unsubscribe from further messages, a project admin can change
    settings at https://sourceforge.net/p/openocd/admin/tickets/options.
    Or, if this is a mailing list, you can unsubscribe from the mailing
    list.

     

    Related

    Tickets: #439

  • Jindrich Fucik

    Jindrich Fucik - 2025-07-25

    Hi,

    I have same issue with "Arduino" one.

    This is, how arduino see the problem:

    "C:\Users\Jindra\AppData\Local\Arduino15\packages\WCH\tools\openocd\1.0.0/bin/openocd" -f "C:\Users\Jindra\AppData\Local\Arduino15\packages\WCH\tools\openocd\1.0.0/bin/wch-riscv.cfg" -c init -c halt -c "program {C:\Users\Jindra\AppData\Local\arduino\sketches\082CA6E126A46280AC42B2C347267422/CH32_blink.ino.elf} verify; wlink_reset_resume; exit;"
    Open On-Chip Debugger 0.11.0+dev-02415-gfad123a16-dirty (2023-05-05-13:43)
    Licensed under GNU GPL v2
    For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
    Info : only one transport option; autoselect 'sdi'
    Warn : Transport "sdi" was already selected
    Ready for Remote Connections
    Failed uploading: uploading error: exit status 0xc0000005
    

    I can try to run manually, with -d3 option, but no better result:

    C:\Users\Jindra\AppData\Local\Arduino15\packages\WCH\tools\openocd\1.0.0\bin>"C:\Users\Jindra\AppData\Local\Arduino15\packages\WCH\tools\openocd\1.0.0/bin/openocd" -d3 -f "C:\Users\Jindra\AppData\Local\Arduino15\packages\WCH\tools\openocd\1.0.0/bin/wch-riscv.cfg" -c init -c halt -c "program {C:\Users\Jindra\AppData\Local\arduino\sketches\082CA6E126A46280AC42B2C347267422/CH32_blink.ino.elf} verify; wlink_reset_resume; exit;"
    Open On-Chip Debugger 0.11.0+dev-02415-gfad123a16-dirty (2023-05-05-13:43)
    Licensed under GNU GPL v2
    For bug reports, read
            http://openocd.org/doc/doxygen/bugs.html
    User : 3 19 options.c:63 configuration_output_handler(): debug_level: 3
    User : 4 30 options.c:63 configuration_output_handler():
    Debug: 5 40 options.c:244 add_default_dirs(): bindir=/home/yy/riscv-openocdnew/opout/bin
    Debug: 6 40 options.c:245 add_default_dirs(): pkgdatadir=/home/yy/riscv-openocdnew/opout/share/openocd
    Debug: 7 40 options.c:246 add_default_dirs(): exepath=C:/Users/Jindra/AppData/Local/Arduino15/packages/WCH/tools/openocd/1.0.0/bin
    Debug: 8 50 options.c:247 add_default_dirs(): bin2data=../share/openocd
    Debug: 9 50 configuration.c:44 add_script_search_dir(): adding C:/Users/Jindra/AppData/Roaming/OpenOCD
    Debug: 10 61 configuration.c:44 add_script_search_dir(): adding C:/Users/Jindra/AppData/Local/Arduino15/packages/WCH/tools/openocd/1.0.0/bin/../share/openocd/site
    Debug: 11 70 configuration.c:44 add_script_search_dir(): adding C:/Users/Jindra/AppData/Local/Arduino15/packages/WCH/tools/openocd/1.0.0/bin/../share/openocd/scripts
    Debug: 12 70 command.c:166 script_debug(): command - ocd_find C:\Users\Jindra\AppData\Local\Arduino15\packages\WCH\tools\openocd\1.0.0/bin/wch-riscv.cfg
    Debug: 13 80 configuration.c:99 find_file(): found C:\Users\Jindra\AppData\Local\Arduino15\packages\WCH\tools\openocd\1.0.0/bin/wch-riscv.cfg
    Debug: 14 90 command.c:166 script_debug(): command - adapter driver wlinke
    Info : 15 90 transport.c:118 allow_transports(): only one transport option; autoselect 'sdi'
    Debug: 16 100 sdi.c:94 sdi_transport_select(): sdi_transport_select
    Debug: 17 100 command.c:166 script_debug(): command - adapter speed 6000
    Debug: 18 110 adapter.c:176 adapter_config_khz(): handle adapter khz
    Debug: 19 110 adapter.c:140 adapter_khz_to_speed(): convert khz to adapter specific speed value
    Debug: 20 110 adapter.c:140 adapter_khz_to_speed(): convert khz to adapter specific speed value
    Debug: 21 120 command.c:166 script_debug(): command - transport select sdi
    Warn : 22 120 transport.c:287 jim_transport_select(): Transport "sdi" was already selected
    Debug: 23 120 command.c:166 script_debug(): command - wlink_set_address 0x00000000
    Debug: 24 130 command.c:166 script_debug(): command - sdi newtap wch_riscv cpu -irlen 5 -expected-id 0x00001
    Debug: 25 130 sdi.c:59 handle_sdi_newtap_command(): Creating new sdi "tap", Chip: wch_riscv, Tap: cpu, Dotted: wch_riscv.cpu
    Debug: 26 140 core.c:1468 jtag_tap_init(): Created Tap: wch_riscv.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
    Debug: 27 140 command.c:166 script_debug(): command - target create wch_riscv.cpu.0 wch_riscv -chain-position wch_riscv.cpu
    Debug: 28 150 target.c:2214 target_free_all_working_areas_restore(): freeing all working areas
    Debug: 29 161 wch_riscv.c:71 wch_riscv_create_target(): wch_riscv_create_target()
    Debug: 30 161 command.c:166 script_debug(): command - wch_riscv.cpu.0 configure -work-area-phys 0x20000000 -work-area-size 10000 -work-area-backup 1
    Debug: 31 171 target.c:2214 target_free_all_working_areas_restore(): freeing all working areas
    Debug: 32 171 target.c:2214 target_free_all_working_areas_restore(): freeing all working areas
    Debug: 33 171 target.c:2214 target_free_all_working_areas_restore(): freeing all working areas
    Debug: 34 181 command.c:166 script_debug(): command - flash bank wch_riscv.flash wch_riscv 0x00000000 0 0 0 wch_riscv.cpu.0
    Debug: 35 191 tcl.c:1354 handle_flash_bank_command(): 'wch_riscv' driver usage field missing
    Debug: 36 191 command.c:166 script_debug(): command - echo Ready for Remote Connections
    User : 37 201 command.c:697 handle_echo(): Ready for Remote Connections
    Debug: 38 201 command.c:166 script_debug(): command - init
    Debug: 39 201 command.c:166 script_debug(): command - target init
    Debug: 40 211 command.c:166 script_debug(): command - target names
    Debug: 41 211 command.c:166 script_debug(): command - wch_riscv.cpu.0 cget -event gdb-flash-erase-start
    Debug: 42 211 command.c:166 script_debug(): command - wch_riscv.cpu.0 configure -event gdb-flash-erase-start reset init
    Debug: 43 221 command.c:166 script_debug(): command - wch_riscv.cpu.0 cget -event gdb-flash-write-end
    Debug: 44 221 command.c:166 script_debug(): command - wch_riscv.cpu.0 configure -event gdb-flash-write-end reset halt
    Debug: 45 231 command.c:166 script_debug(): command - wch_riscv.cpu.0 cget -event gdb-attach
    Debug: 46 231 command.c:166 script_debug(): command - wch_riscv.cpu.0 configure -event gdb-attach halt 1000
    Debug: 47 241 target.c:1671 handle_target_init_command(): Initializing targets...
    Debug: 48 241 wch_riscv.c:84 wch_riscv_init_target(): wch_riscv_init_target()
    
    C:\Users\Jindra\AppData\Local\Arduino15\packages\WCH\tools\openocd\1.0.0\bin>echo %errorlevel%
    -1073741819
    
     
    • Paul Fertser

      Paul Fertser - 2025-07-25

      Looks totally unrelated to me. You're using debug adapter which is not supported in upstream OpenOCD at all and it's unclear what "sdi" transport is. I suggest you ask whomever provides that "Open On-Chip Debugger 0.11.0+dev-02415-gfad123a16-dirty (2023-05-05-13:43)" fork (WCH?), I doubt anyone here in upstream has any idea about it.

       
      • Tommy Murphy

        Tommy Murphy - 2025-07-25

        Yes - SDI is a WCH (proprietary?) 2-wire debug interface so presumably this OpenOCD (which is also old) is a custom/modified version from WCH or somebody else doing work with WCH RISC-V MCUs and questions about it should be directed to them. Not really sure why this was posted in an issue thread originally about Microchip SoftConsole OpenOCD? Seems completely off topic?

         
        • Jindrich Fucik

          Jindrich Fucik - 2025-07-25

          Hi, I can answer 2nd part. I posted it to this thread as I have same exit code and similar symptoms (vendor packed version etc).

           
          • Tommy Murphy

            Tommy Murphy - 2025-07-26

            What do you mean by "vendor packed version etc"?

             
  • Jindrich Fucik

    Jindrich Fucik - 2025-07-25

    Finally get it solved!
    The problem is missing driver for WCH-Link SERIAL.
    Default CDC driver from windows is not correct one. Additional driver from WCH is necessary in my case:
    https://pio-ch32v.readthedocs.io/en/latest/installation.html#install-drivers-rules

     

Log in to post a comment.