_EXFUN not defined?

Hi,

I'm trying to compile hello-world for an esp32-wroom-32 board.

I installed the Mac homebrew version of the esp32 toolchain from https://github.com/tasanakorn/homebrew-esp32.

I also installed ESP-IDF as described at https://riot-os.org/api/group__cpu__esp32.html#esp32_manual_toolchain_installation.

In the hello-world Makefile, I changed the board from "native" (which doesn't build on Darwin, see https://github.com/RIOT-OS/RIOT/issues/10121) to "esp32-wroom-32".

I also added   ESP32_SDK_DIR ?= $(CURDIR)/../../../esp-idf which is where installed ESP-IDF.

Now, when I try and build, I get this:

examples/hello-world # make Warning: no PORT set! Building application "esp32-wroom-32" for "esp32-wroom-32" with MCU "esp32".

'/Users/lars/Documents/Code/riot/dist/tools/genconfigheader/genconfigheader.sh' -DDEVELHELP -Werror -DSCHED_PRIO_LEVELS=32 -DSDK_NOT_USED -DCONFIG_FREERTOS_UNICORE=1 -DESP_PLATFORM -DLOG_TAG_IN_BRACKETS -Wno-unused-parameter -Wformat=0 -mlongcalls -mtext-section-literals -fstrict-volatile-bitfields -fdata-sections -ffunction-sections -fzero-initialized-in-bss -Os -DFLASH_MODE_DOUT=1 -DFLASH_MODE_DOUT=1 -DFLASH_MODE_DOUT=1 -DFLASH_MODE_DOUT=1 -DRIOT_APPLICATION=\"esp32-wroom-32\" -DBOARD_ESP32_WROOM_32=\"esp32-wroom-32\" -DRIOT_BOARD=BOARD_ESP32_WROOM_32 -DCPU_ESP32=\"esp32\" -DRIOT_CPU=CPU_ESP32 -DMCU_ESP32=\"esp32\" -DRIOT_MCU=MCU_ESP32 -std=c99 -fno-common -Wall -Wextra -Wmissing-include-dirs -fno-delete-null-pointer-checks -fdiagnostics-color -Wstrict-prototypes -Wold-style-definition -Wformat=2 -DMODULE_AUTO_INIT -DMODULE_BOARD -DMODULE_BOARDS_COMMON_ESP32 -DMODULE_CORE -DMODULE_CORE_MSG -DMODULE_CPU -DMODULE_DIV -DMODULE_ESP_IDF -DMODULE_ESP_IDF_DRIVER -DMODULE_ESP_IDF_ESP32 -DMODULE_ESP_IDF_SOC -DMODULE_LOG -DMODULE_LUID -DMODULE_NEWLIB -DMODULE_NEWLIB_SYSCALLS_DEFAULT -DMODULE_PERIPH -DMODULE_PERIPH_ADC_CTRL -DMODULE_PERIPH_COMMON -DMODULE_PERIPH_CPUID -DMODULE_PERIPH_FLASH -DMODULE_PERIPH_GPIO -DMODULE_PERIPH_HWRNG -DMODULE_PERIPH_PM -DMODULE_PERIPH_RTC -DMODULE_PERIPH_TIMER -DMODULE_PERIPH_UART -DMODULE_PRNG -DMODULE_PRNG_TINYMT32 -DMODULE_RANDOM -DMODULE_RIOT_FREERTOS -DMODULE_STDIO_UART -DMODULE_SYS -DMODULE_TINYMT32 -DMODULE_XTENSA -DMODULE_XTIMER -DRIOT_VERSION=\"2019.10-devel-662-gc78ae\" \   > '/Users/lars/Documents/Code/riot/dist/tools/lazysponge/lazysponge.py' --verbose '/Users/lars/Documents/Code/riot/examples/hello-world/bin/esp32-wroom-32/riotbuild/riotbuild.h' Keeping old /Users/lars/Documents/Code/riot/examples/hello-world/bin/esp32-wroom-32/riotbuild/riotbuild.h (a28a689f75344d87871e868b103e4c64) DIRS=" " "make" -C /Users/lars/Documents/Code/riot/examples/hello-world -f /Users/lars/Documents/Code/riot/makefiles/application.inc.mk make[1]: Entering directory '/Users/lars/Documents/Code/riot/examples/hello-world' xtensa-esp32-elf-gcc \   -DRIOT_FILE_RELATIVE=\"examples/hello-world/main.c\" \   -DRIOT_FILE_NOPATH=\"main.c\" \   -Werror -Wno-unused-parameter -Wformat=0 -mlongcalls -mtext-section-literals -fstrict-volatile-bitfields -fdata-sections -ffunction-sections -fzero-initialized-in-bss -Os -std=c99 -fno-common -Wall -Wextra -Wmissing-include-dirs -fno-delete-null-pointer-checks -fdiagnostics-color -Wstrict-prototypes -Wold-style-definition -Wformat=2 -include '/Users/lars/Documents/Code/riot/examples/hello-world/bin/esp32-wroom-32/riotbuild/riotbuild.h' -I/Users/lars/Documents/Code/riot/core/include -I/Users/lars/Documents/Code/riot/drivers/include -I/Users/lars/Documents/Code/riot/sys/include -I/Users/lars/Documents/Code/riot/boards/esp32-wroom-32/include -I/Users/lars/Documents/Code/riot/cpu/esp32/include -I/Users/lars/Documents/Code/riot/cpu/esp_common/vendor/ -I/Users/lars/Documents/Code/riot/cpu/esp32/vendor/ -I/Users/lars/Documents/Code/riot/cpu/esp32/vendor/esp-idf/include -I/Users/lars/Documents/Code/riot/cpu/esp32/vendor/esp-idf/include/esp32 -I/Users/lars/Documents/Code/riot/cpu/esp32/vendor/esp-idf/include/heap -I/Users/lars/Documents/Code/riot/cpu/esp32/vendor/esp-idf/include/spi_flash -I/Users/lars/Documents/Code/riot/cpu/esp32/vendor/esp-idf/include/tcpip_adapter -I/Users/lars/Documents/Code/riot/examples/hello-world/../../../esp-idf/components/ -I/Users/lars/Documents/Code/riot/examples/hello-world/../../../esp-idf/components/driver/include -I/Users/lars/Documents/Code/riot/examples/hello-world/../../../esp-idf/components/esp32/include -I/Users/lars/Documents/Code/riot/examples/hello-world/../../../esp-idf/components/heap/include -I/Users/lars/Documents/Code/riot/examples/hello-world/../../../esp-idf/components/soc/esp32/include -I/Users/lars/Documents/Code/riot/examples/hello-world/../../../esp-idf/components/soc/include -I/Users/lars/Documents/Code/riot/boards/common/esp32/include -I/Users/lars/Documents/Code/riot/cpu/esp32 -I/Users/lars/Documents/Code/riot/sys/libc/include -MD -MP -c -o /Users/lars/Documents/Code/riot/examples/hello-world/bin/esp32-wroom-32/application_esp32-wroom-32/main.o /Users/lars/Documents/Code/riot/examples/hello-world/main.c In file included from /Users/lars/Documents/Code/riot/examples/hello-world/main.c:22: /Users/lars/Documents/Code/riot/cpu/esp32/include/stdio.h:177:23: error: expected ')' before '(' token FILE * _EXFUN(tmpfile, (void));                        ^~                        )

And a gazillion more errors due to the _EXFUN macro being undefined.

Any ideas?

Thanks, Lars

Can one of you spamming pricks get me off this mailing list please? Thank you. Anyone who want’s consultancy please come through my business channels with your budget.

Hi Rob,

Can one of you spamming pricks get me off this mailing list please? Thank you. Anyone who want's consultancy please come through my business channels with your budget.

I wonder if this method of acquiring customers works out.

Anyhow, here's a link with a button to unsubscribe:

https://lists.riot-os.org/mailman/listinfo/users

Kaspar

can you share makefile and code please ? I successfully run every examples for ESP32 and ESP8266 in Linux

Kaspar Schleiser <kaspar@schleiser.de>, 9 Eyl 2019 Pzt, 12:01 tarihinde şunu yazdı:

Hi,

The code is hello-world.c. The Makefile is below.

hello-world/main.c

Dear Lars, the only difference in my makefile is i didnt add SDK dir only added directory location to my .profile file. Moreover i use docker image to build. I also face with compability problem in Ubuntu 16.04 then i used 18.xx version then problem solved.

I dont know how it works in Mac, but these are my steps to run ESP32 in Linux.

9 Eyl 2019 Pzt 13:43 tarihinde Lars Eggert <lars@eggert.org> şunu yazdı:

The code is hello-world.c. The Makefile is below.

hello-world/main.c

Lars

APPLICATION = hello-world BOARD ?= esp32-wroom-32 RIOTBASE ?= $(CURDIR)/…/… ESP32_SDK_DIR ?= $(CURDIR)/…/…/…/esp-idf include $(RIOTBASE)/Makefile.include


users mailing list users@riot-os.org https://lists.riot-os.org/mailman/listinfo/users

9 Eyl 2019 Pzt 13:43 tarihinde Lars Eggert <lars@eggert.org> şunu yazdı:

Hi Lars

a “quick” work-around you could consider in parallel is building with Docker, as explained here https://github.com/RIOT-OS/RIOT/wiki/Use-Docker-to-build-RIOT

I’m told this works fine on OS X too, nowadays, including for esp32.

Would this help?

Best, Emmanuel

This should help: http://goatse.ru/

Now can one of you pricks pricks get me off this mailing list?

I granted him his kind and considerate request.

Hi,

a "quick" work-around you could consider in parallel is building with Docker, as explained here Use Docker to build RIOT · RIOT-OS/RIOT Wiki · GitHub

I'm told this works fine on OS X too, nowadays, including for esp32.

well, I can start the image, but the actual compile fails immediately:

# make BUILD_IN_DOCKER=1 Launching build container using image "riot/riotbuild:latest". docker run --rm -t -u "$(id -u)" \     -v '/private/var/db/timezone/tz/2019b.1.0/zoneinfo/Europe/Helsinki:/etc/localtime:ro' -v '/Users/lars/Documents/Code/riot:/data/riotbuild/riotbase' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -v '/Users/lars/Documents/Code/quant:/data/riotbuild/riotproject' -e 'RIOTPROJECT=/data/riotbuild/riotproject' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles' \      \     -w '/data/riotbuild/riotproject/riot/' \     'riot/riotbuild:latest' make docker: Error response from daemon: Mounts denied: The path /private/var/db/timezone/tz/2019b.1.0/zoneinfo/Europe/Helsinki is not shared from OS X and is not known to Docker. You can configure shared paths from Docker -> Preferences... -> File Sharing. See Change Docker Desktop settings on Mac | Docker Docs for more info. . ERRO[0000] error waiting for container: context canceled make: *** [/Users/lars/Documents/Code/riot/makefiles/docker.inc.mk:275: ..in-docker-container] Error 125

This seems related to After Docker upgrade - results in "The path /etc/localtime is not shared from OS X and is not known to Docker" · Issue #2396 · docker/for-mac · GitHub

Lars

And I can work around this by explicitly exporting /private/var/db/timezone/tz/, so I am good to go!

Thanks for the help, Lars

So is it working? I am also working on esp8266 and esp32 if you need help dont hesitate to ask.

Best regards

10 Eyl 2019 Sal 11:27 tarihinde Lars Eggert <lars@eggert.org> şunu yazdı: