Giter Site home page Giter Site logo

Comments (2)

MaJerle avatar MaJerle commented on May 28, 2024

Furthermore, when researching why I cannot get pass tx_semaphore_create function, I noticed that sizeof(TX_SEMAPHORE) in the app wasn't the same as sizeof(TX_SEMAPHORE) inside threadx library. One was 28, another was 32.

A trick is that file tx_user.h, that is in the user application folder, outside threadx library, isn't visible to the compilation unit of threadx and therefore doesn't take into account all user settings.

In the TX_SEMAPHORE structure, there is this part:

#ifndef TX_DISABLE_NOTIFY_CALLBACKS

    /* Define the application callback routine used to notify the application when
       the a message is sent to the queue.  */
    VOID                (*tx_queue_send_notify)(struct TX_QUEUE_STRUCT *queue_ptr);
#endif

Macro TX_DISABLE_NOTIFY_CALLBACKS is normally defined in the tx_user.h file, but this one is NOT visible to the compilation unit of threadx, if we use the current ThreadX CMake system.

What's the trick here, to make it happen correctly?

Thanks

from threadx.

xray-bit avatar xray-bit commented on May 28, 2024

Hi, @MaJerle . You can do it just like this:

set(THREADX_ARCH cortex_m33)
set(THREADX_TOOLCHAIN gnu)
add_subdirectory(threadx)
target_compile_options(threadx PRIVATE
    -mthumb
    # other compile options
)
target_link_libraries(${EXECUTABLE} threadx)

from threadx.

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.