Page 1 of 1

unable to build using arduino-esp32 as a component in esp-idf project

Posted: Thu Sep 07, 2017 10:52 am
by pataga
I followed the instructions at ... 4672128146
with a fresh copy of esp-idf. Made a copy of esp-idf-template, added the components directory and cloned esp32-arduino into /components/arduino.
Changed main/main.c to main.cpp with the following code

Code: Select all

#include "Arduino.h"

extern "C" void app_main(void)
	pinMode(4, OUTPUT);
    int level = 0;
	Serial.println("\r\ntest arduino");
    while (true) {
        digitalWrite(4, level);
        level = !level;
After running 'make menuconfig', 'make clean' and then 'make flash', I eventually get the following build error :

Code: Select all

CXX build/arduino/libraries/SD_MMC/src//SD_MMC.o
CXX build/arduino/libraries/SPI/src//SPI.o
CXX build/arduino/libraries/SimpleBLE/src//SimpleBLE.o
D:/espressif/esp32/arduesp/components/arduino/libraries/SimpleBLE/src/SimpleBLE.cpp:19:21: fatal error: bta_api.h: No such file or directory
compilation terminated.
make[1]: *** [/d/espressif/esp32/esp-idf/make/ libraries/SimpleBLE/src//SimpleBLE.o] Error 1
make: *** [d:/espressif/esp32/esp-idf/make/ component-arduino-build] Error 2