Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with GNU ARM Embedded 6 #23

Closed

Conversation

janjongboom
Copy link

These were the changes that I required to make cryptoauthlib compile on Mbed OS 5 with GNU ARM Embedded 6. I assume the struct names in atca_iface.h are not required. The change in atca_command.h was required because size_t was not defined.

@bryan-hunt
Copy link
Contributor

Out of curiosity what was your include order? We build on Linux platforms with gcc quite regularly (raspberry pi), yocto, etc.

@janjongboom
Copy link
Author

@bryan-hunt This is my include order:

"-I." "-I./mbed-cryptoauthlib" "-I./mbed-cryptoauthlib/cryptoauthlib" "-I./mbed-cryptoauthlib/cryptoauthlib/lib" "-I./mbed-cryptoauthlib/cryptoauthlib/lib/atcacert" "-I./mbed-cryptoauthlib/cryptoauthlib/lib/basic" "-I./mbed-cryptoauthlib/cryptoauthlib/lib/crypto" "-I./mbed-cryptoauthlib/cryptoauthlib/lib/crypto/hashes" "-I./mbed-cryptoauthlib/cryptoauthlib/lib/hal" "-I./mbed-cryptoauthlib/cryptoauthlib/lib/host" "-I./mbed-cryptoauthlib/cryptoauthlib/lib/jwt" "-I./mbed-cryptoauthlib/cryptoauthlib/test" "-I./mbed-cryptoauthlib/cryptoauthlib/test/atcacert" "-I./mbed-cryptoauthlib/cryptoauthlib/test/jwt" "-I./mbed-cryptoauthlib/cryptoauthlib/test/sha-byte-test-vectors" "-I./mbed-cryptoauthlib/mbed-cryptoauthlib" "-I./mbed-cryptoauthlib/source" "-I./mbed-os" "-I./mbed-os/cmsis" "-I./mbed-os/cmsis/TARGET_CORTEX_M" "-I./mbed-os/drivers" "-I./mbed-os/events" "-I./mbed-os/events/equeue" "-I./mbed-os/features" "-I./mbed-os/features/cellular" "-I./mbed-os/features/cellular/easy_cellular" "-I./mbed-os/features/cellular/framework" "-I./mbed-os/features/cellular/framework/API" "-I./mbed-os/features/cellular/framework/AT" "-I./mbed-os/features/cellular/framework/common" "-I./mbed-os/features/cellular/framework/targets" "-I./mbed-os/features/cellular/framework/targets/QUECTEL" "-I./mbed-os/features/cellular/framework/targets/QUECTEL/BC95" "-I./mbed-os/features/cellular/framework/targets/QUECTEL/BG96" "-I./mbed-os/features/cellular/framework/targets/QUECTEL/UG96" "-I./mbed-os/features/cellular/framework/targets/TELIT" "-I./mbed-os/features/cellular/framework/targets/TELIT/HE910" "-I./mbed-os/features/cellular/framework/targets/UBLOX" "-I./mbed-os/features/cellular/framework/targets/UBLOX/PPP""-I./mbed-os/features/cryptocell" "-I./mbed-os/features/device_key" "-I./mbed-os/features/device_key/source" "-I./mbed-os/features/filesystem" "-I./mbed-os/features/filesystem/bd" "-I./mbed-os/features/filesystem/fat" "-I./mbed-os/features/filesystem/fat/ChaN" "-I./mbed-os/features/filesystem/littlefs" "-I./mbed-os/features/filesystem/littlefs/littlefs" "-I./mbed-os/features/frameworks" "-I./mbed-os/features/frameworks/greentea-client" "-I./mbed-os/features/frameworks/greentea-client/greentea-client" "-I./mbed-os/features/frameworks/greentea-client/source" "-I./mbed-os/features/frameworks/mbed-client-randlib" "-I./mbed-os/features/frameworks/mbed-client-randlib/mbed-client-randlib" "-I./mbed-os/features/frameworks/mbed-client-randlib/mbed-client-randlib/platform" "-I./mbed-os/features/frameworks/mbed-client-randlib/source" "-I./mbed-os/features/frameworks/mbed-coap" "-I./mbed-os/features/frameworks/mbed-coap/doxygen" "-I./mbed-os/features/frameworks/mbed-coap/mbed-coap" "-I./mbed-os/features/frameworks/mbed-coap/source" "-I./mbed-os/features/frameworks/mbed-coap/source/include" "-I./mbed-os/features/frameworks/mbed-trace" "-I./mbed-os/features/frameworks/mbed-trace/mbed-trace" "-I./mbed-os/features/frameworks/mbed-trace/source" "-I./mbed-os/features/frameworks/nanostack-libservice" "-I./mbed-os/features/frameworks/nanostack-libservice/mbed-client-libservice" "-I./mbed-os/features/frameworks/nanostack-libservice/mbed-client-libservice/platform" "-I./mbed-os/features/frameworks/nanostack-libservice/source" "-I./mbed-os/features/frameworks/nanostack-libservice/source/IPv6_fcf_lib" "-I./mbed-os/features/frameworks/nanostack-libservice/source/libBits" "-I./mbed-os/features/frameworks/nanostack-libservice/source/libList" "-I./mbed-os/features/frameworks/nanostack-libservice/source/libTrace" "-I./mbed-os/features/frameworks/nanostack-libservice/source/libTrace/scripts" "-I./mbed-os/features/frameworks/nanostack-libservice/source/libip6string" "-I./mbed-os/features/frameworks/nanostack-libservice/source/nsdynmemLIB" "-I./mbed-os/features/frameworks/nanostack-libservice/source/nvmHelper" "-I./mbed-os/features/frameworks/utest" "-I./mbed-os/features/frameworks/utest/source" "-I./mbed-os/features/frameworks/utest/utest" "-I./mbed-os/features/lorawan" "-I./mbed-os/features/lorawan/lorastack" "-I./mbed-os/features/lorawan/lorastack/mac" "-I./mbed-os/features/lorawan/lorastack/phy" "-I./mbed-os/features/lorawan/system" "-I./mbed-os/features/mbedtls""-I./mbed-os/features/mbedtls/importer" "-I./mbed-os/features/mbedtls/inc" "-I./mbed-os/features/mbedtls/inc/mbedtls" "-I./mbed-os/features/mbedtls/platform" "-I./mbed-os/features/mbedtls/platform/inc" "-I./mbed-os/features/mbedtls/platform/src" "-I./mbed-os/features/mbedtls/src" "-I./mbed-os/features/mbedtls/targets" "-I./mbed-os/features/mbedtls/targets/TARGET_STM" "-I./mbed-os/features/mbedtls/targets/TARGET_STM/TARGET_STM32F4" "-I./mbed-os/features/nanostack" "-I./mbed-os/features/nanostack/coap-service" "-I./mbed-os/features/nanostack/coap-service/coap-service" "-I./mbed-os/features/nanostack/coap-service/source" "-I./mbed-os/features/nanostack/coap-service/source/include" "-I./mbed-os/features/nanostack/mbed-mesh-api" "-I./mbed-os/features/nanostack/mbed-mesh-api/mbed-mesh-api" "-I./mbed-os/features/nanostack/mbed-mesh-api/source" "-I./mbed-os/features/nanostack/mbed-mesh-api/source/include" "-I./mbed-os/features/nanostack/nanostack-hal-mbed-cmsis-rtos" "-I./mbed-os/features/nanostack/nanostack-hal-mbed-cmsis-rtos/cs_nvm" "-I./mbed-os/features/nanostack/nanostack-hal-mbed-cmsis-rtos/nvm" "-I./mbed-os/features/nanostack/nanostack-interface" "-I./mbed-os/features/nanostack/sal-stack-nanostack" "-I./mbed-os/features/nanostack/sal-stack-nanostack-eventloop" "-I./mbed-os/features/nanostack/sal-stack-nanostack-eventloop/nanostack-event-loop" "-I./mbed-os/features/nanostack/sal-stack-nanostack-eventloop/nanostack-event-loop/platform" "-I./mbed-os/features/nanostack/sal-stack-nanostack-eventloop/source" "-I./mbed-os/features/nanostack/sal-stack-nanostack/docs" "-I./mbed-os/features/nanostack/sal-stack-nanostack/docs/img" "-I./mbed-os/features/nanostack/sal-stack-nanostack/doxygen" "-I./mbed-os/features/nanostack/sal-stack-nanostack/nanostack" "-I./mbed-os/features/nanostack/sal-stack-nanostack/nanostack/platform" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Bootstraps" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Bootstraps/Generic" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Fragmentation" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/IPHC_Decode" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/MAC" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Mesh" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/ND" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/NVM" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Thread" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/BorderRouter" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Common_Protocols" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Core" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Core/include" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/DHCPv6_Server" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/MAC" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/MAC/IEEE802_15_4" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/MAC/ethernet" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/MAC/serial" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/MAC/virtual_rf" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/MLE" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/MPL" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/NWK_INTERFACE" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/NWK_INTERFACE/Include" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/RPL" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Security" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Security/Common" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Security/PANA" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Security/TLS" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/CCM_lib" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/CCM_lib/mbedOS" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/Neighbor_cache" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/SHA256_Lib" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/Trickle" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/blacklist" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/etx" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/fhss" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/fnv_hash" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/load_balance" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/port" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/port/compiler" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/port/cpu" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/services" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/services/dns" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/services/mdns" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/services/poll" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/services/serial" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/mle_service" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/nd_proxy" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/pan_blacklist" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/utils" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/Service_Libs/whiteboard" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/configs" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/configs/base" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/ipv6_stack" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/libDHCPv6" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/libNET" "-I./mbed-os/features/nanostack/sal-stack-nanostack/source/libNET/src" "-I./mbed-os/features/nanostack/targets" "-I./mbed-os/features/netsocket" "-I./mbed-os/features/netsocket/cellular" "-I./mbed-os/features/netsocket/cellular/generic_modem_driver" "-I./mbed-os/features/netsocket/emac-drivers" "-I./mbed-os/features/nvstore" "-I./mbed-os/features/nvstore/source" "-I./mbed-os/features/storage" "-I./mbed-os/hal" "-I./mbed-os/hal/storage_abstraction" "-I./mbed-os/platform" "-I./mbed-os/rtos" "-I./mbed-os/rtos/TARGET_CORTEX" "-I./mbed-os/rtos/TARGET_CORTEX/TARGET_CORTEX_M" "-I./mbed-os/rtos/TARGET_CORTEX/TARGET_CORTEX_M/TOOLCHAIN_GCC" "-I./mbed-os/rtos/TARGET_CORTEX/rtx4" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5/Include" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Config" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Include" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_RTOS_M4_M7" "-I./mbed-os/rtos/TARGET_CORTEX/rtx5/Source" "-I./mbed-os/targets" "-I./mbed-os/targets/TARGET_STM" "-I./mbed-os/targets/TARGET_STM/TARGET_STM32F4" "-I./mbed-os/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH" "-I./mbed-os/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH" "-I./mbed-os/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/device" "-I./mbed-os/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/device/TOOLCHAIN_GCC_ARM" "-I./mbed-os/targets/TARGET_STM/TARGET_STM32F4/device" "-I/Users/janjon01/repos/mbed-os-example-cryptoauthlib/mbed-os/BUILD" "-I/Users/janjon01/repos/mbed-os-example-cryptoauthlib/mbed-os/features/unsupported/tests/mbed" "-I/Users/janjon01/repos/mbed-os-example-cryptoauthlib/mbed-os/features/unsupported/tests/mbed/env"

@henri62
Copy link

henri62 commented Oct 4, 2019

I encountered a similar problem, in my case I use a yocto project that uses the "arm-poky-linux-gnueabi-g++ (GCC) 7.3.0" compiler and this returns the next error:
...../usr/include/cryptoauthlib/atca_iface.h:74:16: error: ‘struct::::ATCAI2C’ invalid; an anonymous union can only have non-static data members [-fpermissive]
struct ATCAI2C
Removing all the struct names in atca_iface.h solved the issue too.

@bryan-hunt bryan-hunt closed this Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants