static analysis with TraceX enabled


I'm finding that when I want to perform static analysis on my code with TraceX support enabled, I'm hitting an encrypted header file (synergy/ssp/src/framework/el/tx/tx_src/tx_thread.h) that causes my static analysis tool (in this case Polyspace) to fail to be able to analyze the file. Are there any recommendations for how to handle this? As an initial reaction, it makes extremely little sense to encrypt header files, which by definition are supposed to only declare things so other files know they exist (exactly why static analysis would need to read this file). 

Otherwise, the obvious option is to set up a project configuration that does not include TraceX support, but we'd like to not maintain a separate project configuration specifically for this case. I think I could get around this if I can disable the flag TX_ENABLE_EVENT_TRACE, which is defined in tx_src_user.h, just for the Polyspace analysis if that leads anywhere.



  • Azure-rtos is available on GitHub. Perhaps you can use those plaintext header from those repo for code analysis.
  • Hi Elene,

    I downloaded source code from Git hub and ported it to Work with renesas Sysnergy. It is libaray project and you can navigate to source code. If you want you can add more define in tx_port.h file. I make this library to work with 120Mhz clock speed. You can change Clock frequency inside tx_initialize_low_level_sample.S file and rebuild the project.
    SYSTEM_CLOCK = 120000000
    SYSTICK_CYCLES = ((SYSTEM_CLOCK / 100) -1) // Running at 100Hz (if you want can change it to 1000Hz)

    I hope this will help you with TraceX.

    Please find attached complete source code project


  • Hi,

    The license for Azure RTOS allows evaluation and testing use. However, when going to production a production license is only provided free of charge to certain MCU families. Currently there are none listed. If Synergy is not supported then a license must be purchased. So, please be aware of this when using Azure RTOS source files with devices not supported with a free production license.

    Using the files for static analysis purposes may be a solution to the problem you are seeing.


  • Hi Ian,
    You are right there is not any MCU mention on Github.
    However, it is confirmed that Azure RTOS is free (Production too) to be used with ST, NXP, Renesas and Microchip MCUs.

    This information is on Microsoft Azure Website.


  • Hi,

    The Azure RTOS site states:

    "No cost for production licences when deployed to pre-licensed devices"

    Where have you seen the Synergy device being used specified as a pre-licensed device?


  • Dear Ian,

    Following is the information on Microsoft website:
    "We will also be releasing the full source code for all Azure RTOS components on GitHub, allowing developers to freely explore, develop, test, and adapt Azure RTOS to suit their needs. When developers are ready to take their code into production, the production license will be included automatically if they deploy to any of the supported MCU devices from STMicroelectronics, Renesas, NXP, Microchip, or Qualcomm."


    This was before the RTOS was released on github. I am not sure if it still valid.


    Abdul sattar
  • Hi Abdul,

    I think the key part of this is " the production license will be included automatically if they deploy to any of the supported MCU devices from STMicroelectronics, Renesas, NXP, Microchip, or Qualcomm".

    Not all devices from these manufacturers are necessarily going to be supported. For non supported devices the production license won't be automatically included and I presume normal Microsoft/Expree Logic licensing conditions will apply.


  • Thanks all for the suggestions to get the unencrypted source. I was able to confirm that disabling TX_ENABLE_EVENT_TRACE avoided the need to include encrypted headers. I tried to get Polyspace to override that specific include, but something wonky was going on that resulted in it not picking up my override. Ultimately, Polyspace support pointed me to a feature that is essentially a regex find and replace, which I used to comment out that define statement.