[SOLVED] [Ozone] Environment variable substitution not working

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

  • [SOLVED] [Ozone] Environment variable substitution not working

    Hello,

    I am having trouble getting environment variable substitution working in my .jdebug file, when trying to substitute into a file path (Lubuntu 18.04, Ozone 2.60k).
    Perhaps my syntax is incorrect? According to the User Guide, "$(<varname>)" should be correct for Linux and Windows.

    My .jdebug file has the following line in OnProjectLoad(): Project.AddSvdFile ("$(NORDIC_SDK)/modules/nrfx/mdk/nrf52840.svd");

    NORDIC_SDK is an environment variable defined in my user ".profile" file as: export NORDIC_SDK="$HOME/nRF5_SDK_15.2.0_9412b96"

    Manually substituting the path works correctly, and opening a terminal window and running echo $NORDIC_SDK prints the expected result.
  • Hello,

    Thank you for your inquiry.
    The reported behaviour was reproducible and is not intended.
    We found a fix already and it will be available with next Ozone release.

    Sorry for any inconvenience caused.
    To stay up to date regarding Ozone releases you can subscribe to our update notification list:
    segger.com/notification/subscribe.php?prodid=178,7

    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.
  • Hi Nino,

    Please note, I have upgraded to Ozone 2.60l and the problem appears to persist:

    * The Ozone console says "File not found: $(NORDIC_SDK)/modules/nrfx/mdk/nrf52840.svd"
    * Opening a Linux console and executing "echo $NORDIC_SDK" prints the expected path.
    * Manually replacing the $(NORDIC_SDK) in the .jdebug file with the full path works as expected.

    (The release notes for 2.60l say the problem was fixed in this release.)
  • Hi,

    We retested it and it was working as expected.
    Then we noticed that you are using a macro within a macro with "$HOME/nRF...
    This is currently not supported. So if you use the full home path instead it should be working.

    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.
  • Thanks Nino; unfortunately I am still having the original problem, even after removing $HOME.

    Perhaps I am doing something wrong; is it possible you could please detail a simple working example? Perhaps I am setting the environment variable in the wrong place (user ".profile" file).
  • Hi,

    That sounds strange indeed.
    An example implementation can be found attached.
    We create a ENV SYSTMP.
    When called in Ozone as $(SYSTMP) it resolves as expected.

    Best regards,
    Nino
    Images
    • Capture.PNG

      5 kB, 398×27, viewed 614 times
    • Capture2.PNG

      8.14 kB, 521×34, viewed 573 times
    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.
  • Hello,

    Good find!
    It seems that the Ozone parser for Macros was skipping underscores under certain circumstances.
    This should be fixed in the next verison.
    Sorry for any inconveniences caused.

    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.