eclipse-threadx / netxduo

Eclipse ThreadX - NetXDuo is an advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/index.md
MIT License
247 stars 140 forks source link

Compilation error with NX_CRYPTO_SELF_TEST enabled (gcc compiler) #53

Closed hwmaier closed 3 years ago

hwmaier commented 3 years ago

When NX_CRYPTO_SELF_TEST is defined, the module nx_crypto_module_start.c is compiled which appears to be hardware specific (STM32F469) and not compatible with the gcc compiler showing following compilation errors:

[build] .../netxduo/crypto_libraries/src/nx_crypto_module_start.c:70:60: error: expected '=', ',', ';', 'asm' or '__attribute__' before string constant
[build]    70 | const unsigned long long _nx_crypto_module_program_begin @ "NX_CRYPTO_PROGRAM_BEGIN" = 0ull;
[build] .../netxduo/crypto_libraries/src/nx_crypto_module_start.c:228:16: error: unknown type name '__nounwind'
[build]   228 | NX_CRYPTO_KEEP __nounwind __interwork __softfp __aapcs_core void __aeabi_memcpy (void *dest, const void *src, size_t size)

Once the module nx_crypto_module_start.c is removed from netxduo\crypto_libraries\CMakeLists.txt, NetXDuo compiles and _nx_crypto_method_self_test() can be called and used.

bhnaphade commented 3 years ago

Thank you for the feedback. This file needs to be excluded. We will fix this in next release.

hwmaier commented 3 years ago

Yeah, I thought so too that this is some sort of left-over file. Came across it when I tried to test the crypto routines. I keep it excluded for now in my local repo. Thanks for checking.