
Page 1 Table of Contents Introduction................................................................................................................................38 Important Documentation Notes – ESP8266 and ESP32...........................................................39 Overview....................................................................................................................................39 The ESP32............................................................................................................................40 The ESP32 specification.......................................................................................................41 Modules.................................................................................................................................42 ESP-WROOM-32..............................................................................................................42 ESP32-DevKitC................................................................................................................43 ESP-WROVER-KIT..........................................................................................................45 The SparkFun ESP32 thing..............................................................................................45 Connecting to the ESP32...........................................................................................................47 Assembling circuits....................................................................................................................48 USB to UART converters.......................................................................................................49 Breadboards..........................................................................................................................50 Power....................................................................................................................................51 Multi-meter / Logic probe / Logic Analyzer.............................................................................52 Sundry components..............................................................................................................52 Physical construction.............................................................................................................52 Configuration for flashing the device.....................................................................................52 Programming for ESP32............................................................................................................54 Espressif IoT Development framework..................................................................................54 Application entry point......................................................................................................57 How ESP-IDF works.........................................................................................................58 Error handling...................................................................................................................61 The build environment menu configuration.......................................................................61 Adding a custom ESP-IDF component.............................................................................65 Creating a build environment on the Raspberry Pi 3.........................................................69 Compiling..............................................................................................................................71 Compilation.......................................................................................................................73 Flashing............................................................................................................................75 Loading a program............................................................................................................77 Programming environments..............................................................................................79 Compilation tools..............................................................................................................79 xntensa-esp32-elf-ar....................................................................................................80 esptool.py.....................................................................................................................80 xtensa-esp32-elf-gcc....................................................................................................82 gen_appbin.py..............................................................................................................83 make............................................................................................................................84 xtensa-esp32-elf-nm....................................................................................................84 xtensa-esp32-elf-objcopy.............................................................................................85 Page 2 xtensa-esp32-elf-objdump............................................................................................85 xxd...............................................................................................................................85 Linking...................................................................................................................................85 Debugging.............................................................................................................................89 ESP-IDF logging...............................................................................................................89 Exception handling...........................................................................................................91 Core dump processing......................................................................................................92 Using a debugger (GDB)..................................................................................................97 OpenOCD and JTAG........................................................................................................98 Dumping IP Addresses.....................................................................................................99 Debugging and testing TCP and UDP connections.........................................................100 Android – Socket Protocol..........................................................................................100 Android – UDP Sender/Receiver................................................................................100 Windows – Hercules...................................................................................................100 SocketTest..................................................................................................................100 Linux – netcat (nc)......................................................................................................101 Curl............................................................................................................................101 Eclipse – TCP/MON...................................................................................................102 httpbin.org..................................................................................................................104 RequestBin.................................................................................................................104 tcpdump.....................................................................................................................104 ESP-IDF component debugging.....................................................................................104 LWIP..........................................................................................................................105 Run a Blinky....................................................................................................................105 WiFi subsystem........................................................................................................................106 WiFi Theory.........................................................................................................................106 Initializing the WiFi environment..........................................................................................107 Setting the operation mode.................................................................................................108 Scanning for access points..................................................................................................108 Handling WiFi events...........................................................................................................111 Station configuration............................................................................................................117 Starting up the WiFi environment.........................................................................................118 Connecting to an access point.............................................................................................119 Being an access point.........................................................................................................121 Working with connected stations.........................................................................................125 WiFi at boot time.................................................................................................................126
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages785 Page
-
File Size-