port to ESP-IDF 6.0 and open62541 v1.5.4 - #13
Open
diplfranzhoepfinger wants to merge 1 commit into
Open
Conversation
feat: port to ESP-IDF 6.0 and open62541 v1.5.4, minimal NS0 build - Update open62541 build to freertos-lwip architecture (renamed from freertosLWIP), providing FreeRTOS stub and no_install.cmake to satisfy CMake configure without a host FreeRTOS source tree - Switch BUILD_COMMAND to open62541-amalgamation target - Add patch_config.cmake to disable UA_HAS_GETIFADDR in generated config.h (not available on FreeRTOS/ESP32) - Add compat_includes/ wrappers for FreeRTOS.h and task.h (IDF 5+ requires freertos/ prefix) - Suppress all warnings on generated open62541.c (third-party file) - Add gethostname() shim to custom_getaddrinfo.c - Switch UA_NAMESPACE_ZERO from FULL + hand-maintained nodes_blacklist.txt to REDUCED: open62541's own curated minimal NS0 (Opc.Ua.NodeSet2.Reduced.xml plus per-feature *Minimal.xml nodesets), gated by UA_ENABLE_* flags. The blacklist approach kept breaking whenever a blacklisted node was still transitively referenced (DataType, HasTypeDefinition, reference type lookups) by an active node. nodes_blacklist.txt is now unused and removed. - Disable UA_ENABLE_DIAGNOSTICS, UA_ENABLE_HISTORIZING, UA_ENABLE_PUBSUB, UA_ENABLE_DA, UA_ENABLE_SUBSCRIPTIONS_EVENTS, UA_ENABLE_JSON_ENCODING, UA_ENABLE_XML_ENCODING and UA_ENABLE_STATUSCODE_DESCRIPTIONS to shrink the build; keep UA_ENABLE_DISCOVERY/_MULTICAST=MDNSD (used by main.c's mDNS setup) and leave UA_ENABLE_TYPEDESCRIPTION / UA_ENABLE_DATATYPES_ALL at their defaults (ON) since open62541 v1.5.4's security/GDS code and structure-description parsing reference types that don't compile with either one turned off - Migrate main.c APIs for IDF 5+/6: - UA_String_deleteMembers/UA_LocalizedText_deleteMembers → _clear - tcpip_adapter → esp_netif - spi_flash_init/get_chip_size → esp_flash_get_size - sntp_* → esp_sntp_* - esp_task_wdt_init → esp_task_wdt_config_t struct - UA_ServerConfig.customHostname → serverUrls - UA_ARCHITECTURE_FREERTOSLWIP guard moved after open62541.h include - Add CONFIG_ETHERNET_HELPER_CUSTOM_HOSTNAME to sdkconfig.defaults - Add spi_flash to main component REQUIRES - Binary size drops from ~2.9 MB (98% of the 3 MB factory partition) to ~1.1 MB (63% free); factory partition size left at 3 MB for headroom Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Author
|
Switch UA_NAMESPACE_ZERO from FULL + hand-maintained nodes_blacklist.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: port to ESP-IDF 6.0 and open62541 v1.5.4, minimal NS0 build
freertosLWIP), providing FreeRTOS stub and no_install.cmake to satisfy
CMake configure without a host FreeRTOS source tree
config.h (not available on FreeRTOS/ESP32)
requires freertos/ prefix)
to REDUCED: open62541's own curated minimal NS0 (Opc.Ua.NodeSet2.Reduced.xml
plus per-feature Minimal.xml nodesets), gated by UA_ENABLE_ flags. The
blacklist approach kept breaking whenever a blacklisted node was still
transitively referenced (DataType, HasTypeDefinition, reference type
lookups) by an active node. nodes_blacklist.txt is now unused and removed.
UA_ENABLE_DA, UA_ENABLE_SUBSCRIPTIONS_EVENTS, UA_ENABLE_JSON_ENCODING,
UA_ENABLE_XML_ENCODING and UA_ENABLE_STATUSCODE_DESCRIPTIONS to shrink
the build; keep UA_ENABLE_DISCOVERY/_MULTICAST=MDNSD (used by main.c's
mDNS setup) and leave UA_ENABLE_TYPEDESCRIPTION / UA_ENABLE_DATATYPES_ALL
at their defaults (ON) since open62541 v1.5.4's security/GDS code and
structure-description parsing reference types that don't compile with
either one turned off
~1.1 MB (63% free); factory partition size left at 3 MB for headroom
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com