Skip to content

Commit 347c0fa

Browse files
authored
Documentations updates for ThreadX v6.5.1202602 (#30)
This pull request updates the Eclipse ThreadX documentation to reflect new features, APIs, and configuration options introduced in the 6.5.1.202602 release across all repositories. LevelX — Lazy Sector Release (PR #71) Documents the new opt-in lazy sector release mechanism for NAND flash. Two new configuration constants are documented in chapter2.adoc: LX_NAND_FLASH_ENABLE_LAZY_SECTOR_RELEASE (enables deferred copy+erase on sector release) and LX_NAND_FLASH_SECTOR_RELEASE_LAZY_THRESHOLD (minimum free block count before lazy release activates, default 10). USBX — New HID Protocol APIs (PR #244) Documents three new HID class additions in usbx-host-stack-5.adoc:ux_host_class_hid_protocol_get() retrieves the current HID protocol (boot or report);ux_host_class_hid_protocol_set() switches the protocol on the host side;ux_device_class_hid_set_protocol_callback is an optional device-side callback invoked when the host changes the protocol. USBX — Removed API Stubs (PR #259) Documents the removal of five API prototypes that had no corresponding implementation:ux_hcd_isp1161_initialize, ux_dcd_at91_initialize, ux_dcd_isp1181_initialize,ux_dcd_ml6965_initialize, and ux_device_stack_transfer_request_abort. NetX Duo — BSD Enhancements (PRs #374, #375, #376) Documents BSD socket improvements in netx-duo-bsd/chapter2.adoc: the new recvfromto()function returning both source and local destination addresses; SO_LINGER socket option support in nx_bsd_setsockopt; stricter nx_bsd_inet_aton that now rejects non-dotted-quad address formats; select() exception notification via exceptfds; and a corrected return value for nx_bsd_accept. NetX Duo — RSA-PSS and TLS 1.3 (PRs #377, #267) Documents RSA-PSS signature verification (RFC 8017 section 8.1) required for TLS 1.3compliance with RSA certificates (RFC 8446 section 4.2.3), along with the newNX_CRYPTO_DIGITAL_SIGNATURE_RSAPSS constant (0x00050004). Also documents X.509GeneralizedTime support: notBefore and notAfter validity fields now accept both UTCTime and GeneralizedTime ASN.1 formats, and the two fields may use different formats. GUIX — Error Processing Hook (PR #156) Documents the new GX_ENABLE_ERROR_CALLBACK configuration option in chapter-3.adoc. When defined alongside GX_DISABLE_THREADX_BINDING, it allows custom RTOS bindings to register a gx_generic_error_process(UINT error_code, ULONG error_count) callback for custom error recovery. GUIX Studio — VS2022 Migration (PR #152) Updates about-guix-studio.adoc: Visual Studio 2022 is now required (VS2019 support has been dropped); PerMonitorV2 high-DPI support added for panes, dialogues, and toolbar assets; GUIX Studio now starts maximised by default with correct window placement persistence;String Table Editor button scaling corrected. ThreadX — Win64 Port (PR #529) Documents the new native Windows 64-bit ports for ThreadX and ThreadX SMP. ThreadX — Xtensa Port Updates (PR #525) Documents updates contributed from the Cadence foss-xtensa fork: LX8 support for morethan 32 interrupt levels; fixed interrupt handling with TX_ENABLE_EXECUTION_CHANGE_NOTIFY; support for __DYNAMIC_REENT__; and execution profiling support.
1 parent 253974f commit 347c0fa

9 files changed

Lines changed: 239 additions & 0 deletions

File tree

rtos-docs/guix/modules/ROOT/pages/about-guix-studio.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Frédéric Desbiens - Initial AsciiDoc version.
1414

1515
////
16+
// Some portions generated by Copilot (Claude Sonnet 4.6).
1617
1718
= About This GUIX Studio User Guide
1819
:description: This guide provides comprehensive information about GUIX Studio, the Microsoft Windows-based rapid UI development environment specifically designed for the GUIX runtime library from Eclipse Foundation.
@@ -21,6 +22,16 @@ This guide provides comprehensive information about GUIX Studio, the Microsoft W
2122
2223
It is intended for the embedded real-time software developer using the ThreadX Real-Time Operating System (RTOS) and the GUIX UI run-time library. The developer should be familiar with standard ThreadX and GUIX concepts.
2324
25+
== Recent GUIX Studio Updates
26+
27+
GUIX Studio now requires Visual Studio 2022 for the supplied Windows build environment and no longer supports Visual Studio 2019.
28+
29+
GUIX Studio now starts maximized by default and correctly saves and restores window placement between sessions.
30+
31+
The String Table Editor button layout now scales correctly with display DPI settings.
32+
33+
High-DPI (PerMonitorV2) displays are fully supported, so panes, dialogs, and toolbar assets scale automatically.
34+
2435
== Organization
2536
2637
* xref:guix-studio-1.adoc[*Chapter 1*] provides a basic overview of GUIX Studio and its relationship to real-time development.

rtos-docs/guix/modules/ROOT/pages/chapter-3.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Frédéric Desbiens - Initial AsciiDoc version.
1414

1515
////
16+
// Some portions generated by Copilot (Claude Sonnet 4.6).
1617
1718
= Chapter 3 - Functional Overview of GUIX
1819
:description: This chapter contains a functional overview of the high-performance GUIX user interface product.
@@ -750,6 +751,21 @@ F - GUIX RTOS Binding Services] describes the services that need to
750751
be implemented to port GUIX to an operating system other than the
751752
ThreadX operating system.
752753
754+
When *GX_DISABLE_THREADX_BINDING* is defined, the application may also
755+
define *GX_ENABLE_ERROR_CALLBACK* to register a custom error handler.
756+
The callback has the following signature:
757+
758+
[,c]
759+
----
760+
VOID gx_generic_error_process(UINT error_code, ULONG error_count);
761+
----
762+
763+
This callback is invoked when GUIX detects an internal error, allowing
764+
the application to take custom recovery action. For example, an
765+
application running on a non-ThreadX RTOS might suspend the GUIX task in
766+
response to a fatal error. Without *GX_ENABLE_ERROR_CALLBACK*, GUIX uses
767+
its default error handling behavior.
768+
753769
=== Multithread Safety
754770
755771
The GUIX API is available from the GUIX thread context as well as other

rtos-docs/levelx/modules/ROOT/pages/chapter2.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Frédéric Desbiens - Initial AsciiDoc version.
1414

1515
////
16+
// Some portions generated by Copilot (Claude Sonnet 4.6).
1617
1718
= Chapter 2 - Installation and use of LevelX
1819
:description: Installation and use of LevelX is straightforward and described in the following sections of this chapter.
@@ -92,6 +93,8 @@ LevelX can be configured at compile time via the conditional defines described b
9293
* *LX_FREE_SECTOR_DATA_VERIFY*: Defined, this causes the LevelX NOR instance open logic to verify free NOR sectors are all ones.
9394
* *LX_NAND_SECTOR_MAPPING_CACHE_SIZE*: By default this value is 16 and defines the logical sector mapping cache size. Large values improve performance, but cost memory. The minimum size is 8 and all values must be a power of 2.
9495
* *LX_NAND_FLASH_DIRECT_MAPPING_CACHE*: Defined, this creates a direct mapping cache, such that there are no cache misses. It also requires that LX_NAND_SECTOR_MAPPING_CACHE_SIZE represents the exact number of total pages in your flash device.
96+
* *LX_NAND_FLASH_ENABLE_LAZY_SECTOR_RELEASE*: When defined, enables lazy (deferred) sector release for NAND flash. Instead of immediately copying and erasing a full block when a sector is released, a tombstone page is written to a freshly allocated block and the old block is flagged as `COMPACTION_PENDING`. Compaction is triggered lazily by subsequent sector writes, wear-levelling moves, defragmentation, and block allocation. Without this option, all existing code paths are unchanged. This feature should be thoroughly validated — including stress, power-loss, and wear-levelling scenarios — before use in any production system.
97+
* *LX_NAND_FLASH_SECTOR_RELEASE_LAZY_THRESHOLD*: When `LX_NAND_FLASH_ENABLE_LAZY_SECTOR_RELEASE` is defined, specifies the minimum number of free blocks required before lazy sector release is activated. The default value is 10. Only relevant when `LX_NAND_FLASH_ENABLE_LAZY_SECTOR_RELEASE` is defined.
9598
* *LX_NOR_DISABLE_EXTENDED_CACHE*: Defined, this disabled the extended NOR cache.
9699
* *LX_NOR_EXTENDED_CACHE_SIZE*: By default this value is 8, which represents a maximum of 8 sectors that can be cached in a NOR instance.
97100
* *LX_NOR_SECTOR_MAPPING_CACHE_SIZE*: By default this value is 16 and defines the logical sector mapping cache size. Large values improve performance, but cost memory. The minimum size is 8 and all values must be a power of 2.

rtos-docs/netx-duo/modules/ROOT/pages/netx-duo-bsd/chapter2.adoc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Frédéric Desbiens - Initial AsciiDoc version.
1414

1515
////
16+
// Some portions generated by Copilot (Claude Sonnet 4.6).
1617
1718
= Chapter 2 - Installation and use of NetX Duo BSD
1819
:description: This chapter contains a description of various issues related to installation, setup, and usage of the NetX Duo BSD component.
@@ -208,6 +209,33 @@ Due to performance and architecture issues, NetX Duo BSD does not support all th
208209
209210
INT flags are not supported for _send, recv, sendto_ and _recvfrom_ calls.
210211
212+
== BSD Service Updates
213+
214+
=== recvfromto
215+
216+
The _recvfromto_ service extends _recvfrom_ by also returning the local destination address of the received packet, which is useful on multi-homed hosts.
217+
218+
[,c]
219+
----
220+
INT recvfromto(INT sockID, CHAR *buffer, INT buffersize, INT flags,
221+
struct sockaddr *from, INT *fromLength,
222+
struct sockaddr *to, INT *toLength);
223+
----
224+
225+
The parameters follow standard POSIX conventions. The _to_ parameter receives the local destination address on which the packet was received, and _toLength_ specifies the length of that address structure.
226+
227+
On success, the return value is the number of bytes received. On error, the return value is -1 and *bsd_errno* is set.
228+
229+
=== inet_aton format validation
230+
231+
The internal _nx_bsd_inet_aton_ parsing routine now strictly accepts only dotted-quad IPv4 strings made of four decimal numbers separated by dots. Non-standard formats that were previously accepted, including octal, hexadecimal, or shortened forms with fewer groups, are now rejected and return 0.
232+
233+
=== select and accept behavior
234+
235+
The _select()_ service now reports sockets that have encountered errors in the _exceptfds_ set, in addition to the normal read and write readiness tracking performed through _readfds_ and _writefds_.
236+
237+
When _nx_bsd_accept_ completes successfully, the BSD _accept()_ service now returns the newly created socket descriptor for the accepted connection.
238+
211239
== General Configuration Options
212240
213241
User configurable options in _nxd_bsd.h_ allow the application to fine tune NetX Duo BSD sockets for its particular application requirements.
@@ -252,6 +280,7 @@ The list of run time socket level options is shown below.
252280
* *SO_BROADCAST*: If set, this enables sending and receiving broadcast packets from NetX Duo sockets. This is the default behavior for NetX Duo. All sockets have this capability.
253281
* *SO_ERROR*: Used to obtain socket status on the previous socket operation of the specified socket, using the _getsockopt_ service. All sockets have this capability.
254282
* *SO_KEEPALIVE*: If set, this enables the TCP Keep Alive feature. This requires the NetX Duo library to be built with NX_TCP_ENABLE_KEEPALIVE defined in _nx_user.h_. By default this feature is disabled.
283+
* *SO_LINGER*: If set with the standard POSIX `struct linger { int l_onoff; int l_linger; };` and _l_onoff_ is non-zero, closing the socket blocks until all pending data is sent or the linger timeout specified by _l_linger_ (in seconds) expires.
255284
* *SO_RCVTIMEO*: This sets the wait option in seconds for receiving packets on NetX Duo BSD sockets. The default value is the NX_WAIT_FOREVER (0xFFFFFFFF) or, if non-blocking is enabled, NX_NO_WAIT (0x0).
256285
* *SO_RCVBUF*: This sets the window size of the TCP socket. The default value, NX_BSD_TCP_WINDOW, is set to 64k for BSD TCP sockets. To set the size over 65535 requires the NetX Duo library to be built with the NX_TCP_ENABLE_WINDOW_SCALING be defined.
257286
* *SO_REUSEADDR*: If set, this enables multiple sockets to be mapped to one port. The typical usage is for the TCP Server socket. This is the default behavior of NetX Duo sockets.

rtos-docs/netx-duo/modules/ROOT/pages/netx-duo-secure-tls/chapter2.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Frédéric Desbiens - Initial AsciiDoc version.
1414

1515
////
16+
// Some portions generated by Copilot (Claude Sonnet 4.6).
1617
1718
= Chapter 2 - Installation and use of NetX Duo Secure
1819
:description: This chapter contains a description of various issues related to installation, setup, and usage of the NetX Duo Secure component.
@@ -55,6 +56,10 @@ In order to use NetX Duo Secure, the entire distribution mentioned previously sh
5556
5657
Using NetX Duo Secure TLS is straightforward. Basically, the application code must include _nx_secure_tls_api.h_ after it includes _tx_api.h_ and _nx_api.h_, in order to use ThreadX and NetX Duo. Once _nx_secure_tls_api.h_ is included, the application code is then able to make the NetX Duo Secure function calls specified later in this guide. The application must also import the _nx_secure**.* files into a NetXSecure library, and the platform-specific *nx_crypto**._ files into a NetXCrypto library.
5758
59+
== TLS 1.3 and X.509 Updates
60+
61+
RSA-PSS signature verification is now supported for TLS 1.3 RSA certificate authentication, as required by RFC 8446 Section 4.2.3. The implementation uses the RSA-PSS algorithm defined in RFC 8017 Section 8.1, and the constant *NX_CRYPTO_DIGITAL_SIGNATURE_RSAPSS* (0x00050004) is defined in _nx_crypto_const.h_. With this addition, TLS 1.3 RSA certificate support is complete.
62+
5863
== Small Example System (TLS Client)
5964
6065
An example of how easy it is to use NetX Duo Secure is described below. This demonstrates a simple TLS Client, using software crypto modules (not hardware specific) for encryption. It is designed to work with the OpenSSL reverse-echo server (openssl s_server -rev).

rtos-docs/netx-duo/modules/ROOT/pages/netx-duo-secure-tls/chapter4.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Frédéric Desbiens - Initial AsciiDoc version.
1414

1515
////
16+
// Some portions generated by Copilot (Claude Sonnet 4.6).
1617
1718
= Chapter 4 - Description of NetX Duo Secure services
1819
:description: This chapter contains a description of all NetX Duo Secure services (listed below) in alphabetic order.
@@ -1855,6 +1856,8 @@ This service initializes an NX_SECURE_TLS_SESSION structure instance for use in
18551856
18561857
The method takes a NX_SECURE_TLS_CRYPTO object that is populated with the available cryptographic methods to be used for TLS. The _encryption_metadata_area_ points to a buffer allocated for use by TLS for the "metadata" used by the cryptographic methods in the NX_SECURE_TLS_CRYPTO table for calculations. The size of the table can be determined by using the nx_secure_tls_metadata_size_calculate service. See the section "Cryptography in NetX Duo Secure TLS" in Chapter 3 for more details.
18571858
1859+
For TLS 1.3 RSA certificate deployments, the crypto table may include RSA-PSS signature verification through *NX_CRYPTO_DIGITAL_SIGNATURE_RSAPSS* (0x00050004), defined in _nx_crypto_const.h_. This support satisfies the TLS 1.3 RSA signature requirements of RFC 8446 Section 4.2.3 using the RSA-PSS algorithm defined in RFC 8017 Section 8.1.
1860+
18581861
=== Parameters
18591862
18601863
* *session_ptr* Pointer to a TLS Session instance.
@@ -3172,6 +3175,8 @@ The certificate data *must* be a valid X.509 digital certificate in DER-encoded
31723175
31733176
The _raw_data_buffer_ parameter and its size are optional parameters that specify a dedicated buffer into which the certificate data is copied before parsing. If raw_data_buffer is passed as NX_NULL then the NX_SECURE_X509_CERT structure will point directly into the certificate_data array (buffer_size is ignored in this case). If raw_data_buffer is passed as NX_NULL, *_do not_* modify the data pointed to by the certificate_data pointer or certificate processing will likely fail!
31743177
3178+
During X.509 certificate validation, the _notBefore_ and _notAfter_ validity fields may be encoded as either ASN.1 *UTCTime* or *GeneralizedTime*, and the two fields may use different encodings in the same certificate. This support is required for compatibility with RFC 5280 certificates issued after 2049, which must use *GeneralizedTime*.
3179+
31753180
The private key parameter is for local identity certificates -- the private key is used by servers to decrypt the incoming key data from a client (encrypted using the server's public key) and by clients to verify their identity to a server when the server requests a client certificate. Adding a private key with this API will automatically mark the associated certificate as being an identity certificate for a TLS application. When initializing certificates for other purposes (e.g. the trusted store), the _private_key_data_ parameter should be passed as NULL, the _private_key_data_length_ as 0, and the _private_key_type_ should be passed as NX_SECURE_X509_KEY_TYPE_NONE.
31763181
31773182
The _private_key_type_ parameter indicates the formatting of the private key. For example, if the private key is a DER-encoded PKCS#1-format RSA private key, the private_key_type should be passed as NX_SECURE_X509_KEY_TYPE_RSA_PKCS1_DER, a type known to NetX Duo Secure which will be parsed immediately and saved for later use.

rtos-docs/threadx/modules/ROOT/pages/chapter2.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Frédéric Desbiens - Initial AsciiDoc version.
1414

1515
////
16+
// Some portions generated by Copilot (Claude Sonnet 4.6).
1617
1718
= Chapter 2 - Installation and Use of ThreadX
1819
:description: This chapter contains a description of various issues related to installation, setup, and usage of the high-performance ThreadX kernel.
@@ -97,6 +98,26 @@ IMPORTANT: _The ThreadX entry function **tx_kernel_enter*_ does not return. So b
9798
. Create the *_tx_application_define_* function. This is where the initial system resources are created. Examples of system resources include threads, queues, memory pools, event flags groups, mutexes, and semaphores.
9899
. Compile application source and link with the ThreadX run-time library *_tx.lib_*. The resulting image can be downloaded to the target and executed!
99100
101+
=== Win64 Host Regression Build
102+
103+
The ThreadX repository also includes a Win64 host port for the regression harness. This host port is intended for simulator-based regression work on Windows systems that have the Visual Studio 2022 Build Tools and Ninja installed.
104+
105+
From the ThreadX repository root, use the following PowerShell command to configure and build the Win64 regression binaries:
106+
107+
[,powershell]
108+
----
109+
pwsh ./scripts/build_tx.ps1 -Arch win64 -Configuration default_build_coverage
110+
----
111+
112+
To execute the corresponding regression tests, use:
113+
114+
[,powershell]
115+
----
116+
pwsh ./scripts/test_tx.ps1 -Arch win64 -Configuration default_build_coverage
117+
----
118+
119+
The scripts also accept `all` for the configuration parameter, which builds or tests the complete Win64 regression matrix.
120+
100121
== Small Example System
101122
102123
The small example system in Figure 1 shows the creation of a single thread with a priority of 3. The thread executes, increments a counter, then sleeps for one clock tick.
@@ -147,6 +168,15 @@ If the demonstration system does not execute properly, the following are some tr
147168
. Rebuild the ThreadX library with TX_ENABLE_STACK_CHECKING defined. This enables the built-in ThreadX stack checking.
148169
. Temporarily bypass any recent changes to see if the problem disappears or changes.
149170
171+
== Xtensa Port Updates
172+
173+
The ThreadX Xtensa port includes the following recent updates:
174+
175+
* *LX8 processor support*: The port now supports Xtensa LX8 processors, including devices with more than 32 interrupt levels.
176+
* *TX_ENABLE_EXECUTION_CHANGE_NOTIFY*: Interrupt handling is fixed when this option is defined.
177+
* *__DYNAMIC_REENT__*: The port now correctly supports Newlib's dynamic reentrancy structure when *__DYNAMIC_REENT__* is defined.
178+
* *Execution profiling*: Execution profiling support has been added for Xtensa ports.
179+
150180
== Configuration Options
151181
152182
There are several configuration options when building the ThreadX library and the application using ThreadX. The options below can be defined in the application source, on the command line, or within the *_tx_user.h_* include file.

rtos-docs/threadx/modules/ROOT/pages/threadx-smp/chapter2.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ As for resources used on the host, the source code for ThreadX SMP is delivered
3131
3232
IMPORTANT: Please review the supplied *readme_threadx.txt* file for additional host system considerations and options.
3333
34+
NOTE: A Win64/MSVC ThreadX SMP host simulation port is also available for validation on Windows. This simulator models ThreadX SMP virtual cores on Windows host threads for build and regression testing, and it should be treated as a host-side validation environment rather than a production runtime port.
35+
3436
== Target Considerations
3537
3638
ThreadX SMP requires between 2 KBytes and 20 KBytes of Read Only Memory (ROM) on the target. Another 1 to 2 KBytes of the target's Random Access Memory (RAM) are required for the ThreadX SMP system stack and other global data structures.
@@ -93,6 +95,26 @@ Create the *_tx_application_define_* function. This is where the initial system
9395
9496
Compile application source and link with the ThreadX SMP run-time library *_tx.lib_*. The resulting image can be downloaded to the target and executed!
9597
98+
=== Win64 Host Regression Build
99+
100+
The ThreadX repository also includes a Win64 host port for the SMP regression harness. This host port is intended for simulator-based regression work on Windows systems that have the Visual Studio 2022 Build Tools and Ninja installed.
101+
102+
From the ThreadX repository root, use the following PowerShell command to configure and build the Win64 SMP regression binaries:
103+
104+
[,powershell]
105+
----
106+
pwsh ./scripts/build_smp.ps1 -Arch win64 -Configuration default_build_coverage
107+
----
108+
109+
To execute the corresponding regression tests, use:
110+
111+
[,powershell]
112+
----
113+
pwsh ./scripts/test_smp.ps1 -Arch win64 -Configuration default_build_coverage
114+
----
115+
116+
The scripts also accept `all` for the configuration parameter, which builds or tests the complete Win64 SMP regression matrix.
117+
96118
== Small Example System
97119
98120
The small example system in Figure 1 on page 28 shows the creation of a single thread with a priority of 3. The thread executes, increments a counter, then sleeps for one clock tick. This process continues forever.

0 commit comments

Comments
 (0)