Monthly Archives: June 2019

Windows 10 Bluetooth SPP – Two Virtual COM Ports

1

Bluetooth Serial Port settings for Windows10 PC
It is true that with Windows own Bluetooth software two virtual COM ports are created after pairing:

  • when connecting your terminal program to the first you are actually instructing Windows to attempt to establish the Bluetooth connection to the remote paired device, and if the connection is established the RFCOMM channel will be opened for the exchange of data
  • when connecting your terminal program to the second you are actually instructing Windows to load the SPP SDP record and to remain waiting for incoming connections from the remote paired device.

2

difference between incomming BT com-port and outgoing?

  • An incoming port is used when a remote device established a connection to your device, and is exposed as the SerialPort service to the remote device.
  • An outgoing port is used to make a connection to the serial port service on a remote device (e.g. GPS Receiver).

3

*TWO* virtual serial ports created on Windows (BT121 class SPP)

How to find Bluetooth settings in Windows 10
Virtual Bluetooth adapter settings on windows 10

ESP32 Task Starvation / Starve / Preemption / Preempt

ESP32 Developer – Priority
Arduino ESP32 FreeRTOS 2: How to use Task Parameter – Task Priorities – Task Handle – Idle Task Hook

There are 3 types of scheduling: Co-operative Scheduling and Prioritized Pre-emptive Scheduling with time slicing and without time slicing.

  • Prioritized Pre-emptive Scheduling with time slicing:
    task with higher priority will pre-empt the tasks that have lower priority. And tasks that have the same priority will run in turn every time tick interrupt occurs (RTOS has a timer interrupt to measure the time, every time the interrupt occurs RTOS will check that it is time to unblock or wake a task).
  • Prioritized Pre-emptive Scheduling without time slicing:
    task with higher priority will pre-empt the tasks that have lower priority. And tasks that have the same priority will not run in turn every time tick interrupt occurs (the task that is running, will continue running until it is pre-empted by high priority task).
  • Co-operative Scheduling:
    context switch occur when running task change from Running state to Blocked state or call taskYIELD(). The next running task is the task that has highest priority and is in Running state.

Watchdogs, Interrupt Watchdog Timer (IWDT), Task Watchdog Timer (TWDT)
Clarifications on freeRTOS
ESP-IDF, multicore & freeRTOS confusion

> Does freeRTOS uses a preemptive scheduler on ESP-idf?
Yes

> 1. Given
> core 0 runs a priority 10 task,
> core 1 runs a priority 12 task
> and a priority 11 task is awoken.
– If the priority 11 task is pinned to core 0 or has no core affinity, the priority 11 task will preempt on core 0.
– If the priority 11 task is pinned to core 1, core 1 will not preempt.

> 3. A high priority task that never calls vTaskDelay will eat
> all the resources and never let lower priorities run, right?
If the high priority task is pinned to a core, then it will starve the lower priority tasks on that core from cpu time. However if the high priority task as no core affinity, it can be possible that the task will bounce between the two cores, giving the lower priority task on each core a chance to run. However, writing a task function that never blocks is very poor application design. We guard against cpu starvation using the task watchdog timer.

ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac

Serial done!
RS485 done!

99 GT2
E (11904) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (11904) task_wdt:  - IDLE0 (CPU 0)
E (11904) task_wdt: Tasks currently running:
E (11904) task_wdt: CPU 0: taskTempCurrent
E (11904) task_wdt: CPU 1: IDLE1
E (11904) task_wdt: Aborting.
abort() was called at PC 0x400e63cb on core 0

Backtrace:
0x4008ba20:0x3ffbe170 0x4008bc51:0x3ffbe190 0x400e63cb:0x3ffbe1b0
0x40084775:0x3ffbe1d0 0x4000bfed:0x3ffb45d0 0x4008952d:0x3ffb45e0
0x400885af:0x3ffb4600 0x400e457f:0x3ffb4620 0x400e33a1:0x3ffb4640
0x400d17bd:0x3ffb4660 0x400d18a8:0x3ffb4680 0x400d1a12:0x3ffb46c0
0x40088661:0x3ffb46f0

Rebooting...

ESP32: PlatformIO Arduino Debug JTAG

Configure WROVER JTAG Interface (FT2232 => TIAO TUMPA!)
TIAO USB Multi-Protocol Adapter (TUMPA)

Reading symbols from c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/firmware.elf...
done.
PlatformIO Unified Debugger > http://bit.ly/pio-debug
PlatformIO: Initializing remote target...
Open On-Chip Debugger  v0.10.0-esp32-20190313 (2019-03-13-09:57)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : tcl server disabled
Info : telnet server disabled
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : accepting 'gdb' connection from pipe
Error: No symbols for FreeRTOS
Info : Target halted. PRO_CPU: PC=0x40078630 (active)    APP_CPU: PC=0x00000000
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x00000000
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 103 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 730 KB
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x00000000
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x00000000
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 103 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 730 KB
Info : Using flash size 732 KB
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x00000000
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 103 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 730 KB
Info : Using flash size 104 KB
0x40078630 in ?? ()
Error: Too large number of threads 3623786614!
Hardware assisted breakpoint 1 at 0x400d2db8: file C:\Users\andreas\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp, line 24.
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
** Programming Started **
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
** Programming Started **
auto erase enabled
auto erase enabled
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
wrote 20480 bytes from file C:/Users/andreas/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin in 0.859131s (23.279 KiB/s)
wrote 20480 bytes from file C:/Users/andreas/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin in 0.859131s (23.279 KiB/s)
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
read 16848 bytes from file C:/Users/andreas/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin and flash bank 0 at offset 0x00001000 in 0.345154s (47.669 KiB/s)
contents match
read 16848 bytes from file C:/Users/andreas/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin and flash bank 0 at offset 0x00001000 in 0.345154s (47.669 KiB/s)
contents match
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
** Programming Started **
auto erase enabled
** Programming Started **
auto erase enabled
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
wrote 4096 bytes from file c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/partitions.bin in 0.582190s (6.871 KiB/s)
** Programming Finished **
wrote 4096 bytes from file c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/partitions.bin in 0.582190s (6.871 KiB/s)
** Programming Finished **
** Verify Started **
** Verify Started **
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
read 3072 bytes from file c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/partitions.bin and flash bank 0 at offset 0x00008000 in 0.292752s (10.248 KiB/s)
contents match
read 3072 bytes from file c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/partitions.bin and flash bank 0 at offset 0x00008000 in 0.292752s (10.248 KiB/s)
contents match
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
** Programming Started **
auto erase enabled
** Programming Started **
auto erase enabled
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
wrote 8192 bytes from file C:/Users/andreas/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin in 0.699837s (11.431 KiB/s)
wrote 8192 bytes from file C:/Users/andreas/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin in 0.699837s (11.431 KiB/s)
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
read 8192 bytes from file C:/Users/andreas/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin and flash bank 0 at offset 0x0000e000 in 0.295177s (27.102 KiB/s)
contents match
read 8192 bytes from file C:/Users/andreas/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin and flash bank 0 at offset 0x0000e000 in 0.295177s (27.102 KiB/s)
contents match
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
** Programming Started **
auto erase enabled
** Programming Started **
auto erase enabled
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
wrote 1003520 bytes from file c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/firmware.bin in 7.578782s (129.308 KiB/s)
wrote 1003520 bytes from file c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/firmware.bin in 7.578782s (129.308 KiB/s)
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x4009171A (active)    APP_CPU: PC=0x40000400
read 1003120 bytes from file c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/firmware.bin and flash bank 0 at offset 0x00010000 in 3.833799s (255.519 KiB/s)
contents match
read 1003120 bytes from file c:/Users/andreas/Documents/PlatformIO/Projects/lolin32-arduino-spp-proxy/.pioenvs/lolin32/firmware.bin and flash bank 0 at offset 0x00010000 in 3.833799s (255.519 KiB/s)
contents match
** Verified OK **
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
Info : Target halted. PRO_CPU: PC=0x400D2DB8 (active)    APP_CPU: PC=0x401866EA
Target halted. PRO_CPU: PC=0x400D2DB8 (active)    APP_CPU: PC=0x401866EA
Info : Detected debug stubs @ 3ffc6010 on core0 of target 'esp32'
[New Thread 1073464968]
[New Thread 1073463556]
[New Thread 1073467660]
[New Thread 1073455812]
[New Thread 1073445316]
[New Thread 1073446544]
[New Thread 1073457052]
[Switching to Thread 1073462144]

Temporary breakpoint
1, app_main () at C:\Users\andreas\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp:24
24	{

ESP32 Examples

LOLIN32 Schematic
ESP32-WROOM-32 Datasheet

Arduino, ESP32 and 3 hardware serial ports
ESP32-Using-Hardware-Serial-Ports/ESP32_Using_Serial2.ino

exploreembedded.com

Hello World with ESP32 Explained
Binary Semaphore 01: Priority Inversion
Mutex Semaphore 02: Recursive Locks

techtutorialsx.com

ESP32: FreeRTOS counting semaphores
ESP32 Arduino: Creating a FreeRTOS task
ESP32 Arduino: FreeRTOS Queues

esp32developer.com

Programming in C/C++ / Console / printf

ESP32 Forum

Programming in C++
defaukt pins for uart1/2

ESP-IDF Debug

github.com/VirgiliaBeatrice/esp32-devenv-vscode/blob/master/tutorial.md, Setting Development Environment for ESP32 (Windows)
VSCode ESP32 debugging
VS Code ESP32 Debug (Preview)
VSCode JTAG Debugging of ESP32 – Part 1 (WSL!)

Arduino Debug

Add ESP32 to the Board Manager #621
Use Visual Studio Code for Arduino
Debugging ESP32 – JTAG Debugging ESP32 (with CLion)
ESP32 – Cheap Solution for in Circruit Debug (no PlatformIO)

CLion Debug

github.com/daniel-sullivan/clion-embedded-esp32, ESP32 MCU development plugin for JetBrains CLion
Some resources for using CLion to build ESP32 applications
clion project #2
ESP32, ESP-IDF, CMake & CLion
CMake with CLion – working!

ESP32
Arduino
Arduino Support

CLion + PlatformIO

CLion
A first program with ESP8266/ESP-01, CLion and PlatformIO
How to configure CLion Project #132
CLion and Arduino via Platform.IO
CLion + Arduino

PlatformIO Debug

ESP-MIKROCONTROLLER MIT VISUAL STUDIO CODE PROGRAMMIEREN
ESP32 BLE mit VS Code und PlatformIO
PIO Unified Debugger
TIAO USB Multi-Protocol Adapter (TUMPA)
Get started with Arduino and ESP32-DevKitC: debugging and unit testing
Debugging options
Debugging ESP32 – how?
ESP32dev – PIO Unified Debugger – setup problem

Crash / Stack Trace

Arduino Only!

me-no-dev/EspExceptionDecoder, Exception Stack Trace Decoder for ESP8266 and ESP32
krzychb/EspSaveCrash, Save exception details and stack trace anytime and anywhere the ESP8266 crashes

Capture stack trace and reset after startup? #1152
Understanding/Debugging Stack Smashing
Backtrace decoder for ESP32 #105
ESP8266 / ESP32: Place ISR in IRAM #38

Docs

Docs » API Reference » System API » Logging library
Docs » Get Started » IDF Monitor
Docs » Get Started » Establish Serial Connection with ESP32
Docs » API Reference » Peripherals API » UART
Docs » API Reference » System API » Inter-Processor Call
Docs » API Guides » JTAG Debugging

github

esp-idf/examples/peripherals/uart/uart_echo/main/uart_echo_example_main.c
esp-idf/examples/get-started/blink/main/blink.c
esp-idf/examples/peripherals/spi_slave/sender/main/app_main.c
esp-idf/examples/protocols/mdns/main/mdns_example_main.c