{"action":"created","issue":{"url":"https://api.github.com/repos/aws/amazon-freertos/issues/1652","repository_url":"https://api.github.com/repos/aws/amazon-freertos","labels_url":"https://api.github.com/repos/aws/amazon-freertos/issues/1652/labels{/name}","comments_url":"https://api.github.com/repos/aws/amazon-freertos/issues/1652/comments","events_url":"https://api.github.com/repos/aws/amazon-freertos/issues/1652/events","html_url":"https://github.com/aws/amazon-freertos/issues/1652","id":541185648,"node_id":"MDU6SXNzdWU1NDExODU2NDg=","number":1652,"title":"AFR as component esp32","user":{"login":"chegewara","id":1406020,"node_id":"MDQ6VXNlcjE0MDYwMjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1406020?v=4","gravatar_id":"","url":"https://api.github.com/users/chegewara","html_url":"https://github.com/chegewara","followers_url":"https://api.github.com/users/chegewara/followers","following_url":"https://api.github.com/users/chegewara/following{/other_user}","gists_url":"https://api.github.com/users/chegewara/gists{/gist_id}","starred_url":"https://api.github.com/users/chegewara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chegewara/subscriptions","organizations_url":"https://api.github.com/users/chegewara/orgs","repos_url":"https://api.github.com/users/chegewara/repos","events_url":"https://api.github.com/users/chegewara/events{/privacy}","received_events_url":"https://api.github.com/users/chegewara/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"tgsong","id":33439345,"node_id":"MDQ6VXNlcjMzNDM5MzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/33439345?v=4","gravatar_id":"","url":"https://api.github.com/users/tgsong","html_url":"https://github.com/tgsong","followers_url":"https://api.github.com/users/tgsong/followers","following_url":"https://api.github.com/users/tgsong/following{/other_user}","gists_url":"https://api.github.com/users/tgsong/gists{/gist_id}","starred_url":"https://api.github.com/users/tgsong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgsong/subscriptions","organizations_url":"https://api.github.com/users/tgsong/orgs","repos_url":"https://api.github.com/users/tgsong/repos","events_url":"https://api.github.com/users/tgsong/events{/privacy}","received_events_url":"https://api.github.com/users/tgsong/received_events","type":"User","site_admin":false},"assignees":[{"login":"tgsong","id":33439345,"node_id":"MDQ6VXNlcjMzNDM5MzQ1","avatar_url":"https://avatars2.githubusercontent.com/u/33439345?v=4","gravatar_id":"","url":"https://api.github.com/users/tgsong","html_url":"https://github.com/tgsong","followers_url":"https://api.github.com/users/tgsong/followers","following_url":"https://api.github.com/users/tgsong/following{/other_user}","gists_url":"https://api.github.com/users/tgsong/gists{/gist_id}","starred_url":"https://api.github.com/users/tgsong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgsong/subscriptions","organizations_url":"https://api.github.com/users/tgsong/orgs","repos_url":"https://api.github.com/users/tgsong/repos","events_url":"https://api.github.com/users/tgsong/events{/privacy}","received_events_url":"https://api.github.com/users/tgsong/received_events","type":"User","site_admin":false}],"milestone":null,"comments":26,"created_at":"2019-12-20T20:30:05Z","updated_at":"2019-12-27T02:58:32Z","closed_at":null,"author_association":"NONE","body":"With easy to setup project thanks to this docs https://docs.aws.amazon.com/freertos/latest/userguide/getting_started_espressif.html#getting_started_espressif_cmake_project i am trying to start with hello-world example from esp-idf. Project is simple so preparing CMakeLists.txt should be easy:\r\n```\r\n# The following lines of boilerplate have to be in your project's\r\n# CMakeLists in this exact order for cmake to work correctly\r\ncmake_minimum_required(VERSION 3.13)\r\n\r\n# include($ENV{IDF_PATH}/tools/cmake/project.cmake)\r\nproject(hello-world)\r\n\r\nadd_executable(my_app main/main.c)\r\n\r\n# Tell IDF build to link against this target.\r\nset(IDF_PROJECT_EXECUTABLE my_app)\r\n\r\n\r\n\r\n\r\n# Override the configurations for Amazon FreeRTOS.\r\ninclude_directories(BEFORE amazon-freertos-configs)\r\n\r\n# Add amazon freertos as a subdirectory. AFR_BOARD tells which board to target.\r\nset(AFR_BOARD espressif.esp32_devkitc CACHE INTERNAL \"\")\r\nadd_subdirectory(amazon-freertos)\r\n\r\n# Link against the mqtt library so that we can use it. Dependencies are transitively\r\n# linked.\r\ntarget_link_libraries(my_app PRIVATE AFR::mqtt)\r\n```\r\nbut im getting error:\r\n```\r\nLoading defaults file /home/chegewara/demos/afr-submodule/hello_world/build/sdkconfig.defaults...\r\n-- IDF_VER: v3.3-163-g601a03e\r\nCMake Error: File /home/chegewara/demos/afr-submodule/hello_world/.git/packed-refs does not exist.\r\nCMake Error at build/amazon-freertos/CMakeFiles/git-data/grabRef.cmake:27 (configure_file):\r\n  configure_file Problem configuring file\r\nCall Stack (most recent call first):\r\n  amazon-freertos/vendors/espressif/esp-idf/tools/cmake/third_party/GetGitRevisionDescription.cmake:80 (include)\r\n  amazon-freertos/vendors/espressif/esp-idf/tools/cmake/third_party/GetGitRevisionDescription.cmake:90 (get_git_head_revision)\r\n  amazon-freertos/vendors/espressif/esp-idf/tools/cmake/idf_functions.cmake:253 (git_describe)\r\n  amazon-freertos/vendors/espressif/esp-idf/tools/cmake/idf_functions.cmake:384 (app_get_revision)\r\n  amazon-freertos/vendors/espressif/boards/esp32/CMakeLists.txt:433 (idf_import_components)\r\n  amazon-freertos/CMakeLists.txt:49 (include)\r\n\r\n\r\nCMake Error at build/amazon-freertos/CMakeFiles/git-data/grabRef.cmake:28 (file):\r\n  file failed to open for reading (No such file or directory):\r\n\r\n    /home/chegewara/demos/afr-submodule/hello_world/build/amazon-freertos/CMakeFiles/git-data/packed-refs\r\nCall Stack (most recent call first):\r\n  amazon-freertos/vendors/espressif/esp-idf/tools/cmake/third_party/GetGitRevisionDescription.cmake:80 (include)\r\n  amazon-freertos/vendors/espressif/esp-idf/tools/cmake/third_party/GetGitRevisionDescription.cmake:90 (get_git_head_revision)\r\n  amazon-freertos/vendors/espressif/esp-idf/tools/cmake/idf_functions.cmake:253 (git_describe)\r\n  amazon-freertos/vendors/espressif/esp-idf/tools/cmake/idf_functions.cmake:384 (app_get_revision)\r\n  amazon-freertos/vendors/espressif/boards/esp32/CMakeLists.txt:433 (idf_import_components)\r\n  amazon-freertos/CMakeLists.txt:49 (include)\r\n\r\n\r\n-- Project is not inside a git repository,                         will not use 'git describe' to determine PROJECT_VER.\r\n-- Project version: 1\r\n-- Adding linker script /home/chegewara/demos/afr-submodule/hello_world/build/amazon-freertos/esp-idf/esp32/esp32_out.ld\r\n-- Adding linker script /home/chegewara/demos/afr-submodule/hello_world/amazon-freertos/vendors/espressif/esp-idf/components/esp32/ld/esp32.rom.ld\r\n-- Adding linker script /home/chegewara/demos/afr-submodule/hello_world/amazon-freertos/vendors/espressif/esp-idf/components/esp32/ld/esp32.peripherals.ld\r\n-- Adding linker script /home/chegewara/demos/afr-submodule/hello_world/amazon-freertos/vendors/espressif/esp-idf/components/esp32/ld/esp32.rom.libgcc.ld\r\n-- Adding linker script /home/chegewara/demos/afr-submodule/hello_world/amazon-freertos/vendors/espressif/esp-idf/components/esp32/ld/esp32.rom.spiram_incompatible_fns.ld\r\n-- Component libraries: \r\n=========================Resolving dependencies==========================\r\nmodule disabled: posix\r\nreason:          posix::mcu_port is not defined by vendor.\r\ndependency path: posix->posix::mcu_port\r\n\r\n\r\n====================Configuration for Amazon FreeRTOS====================\r\n  Version:                 201912.00\r\n  Git version:             201912.00\r\n\r\nTarget microcontroller:\r\n  vendor:                  Espressif\r\n  board:                   ESP32-DevKitC\r\n  description:             Development board produced by Espressif that comes in two \r\n                           variants either with ESP-WROOM-32 or ESP32-WROVER module\r\n  family:                  ESP32\r\n  data ram size:           520KB\r\n  program memory size:     4MB\r\n\r\nHost platform:\r\n  OS:                      Linux-4.15.0-72-generic\r\n  Toolchain:               xtensa-esp32\r\n  Toolchain path:          /home/chegewara/esp/xtensa-esp32-elf\r\n  CMake generator:         Ninja\r\n\r\nAmazon FreeRTOS modules:\r\n  Modules to build:        ble, ble_hal, ble_wifi_provisioning, common, crypto, defender, \r\n                           dev_mode_key_provisioning, freertos_plus_tcp, greengrass, \r\n                           https, kernel, mqtt, ota, pkcs11, pkcs11_implementation, \r\n                           platform, secure_sockets, serializer, shadow, tls, wifi\r\n  Enabled by user:         ble, ble_hal, ble_wifi_provisioning, defender, greengrass, \r\n                           https, mqtt, ota, pkcs11, pkcs11_implementation, platform, \r\n                           secure_sockets, shadow, wifi\r\n  Enabled by dependency:   common, crypto, demo_base, dev_mode_key_provisioning, \r\n                           freertos, freertos_plus_tcp, kernel, ota_http, ota_mqtt, \r\n                           pkcs11_mbedtls, secure_sockets_freertos_plus_tcp, serializer, \r\n                           tls, utils\r\n  3rdparty dependencies:   http_parser, jsmn, mbedtls, pkcs11, tinycbor\r\n  Available demos:         demo_ble, demo_ble_numeric_comparison, demo_defender, \r\n                           demo_greengrass_connectivity, demo_https, demo_mqtt, demo_ota, \r\n                           demo_shadow, demo_tcp, demo_wifi_provisioning\r\n  Available tests:         \r\n=========================================================================\r\n\r\n-- Configuring incomplete, errors occurred!\r\nSee also \"/home/chegewara/demos/afr-submodule/hello_world/build/CMakeFiles/CMakeOutput.log\".\r\nSee also \"/home/chegewara/demos/afr-submodule/hello_world/build/CMakeFiles/CMakeError.log\".\r\n```"},"comment":{"url":"https://api.github.com/repos/aws/amazon-freertos/issues/comments/569173563","html_url":"https://github.com/aws/amazon-freertos/issues/1652#issuecomment-569173563","issue_url":"https://api.github.com/repos/aws/amazon-freertos/issues/1652","id":569173563,"node_id":"MDEyOklzc3VlQ29tbWVudDU2OTE3MzU2Mw==","user":{"login":"chegewara","id":1406020,"node_id":"MDQ6VXNlcjE0MDYwMjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1406020?v=4","gravatar_id":"","url":"https://api.github.com/users/chegewara","html_url":"https://github.com/chegewara","followers_url":"https://api.github.com/users/chegewara/followers","following_url":"https://api.github.com/users/chegewara/following{/other_user}","gists_url":"https://api.github.com/users/chegewara/gists{/gist_id}","starred_url":"https://api.github.com/users/chegewara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chegewara/subscriptions","organizations_url":"https://api.github.com/users/chegewara/orgs","repos_url":"https://api.github.com/users/chegewara/repos","events_url":"https://api.github.com/users/chegewara/events{/privacy}","received_events_url":"https://api.github.com/users/chegewara/received_events","type":"User","site_admin":false},"created_at":"2019-12-27T02:58:32Z","updated_at":"2019-12-27T02:58:32Z","author_association":"NONE","body":"Thanks, i hope this will help others with AFR as component.\r\n\r\nWith your help I fixed almost all issues i have. What can you tell about that one:\r\n```\r\n[7/107] Building C object amazon-freertos/esp-idf/stockd_m5stack/CMakeFiles/idf_comp..._/__/amazon-freertos/libraries/freertos_plus/aws/ota/src/http/aws_iot_ota_http.c.ob\r\nFAILED: amazon-freertos/esp-idf/stockd_m5stack/CMakeFiles/idf_component_stockd_m5stack.dir/__/__/amazon-freertos/libraries/freertos_plus/aws/ota/src/http/aws_iot_ota_http.c.obj \r\n/home/chegewara/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DESP_PLATFORM -DGCC_NOT_5_2_0=0 -DHAVE_CONFIG_H -DIDF_VER=\\\"v3.3-163-g601a03e\\\" -DMBEDTLS_CONFIG_FILE=\\\"/home/chegewara/demos/afr-submodule/hello_world/amazon-freertos/vendors/espressif/boards/esp32/components/mbedtls/port/include/mbedtls/esp_config.h\\\" -I../aws-configs -I../components/stockd_m5stack/include -I../components/stockd_m5stack/example -Iconfig -I../amazon-freertos/vendors/espressif/esp-idf/components/nvs_flash/include -I../amazon-freertos/vendors/espressif/esp-idf/components/spi_flash/include -I../amazon-freertos/vendors/espressif/boards/esp32/components/mbedtls/port/include -I../amazon-freertos/libraries/3rdparty/mbedtls/include -I../amazon-freertos/libraries/3rdparty/mbedtls/include/mbedtls -I../amazon-freertos/libraries/abstractions/pkcs11/mbedtls -I../amazon-freertos/vendors/espressif/esp-idf/components/fatfs/src -I../amazon-freertos/vendors/espressif/esp-idf/components/wear_levelling/include -I../amazon-freertos/vendors/espressif/esp-idf/components/sdmmc/include -I../amazon-freertos/vendors/espressif/esp-idf/components/driver/include -I../amazon-freertos/vendors/espressif/esp-idf/components/esp_ringbuf/include -I../components/tft -I../components/spidriver -I../amazon-freertos/vendors/espressif/esp-idf/components/bt/include -I../amazon-freertos/vendors/espressif/esp-idf/components/bt/bluedroid/api/include/api -I../components/ws2812 -I../amazon-freertos/vendors/espressif/esp-idf/components/esp32/include -I../amazon-freertos/vendors/espressif/boards/esp32/components/freertos_tcpip/tcpip_adapter/include -I../amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include -I../amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/source/portable/Compiler/GCC -I../amazon-freertos/vendors/espressif/esp-idf/components/esp_event/include -I../amazon-freertos/vendors/espressif/esp-idf/components/log/include -I../amazon-freertos/vendors/espressif/esp-idf/components/efuse/include -I../amazon-freertos/vendors/espressif/esp-idf/components/efuse/esp32/include -I../amazon-freertos/vendors/espressif/esp-idf/components/newlib/platform_include -I../amazon-freertos/vendors/espressif/esp-idf/components/newlib/include -I../amazon-freertos/vendors/espressif/esp-idf/components/vfs/include -I../amazon-freertos/vendors/espressif/boards/esp32/components/freertos/include -I../amazon-freertos/freertos_kernel/include -I../amazon-freertos/freertos_kernel/portable/ThirdParty/GCC/Xtensa_ESP32/include -I../amazon-freertos/vendors/espressif/boards/esp32/aws_demos/config_files -I../amazon-freertos/vendors/espressif/esp-idf/components/heap/include -I../amazon-freertos/vendors/espressif/esp-idf/components/soc/esp32/include -I../amazon-freertos/vendors/espressif/esp-idf/components/soc/include -I../amazon-freertos/demos/include -I../amazon-freertos/demos/network_manager -I../amazon-freertos/vendors/espressif/esp-idf/components/app_update/include -I../amazon-freertos/vendors/espressif/esp-idf/components/bootloader_support/include -I../amazon-freertos/vendors/espressif/esp-idf/components/pthread/include -I../amazon-freertos/vendors/espressif/boards/esp32/components/freertos_tcpip/ethernet/include -I../amazon-freertos/vendors/espressif/boards/esp32/components/freertos_tcpip/smartconfig_ack/include -I../amazon-freertos/libraries/c_sdk/standard/common/include -I../amazon-freertos/libraries/abstractions/platform/include -I../amazon-freertos/libraries/abstractions/platform/freertos/include -I../amazon-freertos/libraries/abstractions/secure_sockets/include -I../amazon-freertos/libraries/c_sdk/standard/common/include/private -I../amazon-freertos/demos/dev_mode_key_provisioning/include -I../amazon-freertos/libraries/freertos_plus/standard/pkcs11/include -I../amazon-freertos/libraries/abstractions/pkcs11/include -I../amazon-freertos/libraries/freertos_plus/standard/utils/include -I../amazon-freertos/libraries/freertos_plus/standard/crypto/include -I../amazon-freertos/libraries/c_sdk/standard/ble/include -I../amazon-freertos/libraries/c_sdk/standard/serializer/include -I../amazon-freertos/libraries/3rdparty/tinycbor -I../amazon-freertos/libraries/abstractions/ble_hal/include -I../amazon-freertos/libraries/abstractions/wifi/include -I../amazon-freertos/libraries/c_sdk/standard/mqtt/include -I../amazon-freertos/libraries/c_sdk/standard/https/include -I../amazon-freertos/libraries/freertos_plus/aws/ota/include -I../amazon-freertos/libraries/c_sdk/aws/shadow/include -isystem ../amazon-freertos/libraries/3rdparty/pkcs11 -mlongcalls   -mlongcalls -Og -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -std=gnu99 -Wno-old-style-declaration -Wno-maybe-uninitialized -MD -MT amazon-freertos/esp-idf/stockd_m5stack/CMakeFiles/idf_component_stockd_m5stack.dir/__/__/amazon-freertos/libraries/freertos_plus/aws/ota/src/http/aws_iot_ota_http.c.obj -MF amazon-freertos/esp-idf/stockd_m5stack/CMakeFiles/idf_component_stockd_m5stack.dir/__/__/amazon-freertos/libraries/freertos_plus/aws/ota/src/http/aws_iot_ota_http.c.obj.d -o amazon-freertos/esp-idf/stockd_m5stack/CMakeFiles/idf_component_stockd_m5stack.dir/__/__/amazon-freertos/libraries/freertos_plus/aws/ota/src/http/aws_iot_ota_http.c.obj   -c ../amazon-freertos/libraries/freertos_plus/aws/ota/src/http/aws_iot_ota_http.c\r\n../amazon-freertos/libraries/freertos_plus/aws/ota/src/http/aws_iot_ota_http.c:43:40: fatal error: aws_iot_ota_agent_internal.h: No such file or directory\r\ncompilation terminated.\r\n[8/107] Building C object amazon-freertos/esp-idf/stockd_m5stack/CMakeFiles/idf_comp..._/__/amazon-freertos/libraries/freertos_plus/aws/ota/src/mqtt/aws_iot_ota_cbor.c.ob\r\nninja: build stopped: subcommand failed.```\r\n\r\nBTW i sent you invite to private repository"}}
{"actor":{"display_login":"chegewara"}}