esp-rtosLogger
printf style logging that costs the caller about a microsecond: arguments go raw into a ring of the caller's own core, a FreeRTOS task formats them later.
Установка
Последняя опубликованная версия- Скачайте архив — реестр отдает его уже проверенным.
- В Arduino IDE выберите «Скетч → Подключить библиотеку → Добавить .ZIP библиотеку».
- Укажите скачанный файл — библиотека появится в списке доступных.
SHA-256:b438707daef01ffdb39c15edae5c71ec82a3b17f30fbdb67ff6efad76d17e010esp_rtosLogger-0.3.0-b438707d.zipОписание
logI("rpm=%d temp=%.2f", rpm, temp) writes the raw arguments into a ring of the caller's own core, with that core's interrupts masked for the write, so no lock is ever shared between cores. A low priority task formats the lines with the real snprintf and sends them to Serial, or wherever logTo says, batched. logBin(struct) sends a plain struct as bytes instead, read back on the other board with logBinRead. Safe from interrupts and from any number of tasks. Measured on an ESP32-S3 under a SimpleFOC drive: 0.9 us mean, 1.4 us worst from a loop in IRAM, 0.5 us from an interrupt; 4.4 us on an nRF52840. Runs on ESP32 (Arduino-ESP32 3.x) and nRF52 (Adafruit core).