GithubHelp home page GithubHelp logo

espressif / esp-idf Goto Github PK

View Code? Open in Web Editor NEW
13.2K 495.0 7.2K 284.89 MB

Espressif IoT Development Framework. Official development framework for Espressif SoCs.

License: Apache License 2.0

Shell 0.04% Python 2.07% Makefile 0.01% C 95.55% C++ 1.27% Assembly 0.32% CMake 0.69% Batchfile 0.01% Dockerfile 0.01% PowerShell 0.01% Nim 0.01% Roff 0.01% HTML 0.03%

esp-idf's Introduction

Espressif IoT Development Framework

ESP-IDF is the development framework for Espressif SoCs supported on Windows, Linux and macOS.

ESP-IDF Release Support Schedule

Support Schedule

ESP-IDF Release and SoC Compatibility

The following table shows ESP-IDF support of Espressif SoCs where alt text and alt text denote preview status and support, respectively. The preview support is usually limited in time and intended for beta versions of chips. Please use an ESP-IDF release where the desired SoC is already supported.

Chip v5.0 v5.1 v5.2 v5.3
ESP32 alt text alt text alt text alt text
ESP32-S2 alt text alt text alt text alt text
ESP32-C3 alt text alt text alt text alt text
ESP32-S3 alt text alt text alt text alt text Announcement
ESP32-C2 alt text alt text alt text alt text Announcement
ESP32-C6 alt text alt text alt text Announcement
ESP32-H2 alt text alt text alt text Announcement
ESP32-P4 alt text Announcement
ESP32-C5 alt text Announcement

There are variants of revisions for a series of chips. See Compatibility Between ESP-IDF Releases and Revisions of Espressif SoCs for the details of the compatibility between ESP-IDF and chip revisions.

Espressif SoCs released before 2016 (ESP8266 and ESP8285) are supported by RTOS SDK instead.

Developing With ESP-IDF

Setting Up ESP-IDF

See https://idf.espressif.com/ for links to detailed instructions on how to set up the ESP-IDF depending on chip you use.

Note: Each SoC series and each ESP-IDF release has its own documentation. Please see Section Versions on how to find documentation and how to checkout specific release of ESP-IDF.

Non-GitHub forks

ESP-IDF uses relative locations as its submodules URLs (.gitmodules). So they link to GitHub. If ESP-IDF is forked to a Git repository which is not on GitHub, you will need to run the script tools/set-submodules-to-github.sh after git clone.

The script sets absolute URLs for all submodules, allowing git submodule update --init --recursive to complete. If cloning ESP-IDF from GitHub, this step is not needed.

Finding a Project

As well as the esp-idf-template project mentioned in Getting Started, ESP-IDF comes with some example projects in the examples directory.

Once you've found the project you want to work with, change to its directory and you can configure and build it.

To start your own project based on an example, copy the example project directory outside of the ESP-IDF directory.

Quick Reference

See the Getting Started guide links above for a detailed setup guide. This is a quick reference for common commands when working with ESP-IDF projects:

Setup Build Environment

(See the Getting Started guide listed above for a full list of required steps with more details.)

  • Install host build dependencies mentioned in the Getting Started guide.
  • Run the install script to set up the build environment. The options include install.bat or install.ps1 for Windows, and install.sh or install.fish for Unix shells.
  • Run the export script on Windows (export.bat) or source it on Unix (source export.sh) in every shell environment before using ESP-IDF.

Configuring the Project

  • idf.py set-target <chip_name> sets the target of the project to <chip_name>. Run idf.py set-target without any arguments to see a list of supported targets.
  • idf.py menuconfig opens a text-based configuration menu where you can configure the project.

Compiling the Project

idf.py build

... will compile app, bootloader and generate a partition table based on the config.

Flashing the Project

When the build finishes, it will print a command line to use esptool.py to flash the chip. However you can also do this automatically by running:

idf.py -p PORT flash

Replace PORT with the name of your serial port (like COM3 on Windows, /dev/ttyUSB0 on Linux, or /dev/cu.usbserial-X on MacOS. If the -p option is left out, idf.py flash will try to flash the first available serial port.

This will flash the entire project (app, bootloader and partition table) to a new chip. The settings for serial port flashing can be configured with idf.py menuconfig.

You don't need to run idf.py build before running idf.py flash, idf.py flash will automatically rebuild anything which needs it.

Viewing Serial Output

The idf.py monitor target uses the esp-idf-monitor tool to display serial output from Espressif SoCs. esp-idf-monitor also has a range of features to decode crash output and interact with the device. Check the documentation page for details.

Exit the monitor by typing Ctrl-].

To build, flash and monitor output in one pass, you can run:

idf.py flash monitor

Compiling & Flashing Only the App

After the initial flash, you may just want to build and flash just your app, not the bootloader and partition table:

  • idf.py app - build just the app.
  • idf.py app-flash - flash just the app.

idf.py app-flash will automatically rebuild the app if any source files have changed.

(In normal development there's no downside to reflashing the bootloader and partition table each time, if they haven't changed.)

Erasing Flash

The idf.py flash target does not erase the entire flash contents. However it is sometimes useful to set the device back to a totally erased state, particularly when making partition table changes or OTA app updates. To erase the entire flash, run idf.py erase-flash.

This can be combined with other targets, ie idf.py -p PORT erase-flash flash will erase everything and then re-flash the new app, bootloader and partition table.

Resources

esp-idf's People

Contributors

0xjakob avatar adityahpatwardhan avatar antmak avatar david-cermak avatar dazza0 avatar dobairoland avatar esp-marius avatar esp-wzh avatar ginkgm avatar heyinling avatar hfudev avatar icarus113 avatar igrr avatar isl2017 avatar jack0c avatar konstantinkondrashov avatar krzychb avatar l-kaya avatar mahavirj avatar mythbuster5 avatar projectgus avatar rahult-github avatar renzbagaporo avatar songruo avatar spritetm avatar suda-morris avatar sudeep-mohanty avatar weijian-espressif avatar wmy-espressif avatar zikalino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp-idf's Issues

How to correctly init SPI on ESP32?

I'm trying to play a SPI LCD using ESP32. On ESP31B, I use these code below. But on ESP32, the spi_register.h is different form ESP31B, for example SPI_USR_MOSI_BITLEN_S is disappeared.

#define HSPI 2
void spi_init()
{
    //SPI clk = 40MHz
    WRITE_PERI_REG(SPI_CLOCK(HSPI), (0<<SPI_CLKDIV_PRE_S) |
        (1<<SPI_CLKCNT_N_S)|(1<<SPI_CLKCNT_L_S)|(0<<SPI_CLKCNT_H_S));
    WRITE_PERI_REG(SPI_CTRL(HSPI), 0);//SPI_WR_BIT_ORDER);
    WRITE_PERI_REG(SPI_USER(HSPI), SPI_CS_SETUP|SPI_CS_HOLD|SPI_USR_MOSI|SPI_WR_BYTE_ORDER);
    WRITE_PERI_REG(SPI_USER1(HSPI), (9<<SPI_USR_MOSI_BITLEN_S));
}

Is SPI_USR_MOSI_BITLEN_S in ESP31B equivalent to SPI_USR_MOSI_DBITLEN_S in ESP32 ? How to correctly init SPI on ESP32?

Thanks.

make menuconfig not work on macos sierra

the pre-installed package is below:

$ brew install gnu-sed gawk binutils gperf grep gettext ncurses
Warning: gnu-sed-4.2.2 already installed
Warning: gawk-4.1.3_1 already installed
Warning: binutils-2.27 already installed
Warning: homebrew/dupes/gperf-3.0.4 already installed
Warning: homebrew/dupes/grep-2.25 already installed
Warning: gettext-0.19.8.1 already installed
Warning: homebrew/dupes/ncurses-6.0_1 already installed
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
make menuconfig error: can't found ncurses!

$ make menuconfig

MAKEFLAGS=""
CC=cc LD=ld
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/mango/ESP32/IDF/esp-idf/tools/kconfig
lxdialog/check-lxdialog.sh -check cc -I/usr/local/opt/ncurses/include/ncurses -DCURSES_LOC="<ncurses.h>" -DLOCALE -lintl
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
*** Install ncurses (ncurses-devel) and try again.
make[1]: *** [dochecklxdialog] Error 1
make: *** [/Users/mango/ESP32/IDF/esp-idf/tools/kconfig/mconf] Error 2

Installation step 2: not a valid identifierline 89: export: `sha1

Hi Team,

Following Step 2: Getting the esp-idf repository from github of the installation process on Windows 7 x64, I got the following two messages regarding sha1 (at the end of the full log below):

$ git clone --recursive https://github.com/espressif/esp-idf.git
Cloning into 'esp-idf'...
remote: Counting objects: 3162, done.
remote: Total 3162 (delta 0), reused 0 (delta 0), pack-reused 3162
Receiving objects: 100% (3162/3162), 5.05 MiB | 1.03 MiB/s, done.
Resolving deltas: 100% (1695/1695), done.
Checking connectivity... done.
Submodule 'components/esp32/lib' (https://github.com/espressif/esp32-wifi-lib.git) registered for path 'components/esp32/lib'
Submodule 'components/esptool_py/esptool' (https://github.com/themadinventor/esptool.git) registered for path 'components/esptool_py/esptool'
Cloning into '/esp-idf/components/esp32/lib'...
Cloning into '/esp-idf/components/esptool_py/esptool'...
': not a valid identifierline 89: export: `sha1
': not a valid identifierline 89: export: `displaypath
Submodule path '': checked out '1303c92c1056b7f59b95360b58e70a21cb4a93e1'
': not a valid identifierline 89: export: `sha1
': not a valid identifierline 89: export: `displaypath
Submodule path '': checked out '7c84dd433512bac80e4c01c569e42b4fe76646a7'

I have tried this step twice with the same result.

The /esp-idf/components/esptool_py/esptool directory contains some files and sub directories.
I did not find any leads to this error on https://github.com/themadinventor/esptool repository.

Should I be concerned?

OSX build issue gperf unrecognized % directive

I'm trying to start a project based on the esp-idf-template

Unfortunately the configuration step fails.

✘-2 ~/Projects/shabadge/esp-eink [master|✚ 1] 
10:57 $ make menuconfig
MAKEFLAGS="" \
    CC=cc LD=ld \
    /Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/annejan/Projects/shabadge/esp-idf/tools/kconfig
sed -E "s/\r//" zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$' -p -t
(standard input):4: unrecognized % directive
make[1]: *** [zconf.hash.c] Error 1
make: *** [/Users/annejan/Projects/shabadge/esp-idf/tools/kconfig/mconf] Error 2

I'm using GNU gperf 3.0.4
Let me know if you require any more information .

Type inconsistency of SSID field

I'm not sure whether I should even be reporting this, but...

In esp_wifi_types.h the wifi_config_t construct takes an SSID of type char ssid[32]. However, all the WiFi events over in esp_events.h report the SSID of type uint8_t ssid[32]. This in turn quite easily leads to sign-related compiler warnings. It would be nice if all ssid instances were plain char ssid[32], or at least all agreed on the signedness of octets making up an SSID (I could definitely see an argument for making it uint8_t rather than char).

Replace portTICK_RATE_MS with portTICK_PERIOD_MS

In later FreeRTOS releases, the macro portTICK_RATE_MS was replaced with portTICK_PERIOD_MS. For backwards compatibility, both are supported but for "hygiene" we should replace portTICK_RATE_MS with portTICK_PERIOD_MS.

See:
https://sourceforge.net/p/freertos/discussion/382005/thread/2031678e/

for reference. This is another one of those tiny little things that I am writing about here only because I came across it during study and not because it is yet of any importance.

tcpip_adapter_dhcps_get_status doesn't seem to need an interface parameter.

I was studying the tcpip_adapter_dhcps_get_status() method and its first parameter is an interface. But I don't see that this is needed as the DHCP Server component is only applicable to an access point interface. If this is the case, might we consider removing the need for an interface parameter?

printf support for 64-bit integers (IDFGH-6993)

According to reports from our users, ESP32 continues to have the same problem with its build of Newlib as ESP8266 used to have: there is no support for printing floats or 64-bit ints.
Would it be possible to enable this support? It only takes 3 lines to enable the extra formats, but it makes life so much easier.
FWIW, some other vendors (e.g. TI) ship Newlib with this support on, and the manifestations of this bug are very nasty - no compiler errors or warnings, printf just prints garbage at runtime.

Hang on post-reset boot? (IDFGH-3516)

I first noticed this behavior on Arduino, but it also occurs with the template app. I almost don't believe this, but I've reproduced it too many times now.

Coming out of flashing the chip, when the reset button is pressed, the ESP32 doesn't seem to boot up right unless it's connected to a serial terminal.

Steps to recreate:

  1. Flash app-template (accepting all default options in menuconfig)
  2. Press reset button
  3. No blinking, no WiFi connection to network.
  4. Run terminal program
  5. Press reset
  6. Connects to network, LED blinks.

Pressing reset many times without connecting a terminal program has no effect. Powering the chip down and back up, however, makes it work regardless.

Just for fun, because I can't believe this issue, I attached a battery, flashed the firmware, pulled the USB cord, hit reset (nothing), re-attached the USB (nothing), and then opened up a serial terminal and hit reset. Everything worked as it should.

It seems to be related to the up-from-reset flag and serial. Though how the chip knows that I'm listening to it is beyond me. Is there something in the configs that's halting on a test for a serial terminal? How would it know?

Hardware is a WROOM dev board, esp-idf is all current as of today with a git pull --recurse-submodules.

Guru Meditation Error

I just got my Demo board today and followed the steps in this excellent readme.

This part regarding selecting serial port worked well.
ady_2016-sep-02

make flash didn't work a couple of times, but then is suddenly worked and finished correctly

ady_2016-sep-02 2

After that when I reboot the board and look at the serial trace, looks like the chip keep rebooting. Here's the trace

+.@ 0.@ÿÿ?³..Initializing heap allocator:
Region 19: 3FFC0998 len 0001F668 tag 0
Region 25: 3FFE8000 len 00018000 tag 1
Pro cpu up.
Pro cpu start user code
erase sector 5
erase sector 6
erase sector 7
nvs_flash_init
misc_nvs_init g_misc_nvs=0x3ffc0b04
/Users/adityatannu/Developer/esp-idf/components/freertos/./tasks.c:601 (xTaskGenericCreate)- assert failed!
Guru Meditation Error: Core   0 panic'ed.
Register dump:
PC      : Guru Meditation Error of type LoadProhibited occured on core   0. Exception was unhandled.
Register dump:
PC      :  40083842  PS      :  00060033  A0      :  80083a65  A1      :  3ffe3a70  
A2      :  00000000  A3      :  00000002  A4      :  00000000  A5      :  00000000  
A6      :  3f40681c  A7      :  3ff4001c  A8      :  0000007d  A9      :  3ff4001c  
A10     :  3ff4001c  A11     :  3f400284  A12     :  00000000  A13     :  3ffe3ad0  
A14     :  00000000  A15     :  3f406930  SAR     :  0000001b  EXCCAUSE:  0000001c  
EXCVADDR:  00000004  LBEG    :  4000c2e0  LEND    :  4000c2f6  LCOUNT  :  00000000  
Rebooting...
����Ĥ���§å¤bb¥äÄ�&a..À¦çäĤÄ.b..#.A#cÀb姦Åä��."àÄ�bÅg¤åÄ���¥��Äd¤åÄ�¦��¥��Ä��¥��Ä��¥��D.ä@.æå�¦§bæ��¦¥��Ä�çD.äÄ¥¥��Æä§�E.äÄ�¤��Æä§ÅF.äÄ�Ä��Æä�¥bä¤�Ä�Ä�¥bcä¥FCc�f�§ÅçççççççççççççççççççbcÄcä¥æ���ÄÄæ���¥¦..¥����Gc�f�§Å����¤�¤ç�¦¤äǧ����äbcÄcä¥æ�������¥æ�&äÄ�����Gc�f�§ÅçççççççççççççççççççbcÄc䥦ÇÄ��Æ�¥�åÅbbcÄcä¥�$@$�������BGc�f�§Å�.�â����ä.bbcÄcä¥�$@$�Å$æ��DAc�f�§Å���æ��ÅäbcÄc䥦���������.�������À�$�£¥��Dä�Fc�f�§Å�¤¤äÅ�������§�����������������bcÄcä¥��¥�������$�������������������Dc�f�§Å¤¤¦�������ÁÁ��������¤���������bcÄcä¥.�ä����æ��ÅDc�f�§Åâ�æ������æ��ä¥������bcÄc䥦¤Äç����ÅÄ����¤�¤������Å���¥ÄĤ�¤�bcÄc䥦¤Äç����ÅÄ����¤�¤�¦����Å����¥Ä¤�¥��Dc�f�§Å��æ�å��¤���ÄÄ���ÅÄ¥¥¥�¤æÄÄ�����¥ÅÄ�Dc�öì.�.ï§.â��ÆǧÄ��Äæ�äåb�Åç�æ¤!�Æ�����¡Å�¤�b�Åç¤ä¤!À���������¤�b ����G.å¤�¤�����å�b¤¤���§�b¤¤���§¤b¤¤��

Did I do something wrong?

Typo in SYSTEM_EVENT_AP_STACONNECTED results in wrong data ...

If we look at the following source file ...

staconnected->mac[0], staconnected->mac[0], staconnected->mac[1], \

we find that it contains:

        ESP_LOGD(TAG, "SYSTEM_EVENT_AP_STACONNECTED, mac:%02x:%02x:%02x:%02x:%02x:%02x, aid:%d", \
                   staconnected->mac[0], staconnected->mac[0], staconnected->mac[1], \
                   staconnected->mac[3], staconnected->mac[4], staconnected->mac[5], staconnected->aid);

Notice that parameter 2 is duplicated with parameter 1. It should read:

        ESP_LOGD(TAG, "SYSTEM_EVENT_AP_STACONNECTED, mac:%02x:%02x:%02x:%02x:%02x:%02x, aid:%d", \
                   staconnected->mac[0], staconnected->mac[1], staconnected->mac[2], \
                   staconnected->mac[3], staconnected->mac[4], staconnected->mac[5], staconnected->aid);

This error also occurs in the other events where the bssid is logged.

Downloading the program occurs MD5 parity error (IDFGH-4188)

A few days ago can also be a normal download. This download error occurs after updating the firmware library
`Flashing project app to 0x10000...
esptool.py v2.0-dev
Connecting...
Uploading stub...
Running stub...
Stub running...
Attaching SPI flash...
Configuring flash size...
Erasing flash...
Unc size 4224 comp size 2635 comp blocks 3
Wrote 2635 bytes at 0x00001000 in 0.2 seconds (90.3 kbit/s)...
File md5: b8a3654c3478dbe4ee99e418fac4c5b5
Flash md5: b846cfdf358a11fdf47a71901ec3cda1

A fatal error occurred: MD5 of file does not match data in flash!
make: *** [C:/esp32_idf/esp-idf/components/esptool_py/Makefile.projbuild:28:flash] 错误 2`

esp-idf build error

Performed the build serval times using crosstool-NG and several other toolchains (on latest Debian). Always receive error on xtensa_context.S line 458 -> 224 is not a valid register for rsr.
CPENABLE is def'ed as 224.

Unable to resolve __fpclassifyid

The following pulled from the forum post here:

http://esp32.com/viewtopic.php?f=13&t=279


I have some code that is including math.h from components/newlib/include/math.h.

In that header there is an external reference to:

extern int __fpclassifyd (double x);

when I link my application, I am getting an error stating:

jswrap_functions.c:(.text.jswrap_parseInt+0x27): undefined reference to `__fpclassifyd'

It is important to note that the link step I am using is the following:

xtensa-esp32-elf-gcc -Winline -Og -Wl,--gc-sections -nostdlib -u call_user_start_cpu0 \
-Wl,--gc-sections -Wl,-static -Wl,-EL \
-Wl,--start-group \
-T/home/pi/projects/esp32/esp-idf/components/esp32/ld/esp32.ld \
-T/home/pi/projects/esp32/esp-idf/components/esp32/ld/esp32.common.ld \
-T/home/pi/projects/esp32/esp-idf/components/esp32/ld/esp32.rom.ld \
-T/home/pi/projects/esp32/esp-idf/components/esp32/ld/esp32.peripherals.ld \
/home/pi/projects/esp32/esp-idf/components/newlib/lib/libc.a \
/home/pi/projects/esp32/esp-idf/components/newlib/lib/libm.a \
-Wl,--end-group -o espruino_1v87.213_esp32.elf src/jslex.o .... // many more .o files

I also found a mysterious file called components/newlib/lib/extracted/romsys which appears to list the entry __fpclassifyd.

Can anyone spot where I must possibly be going wrong?


Sprite requested a Github issue for tracking. Please scan the forum thread for comments.

Unable to make flash from Linux VM

Following the instructions for linux. After running 'make menuconfig, set the hardware to Download mode, then I ran make flash, here is what I’m getting. Note: This is a linux VM running on MacOS host using Parellels. Mapped host port /dev/tty.SLAB_USBtoUART to vm port /dev/ttylS0.

Flashing project app to 0x10000...
esptool.py v2.0-dev
Connecting...
Uploading stub...
Calling 4009068c
Stub running...
Attaching SPI flash...
Configuring flash size...
Erasing flash...
Took 0.01s to erase flash block
Wrote 8192 bytes at 0x00001000 in 0.7 seconds (89.4 kbit/s)...
Hash of data verified.
Erasing flash...
Took 0.01s to erase flash block
Writing at 0x00010000... (1 %) 
A fatal error occurred: Invalid head of packet ('\x00')
/home/ritazhang/Desktop/esp/esp-idf/components/esptool_py/Makefile.projbuild:27: recipe for target 'flash' failed
make: *** [flash] Error 2

Build idf example MacOSX

Hi,
I'm trying to build some idf example projects. I've setup my mac using guide :
https://github.com/espressif/esp-idf/blob/master/docs/macos-setup.rst
But when go to menuconfig using

make menuconfig

I met the error, is there any missing dependencies i've missed?

Trans-MacBook-Pro:~ quoclap$ cd esp/esp-idf/examples/02_blink/
Trans-MacBook-Pro:02_blink quoclap$ export IDF_PATH=~/esp/esp-idf
Trans-MacBook-Pro:02_blink quoclap$ make menuconfig
MAKEFLAGS=""
CC=cc LD=ld
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/quoclap/esp/esp-idf/tools/kconfig
lxdialog/check-lxdialog.sh -check cc -DCURSES_LOC="<ncurses.h>" -DLOCALE -lintl
cc -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o lxdialog/checklist.o lxdialog/checklist.c
cc -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o lxdialog/util.o lxdialog/util.c
cc -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o lxdialog/inputbox.o lxdialog/inputbox.c
cc -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o lxdialog/textbox.o lxdialog/textbox.c
cc -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o lxdialog/yesno.o lxdialog/yesno.c
cc -DCURSES_LOC="<ncurses.h>" -DLOCALE -c -o lxdialog/menubox.o lxdialog/menubox.c
cc -o mconf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lintl
Undefined symbols for architecture x86_64:
"_acs_map", referenced from:
_dialog_checklist in checklist.o
_print_arrows in checklist.o
_dialog_clear in util.o
_draw_box in util.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_dialog_yesno in yesno.o
...
"_cbreak", referenced from:
_init_dialog in util.o
"_delwin", referenced from:
_dialog_checklist in checklist.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_dialog_yesno in yesno.o
_dialog_menu in menubox.o
"_doupdate", referenced from:
_dialog_checklist in checklist.o
"_endwin", referenced from:
_init_dialog in util.o
_end_dialog in util.o
"_flash", referenced from:
_dialog_inputbox in inputbox.o
"_getcurx", referenced from:
_init_dialog in util.o
_print_autowrap in util.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_print_arrows in menubox.o
"_getcury", referenced from:
_init_dialog in util.o
_print_autowrap in util.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_print_arrows in menubox.o
"_getmaxx", referenced from:
_show_help in mconf.o
_dialog_checklist in checklist.o
_dialog_clear in util.o
_init_dialog in util.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_print_position in textbox.o
...
"_getmaxy", referenced from:
_dialog_checklist in checklist.o
_attr_clear in util.o
_dialog_clear in util.o
_init_dialog in util.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_print_position in textbox.o
...
"_has_colors", referenced from:
_color_setup in util.o
_draw_shadow in util.o
"_init_pair", referenced from:
_init_one_color in util.o
"_initscr", referenced from:
_init_dialog in util.o
"_keypad", referenced from:
_dialog_checklist in checklist.o
_init_dialog in util.o
_on_key_esc in util.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_dialog_yesno in yesno.o
_dialog_menu in menubox.o
...
"_newwin", referenced from:
_dialog_checklist in checklist.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_dialog_yesno in yesno.o
_dialog_menu in menubox.o
"_nodelay", referenced from:
_on_key_esc in util.o
"_noecho", referenced from:
_init_dialog in util.o
"_scrollok", referenced from:
_dialog_checklist in checklist.o
_dialog_menu in menubox.o
_do_scroll in menubox.o
"_start_color", referenced from:
_color_setup in util.o
"_stdscr", referenced from:
_show_help in mconf.o
_dialog_checklist in checklist.o
_dialog_clear in util.o
_init_dialog in util.o
_end_dialog in util.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
...
"_subwin", referenced from:
_dialog_checklist in checklist.o
_dialog_textbox in textbox.o
_dialog_menu in menubox.o
"_ungetch", referenced from:
_on_key_esc in util.o
"_waddch", referenced from:
_dialog_checklist in checklist.o
_print_item in checklist.o
_print_arrows in checklist.o
_attr_clear in util.o
_dialog_clear in util.o
_print_title in util.o
_print_button in util.o
...
"_waddnstr", referenced from:
_print_item in checklist.o
_print_arrows in checklist.o
_dialog_clear in util.o
_print_title in util.o
_print_autowrap in util.o
_print_button in util.o
_dialog_inputbox in inputbox.o
...
"_wattrset", referenced from:
_dialog_checklist in checklist.o
_print_item in checklist.o
_print_arrows in checklist.o
_attr_clear in util.o
_dialog_clear in util.o
_print_title in util.o
_print_button in util.o
...
"_wbkgdset", referenced from:
_dialog_textbox in textbox.o
_print_position in textbox.o
_dialog_menu in menubox.o
"_wclrtoeol", referenced from:
_print_line in textbox.o
_do_print_item in menubox.o
"_wgetch", referenced from:
_dialog_checklist in checklist.o
_on_key_esc in util.o
_dialog_inputbox in inputbox.o
_dialog_textbox in textbox.o
_dialog_yesno in yesno.o
_dialog_menu in menubox.o
"_winch", referenced from:
_draw_shadow in util.o
"_wmove", referenced from:
_dialog_checklist in checklist.o
_print_item in checklist.o
_print_arrows in checklist.o
_print_buttons in checklist.o
_attr_clear in util.o
_dialog_clear in util.o
_end_dialog in util.o
...
"_wnoutrefresh", referenced from:
_dialog_checklist in checklist.o
_dialog_clear in util.o
_draw_shadow in util.o
_dialog_textbox in textbox.o
_print_page in textbox.o
_dialog_menu in menubox.o
"_wprintw", referenced from:
_print_item in checklist.o
_print_position in textbox.o
"_wrefresh", referenced from:
_dialog_checklist in checklist.o
_print_item in checklist.o
_print_buttons in checklist.o
_end_dialog in util.o
_dialog_inputbox in inputbox.o
_print_buttons in inputbox.o
_refresh_text_box in textbox.o
...
"_wscrl", referenced from:
_dialog_checklist in checklist.o
_do_scroll in menubox.o
"_wtouchln", referenced from:
_attr_clear in util.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [mconf] Error 1
make: *** [/Users/quoclap/esp/esp-idf/tools/kconfig/mconf] Error 2

Suggestion: Rename environment variable IDF_PATH (IDFGH-49)

The ESP-IDF framework is using the environment variable IDF_PATH. I can't help but feel that this is too "generic". I was watching a colleague look at some of my ESP files today and many of my variables were ESP_XXX except IDF_PATH. If I were to make a suggestion, it would be ESP_IDF_PATH. It just feels to me that our ESP32 core prefix is "ESP" and if that were the case, ESP_IDF_PATH would fit in that story just fine.

printf stops printing after first newline

It appears that for some strange reason the regular C printf() function stops printing when it encounters the first newline (\n) in a string. This can be trivially reproduced by attempting to print two lines in the one call; see below for a patch to the official 01_hello_world example.

diff --git i/examples/01_hello_world/main/hello_world_main.c w/examples/01_hello_world/main/hello_world_main.c
index ad2c0ac..ca907ea 100644
--- i/examples/01_hello_world/main/hello_world_main.c
+++ w/examples/01_hello_world/main/hello_world_main.c
@@ -14,7 +14,7 @@

 void hello_task(void *pvParameter)
 {
-    printf("Hello world!\n");
+    printf("Hello world!\nHiding in plain sight...\n");
     for (int i = 10; i >= 0; i--) {
         printf("Restarting in %d seconds...\n", i);
         vTaskDelay(1000 / portTICK_RATE_MS);

Despite applying the above patch, the output stays at:

Hello world!

If using the %s modifier, a newline in the argument string also causes printf() to stop outputting characters, effectively cutting short the output. E.g.

printf("Hello%s world!\n", "Hiding\n in plain sight...");

yields the following output:

HelloHiding

Suggestion: Better name for the wifi_ap_list_t data type

When working with access points, we can call esp_wifi_get_ap_list() to retrieve the discovered access points. The input to this function is a contiguous memory area that will be populated with records corresponding to each discovered access point. In other words, it is an array of access point data structures. However, the data type that has been chosen for a single access point is called wifi_ap_list_t which makes one think that a record is itself a whole list ... when a record is ... well ... a record.

I'd like to suggest renaming this data type from:

wifi_ap_list_t

to something else. Suggestions might include:

  • wifi_ap_record_t
  • wifi_ap_entry_t
  • wifi_ap_detail_t

Build Toolchain

I'm try to build toolchain for esp32 on Odroid U3.
I am following the guide below https://github.com/espressif/esp-idf/blob/master/docs/linux-setup.rst but GMP return error

[INFO ]  Installing GMP for host
[ERROR]    make[3]: *** [div_qr_1n_pi1.lo] Error 1
[ERROR]    make[2]: *** [all-recursive] Error 1
[ERROR]    make[1]: *** [all] Error 2
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing GMP for host'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_gmp_backend[scripts/build/companion_libs/100-gmp.sh@106]
[ERROR]  >>        called from: do_gmp_for_host[scripts/build/companion_libs/100-gmp.sh@62]
[ERROR]  >>        called from: do_companion_libs_for_host[scripts/build/companion_libs.sh@36]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@646]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      'share/doc/crosstool-ng/crosstool-ng-1.22.0-59-g8d95cad/B - Known issues.txt'
[ERROR]   
[ERROR]  (elapsed: 4:08.63)
[04:10] / make: *** [build] Errore 2

I have already installed in my machine gmp and I also compiled the 6.1 without ever having problems, I think there is some configuration problem.
Some advice?

esp32_out.ld dependency breaks when BUILD_DIR_BASE contains subdir

In the NodeMCU CI we use the documented BUILD_DIR_BASE to build different configurations into different output directories (e.g. build/float and build/integer). With the latest IDF the hardcoded dependency on ../include/sdkconfig.h breaks, as it would now be ../../include/sdkconfig. That is, this line:
esp32_out.ld: $(COMPONENT_PATH)/ld/esp32.ld ../include/sdkconfig.h

More things break if BUILD_DIR_BASE is set to something that isn't part of build/ as Kconfig appears to ignore BUILD_DIR_BASE and insists on writing to build/ even if BUILD_DIR_BASE is set to e.g. /tmp/mybuild.

I believe the short-term fix would be to add a VPATH (or the lower-case version thereof) for $(PROJECT_PATH)/build/include, and list the dependency as simply sdkconfig.h.

Edit: on second thought, simply using $(PROJECT_PATH)/build instead of a relative path is probably easier, considering that it needs to be passed to $(CC) as an include as well.

Flash problem

Hi, i'm trying to flash 'myapp' template to esp32. When i'm using dio mode i get

A fatal error occurred: Failed to enter RAM download mode (result was 0xff, 0x0)

But program works(ping).
When i'm using the qio mode it flash sucessfully, but i'm getting resets from issue 7 (#7)

Windows 10: use msys2_shell download error

Flashing project app to 0x10000...
esptool.py v2.0-dev
Traceback (most recent call last):
  File "C:/esp32_idf/esp-idf/components/esptool_py/esptool/esptool.py", line 1813, in <module>
    main()
  File "C:/esp32_idf/esp-idf/components/esptool_py/esptool/esptool.py", line 1642, in main
    esp = chip_constructor_fun(args.port, initial_baud)
  File "C:/esp32_idf/esp-idf/components/esptool_py/esptool/esptool.py", line 159, in __init__
    self._port = serial.Serial(port)
  File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 31, in __init__
    super(Serial, self).__init__(*args, **kwargs)
  File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialutil.py", line 182, in __init__
    self.open()
  File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 62, in open
    raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '/??/COM3': WindowsError(3, '\xcf\xb5\xcd\xb3\xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc2\xb7\xbe\xb6\xa1\xa3')
make: *** [C:/esp32_idf/esp-idf/components/esptool_py/Makefile.projbuild:28:flash] 错误 1

could not open port '/??/COM3': What I can do to solve this problem ?
COM3 is usb to serial port, the chip model is cp2102

Support Zephyr

Hi,

Zephyr is very interested, have any plan to porting Zephyr to ESP32?

Poorly formatted message for stack overflow for task

In an application, I coded the following:

xTaskCreatePinnedToCore(&espruinoTask, "espruinoTask", 2048, NULL, 5, NULL, 0);

It seems that I ran out of stack space ... however the error that was logged was:

***ERROR*** A stack overflow in taskespruinoTaskhas been detected.

I think a better formatted message would be:

***ERROR*** A stack overflow in task espruinoTask has been detected.

(notice the extra spaces)

This would appear to be easily corrected in source file components/freertos/panic.c at lines 82 and 84.

make flash doesn't preserve serial port settings

When I execute make flash to flash an ESP32, I find that the serial port settings to my ESP32 aren't preserved after the flash completes. Here is a listing of the settings before a flash:

$ stty -F /dev/ttyUSB0 -a
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 100; time = 2;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

and the same settings after executing a make flash:

$ stty -F /dev/ttyUSB0 -a
speed 921600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 0; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke -flusho -extproc

I would have expected the settings to have been preserved.

esp-idf/components/bt/.//bt.c', needed by 'bt.o'. Stop.

*** No rule to make target 'c:/sdk32/esp-idf/components/bt/.//bt.c', needed by 'bt.o'. Stop.
hi guys
get this if i compile a simple hello world.
after i rename in esp-idf/components/bt/bt.c to esp-idf/components/bt/bt.c_
small_path_err_bt
compiles without stop.

not sure what this can be ( path err or include err )
have seen just in time.

best wishes
rudi ;-)

ESP32 unexpectedly disconnected from WiFi AP

I connect ESP32 board to WiFi and do HTTP POST the sensor data to cloud server every 30 seconds. It works fine for around 6 minutes then it show messages:

rbk
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
n:6 0, o:6 0, ap:255 255, sta:6 2, prof:1

Then ESP32 was disconnected from WiFi and could not reconnect.

SDK tool configuration, example for the path for xtensa-esp32-elf- in menuconfig ?

Hello Guys,

Running under W10 and Msys2, following few guides lines, and running the menuconfig for the examples 01_ xx to 05_xxx, but when i try the make to compile any examples , it looks that the path for the "gcc" is not right.. or at CC log.o is hangs if running ...
IDF_PATH is ok. with the export IDF_PATH="my_drive/my_directory/esp-idf" and echo $IDF_PATH display it.
Struggling around this , please can you precise the default path for xtensa-esp32-elf-gcc ,

It looks like this and hangs :
make[2] : on entre dans le répertoire « /c/esp-idf/esp-idf/examples/01_hello_world/build/bootloader/log »
CC log.o
..
I've missed something ... Any idea ?
Have a great day.
Jp

BT scanning issues

I've been experimenting with the bluetooth stack today and got a NodeMCU-based proof-of-concept going with advertisements relatively easily (have the example as reference was quite useful, thanks!). However, I'm hitting a wall when it comes to scanning on the ESP32.

  1. While it reports that the scan enable command was successful, I never receive any advertising reports, despite there being plenty of advertising BT devices around. I've tried explicitly setting the event mask to include advertising reports, but that did not help (and the default value should be enough anyway). Other than setting the parameters and then enabling the scan, am I supposed to do something else? Yes, the LE Meta-Event bit in the baseband event mask.
  2. When an LE SET SCAN ENABLE command has been sent once (whether to enable or disable), all subsequent LE SET SCAN ENABLE commands report failure, code 0x0c (Command Disallowed). As such, it does not appear to be possible to stop scanning other than via a HCI_RESET command. Edit: Actually, I see the same behaviour with LE SET ADVERTISE ENABLE as well; once on, it's not going off. Mea culpa. Bug found and removed.

Are these bugs, or am I just doing things wrong? I haven't got the code checked in or pushed anywhere yet (it needs a lot of cleanup, and ideally it should also work...), but here is some example output:

> bt.reset()
BT: 04 0e 04 05 03 0c 00
BT command 0c03 completed, 5 queue free, retval(s):  00

> bt.scan.setparams({mode=1,interval=32,window=16,own_addr_type=0,filter_policy=0})
BT: 04 0e 04 05 0b 20 00
BT command 200b completed, 5 queue free, retval(s):  00

> bt.scan.enable(1)
BT: 04 0e 04 05 0c 20 00
BT command 200c completed, 5 queue free, retval(s):  00

> -- No advertising events generated :(
>
> bt.scan.enable(0)
BT: 04 0e 04 05 0c 20 0c
BT command 200c completed, 5 queue free, retval(s):  0c
> -- and I can't even stop the scanning!

And for the advertising:

> bt.reset()
BT: 04 0e 04 05 03 0c 00
BT command 0c03 completed, 5 queue free, retval(s):  00

> bt.adv.setparams({type=bt.adv.NONCONN_UNDIR})
BT: 04 0e 04 05 06 20 00
BT command 2006 completed, 5 queue free, retval(s):  00

> bt.adv.setdata(encoder.fromHex("080861626364656667"))
BT: 04 0e 04 05 08 20 00
BT command 2008 completed, 5 queue free, retval(s):  00

>bt.adv.enable(1)
BT: 04 0e 04 05 0a 20 00
BT command 200a completed, 5 queue free, retval(s):  00

> -- happily advertising at this point
>
> bt.adv.enable(0)
BT: 04 0e 04 05 0a 20 0c
BT command 200a completed, 5 queue free, retval(s):  0c

> -- and will be forever more, because the stop command gets rejected

Also, currently the BT stack uses callbacks for delivering events/responses. Which task context are those executed from? And is the BT stack expected to move over to use esp_event_send() like the WiFi stack in the near future?

ETS_GPIO_INUM not defined anywhere

ETS_GPIO_INUM was used in esp_intr.h and ets.sys.h but it does not be defined anywhere.

I tried to do GPIO interrupt and due to no gpio_pin_intr_state_set function available, so, I tried to write the register for this but can not do.

Both esp-idf-template and 03_http_request crashes constantly

I compiled the code with the latest esp-idf and esp-wifi-lib under msys2. But when I run it on esp32, it constantly crashes. If I remove codes about wifi connection, it won't crash.
The logs are below:

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0000,len:0
load:0x3ffc0000,len:920
load:0x40078000,len:2724
ho 0 tail 12 room 4
load:0x40098000,len:508
entry 0x40098118
�[0;32mI (94) heap_alloc_caps: Initializing heap allocator:�[0m
�[0;32mI (95) heap_alloc_caps: Region 19: 3FFC0804 len 0001F7FC tag 0�[0m
�[0;32mI (96) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1�[0m
�[0;32mI (106) cpu_start: Pro cpu up.�[0m
�[0;32mI (111) cpu_start: Starting app cpu, entry point is 0x400809d4�[0m
�[0;32mI (0) cpu_start: App cpu up.�[0m
�[0;32mI (127) cpu_start: Pro cpu start user code�[0m
rtc v112 Sep 26 2016 22:32:10
XTAL 40M
�[0;32mI (163) cpu_start: Starting scheduler on PRO CPU.�[0m
�[0;32mI (43) cpu_start: Starting scheduler on APP CPU.�[0m
frc2_timer_task_hdl:3ffc5c48, prio:22, stack:2048
tcpip_task_hdlxxx : 3ffc6940, prio:18,stack:2048
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Register dump:
PC : 400856cb PS : 00060530 A0 : 80087795 A1 : 3ffc2450
A2 : 0abd1faa A3 : 3ffbe078 A4 : 3ffc2470 A5 : 000000fc
A6 : 00000003 A7 : 3ffae0c0 A8 : 3f400094 A9 : 3ffc2430
A10 : 00000000 A11 : 00000001 A12 : 00000000 A13 : 0010ef2a
A14 : 00000006 A15 : 00000000 SAR : 0000001a EXCCAUSE: 00000000
EXCVADDR: 00000000 LBEG : 4000c2e0 LEND : 4000c2f6 LCOUNT : 00000000
Rebooting...
ets Jun 8 2016 00:22:57

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

If I use a higher log level, the error type will be unreadable.
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0000,len:0
load:0x3ffc0000,len:920
load:0x40078000,len:2724
ho 0 tail 12 room 4
load:0x40098000,len:508
entry 0x40098118
�[0;32mI (94) heap_alloc_caps: Initializing heap allocator:�[0m
�[0;32mI (94) heap_alloc_caps: Region 19: 3FFC0804 len 0001F7FC tag 0�[0m
�[0;32mI (95) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1�[0m
�[0;32mI (105) cpu_start: Pro cpu up.�[0m
�[0;32mI (111) cpu_start: Starting app cpu, entry point is 0x400809d4�[0m
�[0;32mI (0) cpu_start: App cpu up.�[0m
�[0;32mI (126) cpu_start: Pro cpu start user code�[0m
rtc v112 Sep 26 2016 22:32:10
XTAL 40M
�[0;32mI (162) cpu_start: Starting scheduler on PRO CPU.�[0m
�[0;32mI (43) cpu_start: Starting scheduler on APP CPU.�[0m
D (43) nvs: init start=6 count=3�[0m
D (2033) nvs: nvs_open misc 1�[0m
D (2033) nvs: nvs_get_str_or_blob log�[0m
frc2_timer_task_hdl:3ffc5ddc, prio:22, stack:2048
tcpip_task_hdlxxx : 3ffc6940, prio:18,stack:2048
phy_version: 123, Sep 13 2016, 20:01:58, 0
D (2213) nvs: nvs_open nvs.net80211 1�[0m
D (2213) nvs: nvs_get opmode 1�[0m
D (2243) nvs: nvs_get country 1�[0m
D (2263) nvs: nvs_get_str_or_blob sta.ssid�[0m
D (2313) nvs: nvs_get_str_or_blob sta.mac�[0m
D (2353) nvs: nvs_get sta.authmode 1�[0m
D (2373) nvs: nvs_get_str_or_blob sta.pswd�[0m
D (2433) nvs: nvs_get_str_or_blob sta.pmk�[0m
D (2473) nvs: nvs_get sta.chan 1�[0m
D (2493) nvs: nvs_get auto.conn 1�[0m
D (2513) nvs: nvs_get bssid.set 1�[0m
D (2533) nvs: nvs_get_str_or_blob sta.bssid�[0m
D (2573) nvs: nvs_get sta.phym 1�[0m
D (2593) nvs: nvs_get sta.phybw 1�[0m
D (2613) nvs: nvs_get_str_or_blob sta.apsw�[0m
D (2653) nvs: nvs_get_str_or_blob sta.apinfo�[0m
D (2903) nvs: nvs_get_str_or_blob ap.ssid�[0m
D (2953) nvs: nvs_get_str_or_blob ap.mac�[0m
D (2993) nvs: nvs_get_str_or_blob ap.passwd�[0m
D (3053) nvs: nvs_get_str_or_blob ap.pmk�[0m
D (3103) nvs: nvs_get ap.chan 1�[0m
D (3123) nvs: nvs_get ap.authmode 1�[0m
D (3143) nvs: nvs_get ap.hidden 1�[0m
D (3163) nvs: nvs_get ap.max.conn 1�[0m
D (3183) nvs: nvs_get bcn.interval 2�[0m
D (3203) nvs: nvs_get ap.phym 1�[0m
D (3223) nvs: nvs_get ap.phybw 1�[0m
D (3243) nvs: nvs_get ap.sndchan 1�[0m
D (3263) nvs: nvs_set_blob sta.mac 6�[0m
D (3373) nvs: nvs_set_blob ap.mac 6�[0m
pp_task_hdl : 3ffca19c, prio:23, stack:8192
�[0;32mI (3453) example: Setting WiFi configuration SSID ForIOT...�[0m
mode : sta(24:0a:c4:01:61:dc)
D (3453) event: SYSTEM_EVENT_STA_START�[0m
n:6 2, o:1 0, ap:255 255, sta:6 2, prof:1
state: 0 -> 2 (b0)
Guru Medi}atioj Ekrcr cf dype IllegmlAnctructaoo occurred on core 0. Exceptiob gas unfdhad. �Register du*�
@C : 400df666 PC : 00060730 A0 : 800dfff4 A1 : 3ffca000
A2 : 00000000 A3 : 3ffbcd54 A5 : 3ffb6808
A6 : 3ffca720 A8 : 00000010 A9 : 3ffca000
A10 : 00000060 A11 : 00000000 A12 : 00000000 A13 : 000000b0
A14 : 3ffb0e68 A15 : 00000080 SAR : 00000017 EXCCAUSE: 00000000
EXCVADDR: 00000000 LBEG : 4000c2e0 LCOUNT : ffffffff
Rebgoting...

Eclipse on Windows shows Errors due to failing to find all header paths (build succeeds in background) (IDFGH-1059)

Hey Team,

The Toolchain for Windows: Quick Steps works for me and I am able to compile the Getting Started project without any issues or tweaking standard configuration.

Then I have installed from scratch and configured Eclipse following instructions in Setting up Eclipse.

This one did not work for me out of box:
unresolved-inclusion

To fix this issue I have entered:
unresolved-inclusion-resolved

Did I miss something in installation process or this is intended / obvious user should add this missing include path? Or maybe it should be added somewhere else?

Doc comments on esp_wifi_init outdated

It looks like the description for esp_wifi_init() in esp_wifi.h didn't get updated when things got switched from event_queue to event_handler. The "attention 2" part is no longer accurate.

examples/03_http_request is crashed

Only config the ssid & password and disable the 'CONFIG_ESPTOOLPY_COMPRESSED' through 'make menuconfig'

Boot log:

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0000,len:0
load:0x3ffc0000,len:920
load:0x40078000,len:2624
load:0x40098000,len:508
entry 0x40098118
I (93) heap_alloc_caps: Initializing heap allocator:
I (93) heap_alloc_caps: Region 19: 3FFC07DC len 0001F824 tag 0
I (94) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1
I (104) cpu_start: Pro cpu up.
I (109) cpu_start: Starting app cpu, entry point is 0x400809e4
I (0) cpu_start: App cpu up.
I (125) cpu_start: Pro cpu start user code
rtc v112 Sep 22 2016 16:08:39
XTAL 40M
I (161) cpu_start: Starting scheduler on PRO CPU.
I (43) cpu_start: Starting scheduler on APP CPU.
misc_nvs_load g_misc_nvs=0x3ffc493c
frc2_timer_task_hdl:3ffc53d8, prio:22, stack:2048
tcpip_task_hdlxxx : 3ffc5f3c, prio:18,stack:2048
phy_version: 123, Sep 13 2016, 20:01:58, 0
pp l
pp_task_hdl : 3ffc9798, prio:23, stack:8192
I (3413) example: Setting WiFi configuration SSID GAGA-comcat...
mode : sta(18:fe:34:6a:87:88)
Guru Meditation Error of type LoadStoreError occurred on core 0. Exception was unhandled.
Register dump:
PC : 4008471d PS : 00060733 A0 : 80082024 A1 : 3ffc9570
A2 : 400d5100 A3 : b33fffff A4 : b33f0000 A5 : 00060723
A6 : b33fffff A7 : 00000000 A8 : 800820c8 A9 : 3ffc9570
A10 : 00000003 A11 : 00060723 A12 : 00060723 A13 : 00000000
A14 : 3ffc9b5c A15 : 3ffc9b24 SAR : 00000018 EXCCAUSE: 00000003
EXCVADDR: 400d5100 LBEG : 4000c349 LEND : 4000c36b LCOUNT : ffffffff
Rebooting...

objdump the elf, find the 0x4008471d:

.......
40084714 :
40084714: 004136 entry a1, 32
40084717: 130c30 wsr.scompare1 a3
4008471a: 002000 isync
4008471d: 00e242 s32c1i a4, a2, 0 <---- access the address of code (a2 = 400d5100)
40084720: 042d mov.n a2, a4
40084722: f01d retw.n
......

Continuous Rebooting?

Hi all,

Testing out the ESP32 moduile with the Template App and the IDF, it gets locked into an infinite-reboot cycle.

Output is like so:
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:QIO, clock div:2
load:0x3ffc0000,len:0
load:0xffff0e00,len:-1
1162 mmu set 00010000, pos 00010000

With that last block repeating indefinitely.

That 0xffff0e00 address doesn't smell right, but I have no idea where it's coming from. I have two different modules and both do the same thing. As far as I can tell, the esptool upload verifies correctly.

I'm stumped. Any pointers?

Versions:
esp-idf commit is cef73d9 (with the corresponding esp32/libs)
esp-template-app is 3bbf6ce
toolchain is the binary download (on Sep 5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.