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

In 'secure_boot.h' a 'extern "C" {' statement is missing a closing '}' resulting in failed compilation esp-idf-v4.1 (IDFGH-3998) #5878

Closed
GuyMinibrew opened this issue Sep 17, 2020 · 1 comment

Comments

@GuyMinibrew
Copy link

GuyMinibrew commented Sep 17, 2020

Environment

  • Development Kit: [none]
  • Kit version (for WroverKit/PicoKit/DevKitC): [v4]
  • Module or chip used: [ESP32]
  • IDF version (run git describe --tags to find it): v4.1-273-g94cb7e8b8
  • Build System: [idf.py]
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it): xtensa-esp32-elf-gcc (crosstool-NG esp-2019r2) 8.2.0
  • Operating System: [macOS]
  • Using an IDE?: [No]
  • Power Supply: [5V]

Problem Description

Quite simply, on commit: 60fed38

File path:
esp-idf/components/esp_rom/include/esp32/rom/secure_boot.h

This statement was deleted:
_#ifdef _cplusplus
}
#endif

But this statement still remains unchanged:
_#ifdef _cplusplus
extern "C" {
#endif

This results in missing "}" clause, causing havoc if secure boot is used in ESP-IDF-v4.
See compilation output below.

Expected Behavior

Compilation successful.

Actual Behavior

Compilation fails.

Steps to reproduce

Compile with secure boot enabled and include <esp_secure_boot.h>

Debug Logs

../main/Machine.cpp:1538:1: error: expected '}' at end of input
 }
 ^
In file included from ../esp/esp-idf/components/bootloader_support/include/esp_secure_boot.h:25,
                 from ../main/Machine.cpp:34:
../esp/esp-idf/components/esp_rom/include/esp32/rom/secure_boot.h:23:12: note: to match this '{'
 extern "C" {
            ^
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

@github-actions github-actions bot changed the title In 'secure_boot.h' a 'extern "C" {' statement is missing a closing '}' resulting in failed compilation esp-idf-v4.1 In 'secure_boot.h' a 'extern "C" {' statement is missing a closing '}' resulting in failed compilation esp-idf-v4.1 (IDFGH-3998) Sep 17, 2020
@Alvin1Zhang
Copy link
Collaborator

Thanks for reporting, we will look into.

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

No branches or pull requests

2 participants