J-Link Semihosting: Is There a Limit on Directory Depth for File Open?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • J-Link Semihosting: Is There a Limit on Directory Depth for File Open?

      Hi,

      I'm using J-Link semihosting to open files on the host system, and I've noticed an issue with deeply nested directories.
      When opening a file with a path up to five levels deep (e.g., C:/1/2/3/4/5/file.txt), everything works fine. However, if the file is located in a deeper directory (e.g., C:/1/2/3/4/5/6/f.txt), the file open function fails.

      Is there a known limitation in the J-Link semihosting implementation regarding directory depth? Or could this be a bug or an issue with my setup?

      Any insights would be appreciated!

      Thanks in advance.
    • New

      Hello,

      Semihosting itself is not limited in path length.

      However, depending on the tool you are using on the PC side, the path length could be limited to 256 characters (the maximum path length in Windows).
      May I ask which tool you are using for semihosting? So i can check if there is a limitation in that specific tool.

      Best regards,
      Simon
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.