ThreadX docsThreadX docs
ThreadX
ThreadX Modules
NetX Duo
FileX
GUIX
USBX
TraceX
LevelX
ThreadX
ThreadX Modules
NetX Duo
FileX
GUIX
USBX
TraceX
LevelX
  • ThreadX Documentation

    • Understand ThreadX
    • ThreadX documentation
    • Chapter 1 - Introduction to ThreadX
    • Chapter 2 - Installation and Use of ThreadX
    • Chapter 3 - Functional Components of ThreadX
    • Chapter 4 - Description of ThreadX Services
    • Chapter 5 - Device Drivers for ThreadX
    • Chapter 6 - Demonstration System for ThreadX
    • Appendix A - ThreadX API Services
    • Appendix B - ThreadX Constants
    • Appendix C - ThreadX Data Types
    • Appendix D - ThreadX ASCII Character Codes
    • Appendix E - ThreadX SMP MISRA C compliance
    • SMP

      • Chapter 1 - Introduction to ThreadX SMP
      • Chapter 2 - Installation & Use of ThreadX SMP
      • Chapter 3 - Functional Components of ThreadX SMP
      • Chapter 4 - Description of ThreadX SMP Services
      • Chapter 5 - Device Drivers for ThreadX SMP
      • Chapter 6 - Demonstration System for ThreadX SMP
      • Appendix A - ThreadX SMP API Services
      • Appendix B - ThreadX SMP Constants
      • Appendix C - ThreadX SMP Data Types
      • Appendix D - Eclipse ThreadX ASCII Character Codes
      • About This Guide
    • ARMv8m

      • Chapter 1 - Introduction to ThreadX for ARMv8-M.
      • Chapter 2 - Installing ThreadX support for ARMv8-M
      • Chapter 3 - ThreadX APIs for ARMv8-M
    • About the ThreadX Guide

Chapter 2 Installing ThreadX support for ARMv8-M

There are additional ThreadX source code files to support the ARMv8-M architecture.

If ThreadX is to be run in secure mode, these additional files and APIs are not needed. To run ThreadX in secure mode, define the symbol TX_SINGLE_MODE_SECURE at the top of tx_port.h or on the command line or project settings. Ensure TX_SINGLE_MODE_SECURE is defined for all c and assembly files. ThreadX and the user application will execute in secure mode.

If ThreadX and the user application are to run only in non-secure mode, define the symbol TX_SINGLE_MODE_NON_SECURE at the top of tx_port.h or on the command line or project settings. Ensure TX_SINGLE_MODE_NON_SECURE is defined for all c and assembly files. ThreadX and the user application will execute in non-secure mode with no support for making secure function calls.

By default, ThreadX and the user application are designed to run in non-secure mode with support for non-secure callable secure functions. To run ThreadX and the user application in non-secure mode and support non-secure callable secure functions, please do the following:

The file tx_thread_secure_stack.c must be added to the secure application.

The following files must be added to the ThreadX library:

  • tx_secure_interface.h
  • txe_thread_secure_stack_allocate.c
  • txe_thread_secure_stack_free.c
  • tx_thread_secure_stack_allocate.s
  • tx_thread_secure_stack_free.s

Additional ThreadX Sources for ARMv8-M

The additional ThreadX files for the ARMv8-M TrustZone architecture are described below.

File NameContents
tx_secure_interface.hInclude file that defines the ThreadX non-secure callable functions.
txe_thread_secure_stack_allocate.cError-checking file for the secure stack allocate API.
txe_thread_secure_stack_free.cError-checking file for the secure stack free API.
tx_thread_secure_stack_initialize.sInitialize the secure stacks.
tx_thread_secure_stack_allocate.sNon-secure veneer for the secure stack allocate service.
tx_thread_secure_stack_free.sNon-secure veneer for the secure stack free service.
Prev
Chapter 1 - Introduction to ThreadX for ARMv8-M.
Next
Chapter 3 - ThreadX APIs for ARMv8-M