Problem with building OpenOCD

Sysprogs forums Forums VisualGDB Problem with building OpenOCD

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26468
    iliasam
    Participant

    Hi.
    I am trying to build  OpenOCD as described here: https://visualgdb.com/tutorials/arm/openocd/build/
    I get such error in Build output:

    [378/385] Building C object src/flash/nor/CMakeFiles/ocdflashnor.dir/stm32g0x.c.obj
    [379/385] Linking C static library src\flash\nor\libocdflashnor.a
    [380/385] Generating startup.tcl
    FAILED: src/startup.tcl
    cmd.exe /C “cd /D D:\MYPROGS\C_SHARP_SOFT\MCUCapture\openocd_src\VisualGDB\Debug\src && D:\MYPROGS\C_SHARP_SOFT\MCUCapture\openocd_src\external\run-sh.bat -c “cat D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/helper/startup.tcl D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/jtag/startup.tcl D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/target/startup.tcl D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/flash/startup.tcl D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/server/startup.tcl > D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/VisualGDB/Debug/src/startup.tcl””

    D:\MYPROGS\C_SHARP_SOFT\MCUCapture\openocd_src\VisualGDB\Debug\src>set PATH=c:\sysgcc\mingw32\bin;c:\sysgcc\mingw32\bin;C:\Program Files (x86)\STMicroelectronics\st_toolset\asm;C:\Program Files (x86)\Common Files\Oracle\Java\javapath; ……… (I removed this part)

    D:\MYPROGS\C_SHARP_SOFT\MCUCapture\openocd_src\VisualGDB\Debug\src>sh -c “cat D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/helper/startup.tcl D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/jtag/startup.tcl D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/target/startup.tcl D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/flash/startup.tcl D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/src/server/startup.tcl > D:/MYPROGS/C_SHARP_SOFT/MCUCapture/openocd_src/VisualGDB/Debug/src/startup.tcl” -c0
    “sh” is not recognized as an internal or external command, operable program or batch file.
    ninja: build stopped: subcommand failed.
    ——————————————

    What could be a reason of such error?

    #26471
    support
    Keymaster

    Hi,

    Looks like you don’t have sh.exe in your PATH variable. Please try adding the directory containing it (would normally be bundled with your Git installation) to PATH, or edit the run-sh.bat file inside the OpenOCD repository to specify the path manually.

    We have also updated our OpenOCD repository to show a more meaningful message when sh.exe is missing.

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