[SOLVED] Is it possible to use semihosting command SYS_SYSTEM in Ozone?

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

  • [SOLVED] Is it possible to use semihosting command SYS_SYSTEM in Ozone?

    Hello, everyone!

    Could anyone please answer me the aforementioned question? I know, that semihosting is usually blamed for being too slow and because it blocks firmware when no debugger is connected and other stuff. But I found it quite useful when running unit tests for distinct parts of software. For example, I have a WiFi module on board and while evaluating it, I perform numerous scenarios like "Connect to a given network", "Connect to a given network and the to this socket", "Become and access point and wait for connection" and so on. To automate and manage all these cases I took a Unity test framework, which fit pretty well on resource-constrained platform. So when I fix/implement some code and decide to check nothing has been broken, I just run all tests I have and see the report given to me by semihosting's printf implementations.

    Anyway sometimes I need to give some input to tests, like IP address of the server, or amount of data to get from or software under tests needs to tell me something so I could behave respectively. It would be nice to automate it as well. And here I recalled about SYS_SYSTEM command. According to documentation, it pass a command to host command-line interface. Neat feature, I though. Some scripts in Python plus command to run them and that's all.

    Unfortunately, Ozone reported to me that this feature is blocked due to security concerns (huh?! well, at least it recognizes it). So is there a way to somehow enable it or it's blocked once and forever? Yes, I know it's possible to implement it using UART and some sort of RPC server on host PC, but it takes some pins and some code to be written, so I put it to backlog for some time, if SYS_SYSTEM is really inaccessible.

    Best regards!
  • Hello,

    Thank you for your inquiry.
    As the error message states this operation is not supported due to security concerns.
    Executing system commands remotely on the host system is simply not safe.
    There are currently no plans to add this to Ozone.

    See here for more information about Ozones semihosting implementation:
    wiki.segger.com/Semihosting_with_Ozone#Supported_Operations

    Best regards,
    Nino
    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.