Code Monkey home page Code Monkey logo

Comments (5)

ALABSTM avatar ALABSTM commented on July 17, 2024

Hi @vrabcak,

Thank you for this report. It will be forwarded to our development teams for deeper analysis. We will get back to you as soon as they provide their feedback. Thank you again.

With regards,

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on July 17, 2024

Hi @vrabcak,

Our development teams could reproduce the issue and analyse its root cause. They recommend to clean and rebuild the project each time the tx_user.h file is modified (e.g. after the TX_THREAD_ENABLE_PERFORMANCE_INFO is activated).

Below is their analysis:

  • Observed behavior:
    • Initially the project is built without activating the TX_THREAD_ENABLE_PERFORMANCE_INFO flag and the binary is correctly working.
    • Then the TX_THREAD_ENABLE_PERFORMANCE_INFO flag is activated and the project is rebuilt without cleaning.
      • The issue appears.
      • This is observed only in DEBUG mode.
  • Analysis:
    • When editing the tx_user.h file and rebuilding the project the IDE will only recompile the files that are including that header file. But ThreadX comes with a set of *.s files that do not include the tx_user.hfile. Thus they are not recompiled.
    • The TX_THREAD_ENABLE_PERFORMANCE_INFO is adding extra fields to the TX_THREAD structure increasing the overall size of the structure.
      • When rebuilding the project the TX_THREAD structures declared in the application will have a greater size.
      • They will occupy extra room in memory that was reserved for the objects generated from the *.s files that were not recompiled.
      • This yields memory corruption.
    • The issue appears in DEBUG mode only because:
      • In RELEASE mode the compiler omits all unused symbols including the fields introduced by the TX_THREAD_ENABLE_PERFORMANCE_INFO flag.
      • While in DEBUG mode there is is no optimization at all.
  • Recommendation:
    • The project should be cleaned and rebuilt each time the tx_user.h file is modified.

We hope this helps you solve the problem. Please let us know.

With regards,

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on July 17, 2024

Hi @vrabcak,

Any feedback from your side? Does our recommendation help you solve the issue?

With regards,

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on July 17, 2024

Hi @vrabcak,

Please allow me to close this issue. Thank you again for your contribution.

With regards,

from x-cube-azrtos-h7.

ALABSTM avatar ALABSTM commented on July 17, 2024

ST Internal Reference: 98736

from x-cube-azrtos-h7.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.