TX_ENABLE_CONST_NAMES shipped in 6.5.2 defaulting to off, in #761. It qualifies every object name as a pointer to const across create services, control blocks, information services, the module manager and trace registration. It is opt-in because it changes the type of a public struct field, and application code that copies a name into a writable CHAR * stops compiling — acceptable in a minor release, not in a patch one.
6.6 is where that default should change. Making it the default is one hunk in each tx_api.h, but the work around it is what matters.
Decide whether an escape hatch survives the flip. An integrator who cannot change their code needs something, and a second option that reverses the first is worth having only if we intend to remove it on a stated release rather than carry it indefinitely.
Build the option in CI before then. No configuration builds it today, so the const path only gets exercised when someone remembers to. The MISRA configurations are the ones that matter: every form of TX_CHAR_TO_UCHAR_POINTER_CONVERT but theirs casts the qualifier away silently, so they are the only ones that report a const name reaching a shim that takes CHAR *.
Carry the same switch through the components. USBX #275 and GUIX #189 are prepared against the qualification being the default, and the user guide's TX_ENABLE_CONST_NAMES entry will need rewriting again when it is. NetX Duo's NX_PACKET_DEBUG macro assigns tx_thread_identify() -> tx_thread_name into a CHAR *nx_packet_debug_thread; the field wants to be const CHAR *, which also settles the "ISR" literal assigned to it on the next line. The macro sits behind NX_ENABLE_PACKET_DEBUG_INFO, so no default build reaches it. FileX and LevelX need nothing.
Originally requested in #61.
TX_ENABLE_CONST_NAMESshipped in 6.5.2 defaulting to off, in #761. It qualifies every object name as a pointer to const across create services, control blocks, information services, the module manager and trace registration. It is opt-in because it changes the type of a public struct field, and application code that copies a name into a writableCHAR *stops compiling — acceptable in a minor release, not in a patch one.6.6 is where that default should change. Making it the default is one hunk in each
tx_api.h, but the work around it is what matters.Decide whether an escape hatch survives the flip. An integrator who cannot change their code needs something, and a second option that reverses the first is worth having only if we intend to remove it on a stated release rather than carry it indefinitely.
Build the option in CI before then. No configuration builds it today, so the const path only gets exercised when someone remembers to. The MISRA configurations are the ones that matter: every form of
TX_CHAR_TO_UCHAR_POINTER_CONVERTbut theirs casts the qualifier away silently, so they are the only ones that report a const name reaching a shim that takesCHAR *.Carry the same switch through the components. USBX #275 and GUIX #189 are prepared against the qualification being the default, and the user guide's
TX_ENABLE_CONST_NAMESentry will need rewriting again when it is. NetX Duo'sNX_PACKET_DEBUGmacro assignstx_thread_identify() -> tx_thread_nameinto aCHAR *nx_packet_debug_thread; the field wants to beconst CHAR *, which also settles the"ISR"literal assigned to it on the next line. The macro sits behindNX_ENABLE_PACKET_DEBUG_INFO, so no default build reaches it. FileX and LevelX need nothing.Originally requested in #61.