Problems while compiling the project Hello_World

ThomasESP32
Posts: 229
Joined: Thu Jul 14, 2022 5:15 am

Problems while compiling the project Hello_World

Postby ThomasESP32 » Mon Jan 16, 2023 9:35 am

Good morning,


Using ESP-IDF, I created a new project based on the Hello_World example project.
I gave it a name different from "Hello_World".

Unfortunately, I get the following errors when I compile it :

- Symbol 'CHIP_FEATURE_BLE" could not be resolved.
- Symbol 'CHIP_FEATURE_BT' could not be resolved.
- Symbol 'CHIP_FEATURE_EMB_FLASH' could not be resolved.

However, these values are defined in "esp_chip_info.h" and this file is correctly included at the beginning of the main file.

Could you please explain me how to resolve these inclusion problems ?

Best regards,

Thomas TRUILHE

ThomasESP32
Posts: 229
Joined: Thu Jul 14, 2022 5:15 am

Re: Problems while compiling the project Hello_World

Postby ThomasESP32 » Mon Jan 16, 2023 10:37 am

I tried to create the "Hello_World" example program again and I get more errors now :

Field 'cores' could not be resolved hello_world_main.c /hello_world/main line 24 Semantic Error
Field 'features' could not be resolved hello_world_main.c /hello_world/main line 25 Semantic Error
Field 'features' could not be resolved hello_world_main.c /hello_world/main line 26 Semantic Error
Field 'features' could not be resolved hello_world_main.c /hello_world/main line 37 Semantic Error
Field 'revision' could not be resolved hello_world_main.c /hello_world/main line 28 Semantic Error
Field 'revision' could not be resolved hello_world_main.c /hello_world/main line 29 Semantic Error
Symbol 'CHIP_FEATURE_BLE' could not be resolved hello_world_main.c /hello_world/main line 26 Semantic Error
Symbol 'CHIP_FEATURE_BT' could not be resolved hello_world_main.c /hello_world/main line 25 Semantic Error
Symbol 'CHIP_FEATURE_EMB_FLASH' could not be resolved hello_world_main.c /hello_world/main line 37 Semantic Error
Symbol 'ESP_OK' could not be resolved hello_world_main.c /hello_world/main line 31 Semantic Error
Symbol 'NULL' could not be resolved hello_world_main.c /hello_world/main line 31 Semantic Error
Symbol 'portTICK_PERIOD_MS' could not be resolved hello_world_main.c /hello_world/main line 43 Semantic Error
Symbol 'stdout' could not be resolved hello_world_main.c /hello_world/main line 46 Semantic Error
Type 'esp_chip_info_t' could not be resolved hello_world_main.c /hello_world/main line 19 Semantic Error
Type 'uint32_t' could not be resolved hello_world_main.c /hello_world/main line 20 Semantic Error

Moreover I have a lot of unresolved inclusion :

Unresolved inclusion: esp_chip_info.h
Unresolved inclusion: esp_flash.h
Unresolved inclusion: freertos/FreeRTOS.h
Unresolved inclusion: freertos/task.h
Unresolved inclusion: stdio.h

However, if I create the blink project, these inclusions are resolved normally without any problem.
Is it possible that the include path for these file are not set correctly in the hello_world project ?
Where are the include folders located in a project (Under ESP-IDF) ?? How can we add new include folders if needed ?

Best regards,

Thomas TRUILHE

ThomasESP32
Posts: 229
Joined: Thu Jul 14, 2022 5:15 am

Re: Problems while compiling the project Hello_World

Postby ThomasESP32 » Mon Jan 16, 2023 11:03 am

I tried to create the "Hello_World" example program again and I get more errors now :

Field 'cores' could not be resolved hello_world_main.c /hello_world/main line 24 Semantic Error
Field 'features' could not be resolved hello_world_main.c /hello_world/main line 25 Semantic Error
Field 'features' could not be resolved hello_world_main.c /hello_world/main line 26 Semantic Error
Field 'features' could not be resolved hello_world_main.c /hello_world/main line 37 Semantic Error
Field 'revision' could not be resolved hello_world_main.c /hello_world/main line 28 Semantic Error
Field 'revision' could not be resolved hello_world_main.c /hello_world/main line 29 Semantic Error
Symbol 'CHIP_FEATURE_BLE' could not be resolved hello_world_main.c /hello_world/main line 26 Semantic Error
Symbol 'CHIP_FEATURE_BT' could not be resolved hello_world_main.c /hello_world/main line 25 Semantic Error
Symbol 'CHIP_FEATURE_EMB_FLASH' could not be resolved hello_world_main.c /hello_world/main line 37 Semantic Error
Symbol 'ESP_OK' could not be resolved hello_world_main.c /hello_world/main line 31 Semantic Error
Symbol 'NULL' could not be resolved hello_world_main.c /hello_world/main line 31 Semantic Error
Symbol 'portTICK_PERIOD_MS' could not be resolved hello_world_main.c /hello_world/main line 43 Semantic Error
Symbol 'stdout' could not be resolved hello_world_main.c /hello_world/main line 46 Semantic Error
Type 'esp_chip_info_t' could not be resolved hello_world_main.c /hello_world/main line 19 Semantic Error
Type 'uint32_t' could not be resolved hello_world_main.c /hello_world/main line 20 Semantic Error

Moreover I have a lot of unresolved inclusion :

Unresolved inclusion: esp_chip_info.h
Unresolved inclusion: esp_flash.h
Unresolved inclusion: freertos/FreeRTOS.h
Unresolved inclusion: freertos/task.h
Unresolved inclusion: stdio.h

However, if I create the blink project, these inclusions are resolved normally without any problem.
Is it possible that the include path for these file are not set correctly in the hello_world project ?
Where are the include folders located in a project (Under ESP-IDF) ?? How can we add new include folders if needed ?

Best regards,

Thomas TRUILHE

ThomasESP32
Posts: 229
Joined: Thu Jul 14, 2022 5:15 am

Re: Problems while compiling the project Hello_World

Postby ThomasESP32 » Mon Jan 16, 2023 11:05 am

I get the same problem when I create a new project without using an Example project.
In the main.c file that has been created, a see Unresolved inclusion problems with the "standard" files :

#include "stdio.h"
#include <stdbool.h>
#include <unistd.h>

So I can't compile normally the project that I juste created.
How can I resolve these kind of problem please ?

Best regards,

Thomas TRUILHE

ghost07
Posts: 36
Joined: Mon Oct 03, 2022 11:47 am

Re: Problems while compiling the project Hello_World

Postby ghost07 » Mon Jan 16, 2023 4:02 pm

How are you building the project?
From command line using "idf.py build" command, or do you use some IDE (like VS Code) with ESP-IDF plugin?

Have you set target and run menuconfig?

Code: Select all

cd %userprofile%\esp\hello_world (Windows)
idf.py set-target esp32
idf.py menuconfig
Since I am new user, this reply will be probably sent to review before publishing, so it could be a little outdated before it gets published.

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

Re: Problems while compiling the project Hello_World

Postby mbratch » Mon Jan 16, 2023 8:45 pm

The only thing that could be deduced based upon this information so far is that your ESP-IDF environment isn't installed properly. It's impossible to determine more than that without knowing some fundamentals:

What platform are you using? (Windows or Linux)
What did you do to install the ESP-IDF environment?
What tools are you using to build (command line, Eclipse, VSCode...)?

yaconsult
Posts: 5
Joined: Tue Feb 21, 2023 2:06 am

Re: Problems while compiling the project Hello_World

Postby yaconsult » Tue Feb 21, 2023 3:18 am

I'm having this issue and am willing to provide details. I am running Espressif-IDE Version: 2.7.0 Build id: 20221110-1527 on fedora 37 with esp-idf-v5.0.1. I am using the example hello_world program created using the new project wizard. The program compiles and runs properly when building with either idf.py or Espressif-IDE.

The problem is that the following three symbols are not resolved in the IDE: CHIP_FEATURE_BT, CHIP_FEATURE_BLE, CHIP_FEATURE_EMB_FLASH, and they are flagged as errors. Again, the program builds, uploads, and runs correctly. The problem seems to be that the IDE is not finding the definitions so thinks they are not defined and marks them as errors.

I see that they are defined in:
./components/esp_hw_support/include/esp_chip_info.h
./examples/build_system/cmake/idf_as_lib/stubs/esp32/esp_chip_info.h

And esp_chip_info.h is included in the hello_word example program. So why does Espressif-IDE not find those macros?

andyw999
Posts: 3
Joined: Sun Feb 19, 2023 5:05 pm

Re: Problems while compiling the project Hello_World

Postby andyw999 » Tue Feb 21, 2023 10:25 am

Am also having this problem.

Symbol 'CHIP_FEATURE_BLE' could not be resolved
Symbol 'CHIP_FEATURE_BT' could not be resolved
Symbol 'CHIP_FEATURE_EMB_FLASH' could not be resolved

Espressif-IDE
Version: 2.8.1
Build id: 20230207-1119

It's a bit bad when it won't work 'out of the box''

Thanks

Andy.

yaconsult
Posts: 5
Joined: Tue Feb 21, 2023 2:06 am

Re: Problems while compiling the project Hello_World

Postby yaconsult » Sat Feb 25, 2023 3:57 am

Andy, please post if you find a solution, and I will do likewise. This is so frustrating - hitting a roadblock right at the start. I have done a lot of googling but haven't found anything pertinent yet.

Since the sample helloworld program compiles and runs properly on the esp32, it must be an issue with the syntax checker in the IDE but I don't know enough about eclipse to see what the problem is and I'm not familiar enough with the toolchain. The definitions for those macros are in the include files and found by the compiler but the syntax checker in eclipse isn't picking it up.

I did try one experiment. I tried using the Eclipse IDE for C/C++ Developers 2022-09 directly from eclipse and then installing the espressif toolchain from that but the results were the same as using the prepackaged espressif-IDE. And I am using esp-idf-v5.0.1.

andyw999
Posts: 3
Joined: Sun Feb 19, 2023 5:05 pm

Re: Problems while compiling the project Hello_World

Postby andyw999 » Sun Feb 26, 2023 1:29 pm

Of course I will let you know if I find a solution.

Sadly it is typical, nothing appears to be properly checked these days...

Who is online

Users browsing this forum: No registered users and 277 guests