Comments (9)
Taking a look. Getting my workspace setup for my mac. I'll reply when I have more information on your issue.
from amazon-freertos.
Some questions for you:
- How did you download the code? Did you check out aws/freertos from Github or did you use the AWS 'Device Software' page in the AWS console?
- Have you recursively checked out submodules? I checked out the code from the repo, synced my submodules, and am seeing the wifi_provisioning files under /vendors/espressif/esp-idf/components/wifi_provisioning/include/wifi_provisioning
- Have you tried building off of the existing BLE demo? You can select a demo following the instructions here
from amazon-freertos.
- How did you download the code? Did you check out aws/freertos from Github or did you use the AWS 'Device Software' page in the AWS console?
I checked it out it directly from the AWS github repo.
- Have you recursively checked out submodules? I checked out the code from the repo, synced my submodules, and am seeing the wifi_provisioning files under /vendors/espressif/esp-idf/components/wifi_provisioning/include/wifi_provisioning
It was recursively checked out. I can see the source. I just can’t reference certain files in the make process.
- Have you tried building off of the existing BLE demo? You can select a demo following the instructions here
Building individual demos works, but I need to combine features from multiple demos. That’s when I have problems.
from amazon-freertos.
Some further questions because I'm failing to set this up (or understand how it was setup).
You're directory structure looks something like the following, right?
|- CMakeLists.txt
|- src
| |- main.c
|- freertos (amazon-freertos clone)
| |-demos
| |-freertos-kernel
| |-(etc...)
Can you tell me more about how you've structured your project?
When I try this directory structure I'm greeted by 2 errors when I run cmake -B build -S .
This first error seems to stem from the fact that the IDF_PROJECT_EXECUTABLE
is being added as an executable both in this top level CMakeLists.txt of yours and in the esp32 board CMakeLists.txt found here.
CMake Error at amazon-freertos/vendors/espressif/boards/esp32/CMakeLists.txt:434 (add_executable):
add_executable cannot create target "afr_demo" because another target with
the same name already exists. The existing target is an executable created
in source directory "/Users/kstribrn/workspace/oncall". See documentation
for policy CMP0002 for more details.
Call Stack (most recent call first):
amazon-freertos/CMakeLists.txt:78 (include)
This second error might stem from the first one.
CMake Error at amazon-freertos/vendors/espressif/esp-idf/components/esp32/project_include.cmake:21 (message):
Internal error, toolchain has not been set correctly by project (or an
invalid CMakeCache.txt file has been generated somehow)
Call Stack (most recent call first):
amazon-freertos/vendors/espressif/esp-idf/tools/cmake/build.cmake:312 (include)
amazon-freertos/vendors/espressif/esp-idf/tools/cmake/build.cmake:457 (__build_process_project_includes)
amazon-freertos/vendors/espressif/boards/esp32/CMakeLists.txt:595 (idf_build_process)
amazon-freertos/CMakeLists.txt:78 (include)
from amazon-freertos.
from amazon-freertos.
I structured my project where the amazon-freertos repo is brought in a submodule. The reason is keep my code separate from the amazon repo. I structured it this way based on the ticket linked here.
I then added my individual components in its own directory with a CMakeLists.txt file to reference include and source directories.
from amazon-freertos.
Thanks for linking to the amazon-freertos-examples repo. I dug around a bit and think I found what might be the source of your issue - though I don't have the solution just yet.
amazon-freertos-examples submodules this commit of amazon-freertos which in turn submodules Espressif's esp-idf (this commit).
This is important as it's the esp-idf 'wifi_provisioning' component which includes the wifi_provisioning/* header files your build is failing to find - see the wifi_provisioning component Cmake. The AWS 'ble_wifi_provisioning' module from AFR does not include these headers (from what I'm seeing). The 'ble_wifi_provisioning' module comes from the c-sdk which is independent of platform - see this Cmake.
As for how to fix this - I'm still figuring this out. The esp-idf documentation suggests that this component is available and included by default but this is clearly not the case.
As for why I think the component is available, below are some snippets from building the tgsong/amazon-freertos-examples...
-- Building for target esp32
-- Component names: soc log heap freertos vfs newlib esp_ringbuf driver esp_event ethernet mbedtls micro-ecc efuse bootloader_support partition_table app_update spi_flash nvs_flash lwip tcpip_adapter xtensa-debug-module app_trace pthread smartconfig_ack wpa_supplicant espcoredump esp32 cxx foo amazon-freertos-common secure_sockets bootloader nimble bt console esp_adc_cal nghttp esp_http_server esptool_py expat wear_levelling sdmmc fatfs freemodbus idf_test json mdns openssl protobuf-c protocomm spiffs ulp wifi_provisioning
-- Component paths: [some paths redacted for brevity];/Users/kstribrn/amazon-freertos-examples/freertos/vendors/espressif/esp-idf/components/wifi_provisioning
...
...
.espressif/tools/xtensa-esp32-elf/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DAFR_ESP_LWIP -DESP_PLATFORM -DGCC_NOT_5_2_0=0 -DHAVE_CONFIG_H [some more removed stuff] -I/Users/kstribrn//amazon-freertos-examples/freertos/vendors/espressif/esp-idf/components/wifi_provisioning/include
from amazon-freertos.
Played around some more and found a couple work arounds...
The simplest for me was to change your imports from using a backslash to a forward slash. This should fix your build. From what I found backslash support is a per-compiler thing. The xtensa compiler might just not handle them as you expect.
#include "wifi_provisioning/manager.h"
#include "wifi_provisioning/wifi_config.h"
#include "wifi_provisioning/scheme_ble.h"
Now the more involved thing you can try if this doesn't work is to copy aws-freertos-examples/freertos/vendors/espressif/esp-idf/components/wifi_provisioning/include/wifi_provisioning/*
to a single level up (aka aws-freertos-examples/freertos/vendors/espressif/esp-idf/components/wifi_provisioning/include/*
). This results in two copies of the header files. You'll also need to modify your imports in main.c
to...
#include "manager.h"
#include "wifi_config.h"
//#include "scheme_ble.h" //commenting this out as the copy causes further path issues.
and build this. If this works but the forward slash didn't work then the issue could lie in the specific commit of esp-idf in Amazon FreeRTOS (though I'm doubtful of this).
from amazon-freertos.
I'm going to close this since there hasn't been further activity. Feel free to reopen this if your issue still exists.
from amazon-freertos.
Related Issues (20)
- [BUG] `CORE_MQTT_MUTUAL_AUTH` Demo: Failed to establish new connection HOT 5
- [BUG] pPublishInfo->payloadLength changes after call to sendPacket HOT 6
- [BUG] MbedTLS version not reflected within git modules. HOT 2
- [BUG] Array bound warning observed in iot_test_tcp.c HOT 2
- [General] Where is esp_hw_support component ? HOT 1
- [Feature Request] Allow to define custom 'help' command in freertos-cli HOT 2
- nvs_flash_init() panics HOT 1
- [BUG] Lacking a check for the return value of mbedtls_ssl_conf_own_cert() HOT 1
- [Feature Request] Update submodule "vendors/espressif/esp-idf" to release/v4.4 of esp-afr-sdk HOT 2
- [General] Cannot use Bluedroid, NVS crashes/panics HOT 15
- [General] BLE service to leverage IOT BLE data transfer service HOT 1
- ESP32 compiled binary shows absolute file path when walked through using binwalk HOT 6
- [General] STM32L4 discovary board AWS IoT Tera Term Error HOT 5
- [BUG] ESP32 Port SPI Error with S3 HOT 2
- [BUG] Trace output of ESP32-DevKitC jobs demo is clobbered HOT 2
- [General] Ethernet AWS MQTT DNS Network Error HOT 4
- [General] Is there a reason, why there is almost two months no merge in main? HOT 5
- [General] ESP32S3 OTA fails due to not multiple of 16 bytes
- [General] esp_ota_begin fails in simple example HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-freertos.