AgriQL · Embedded · Other SDKs
ESP-IDF, Pico SDK, Zephyr, STM32Cube and Rust
The core of AgriQLEdge is a plain C library: one header, agriql_edge.h, and one static library per processor. Everything on this page comes from the same release as the Arduino library.
Which library to link
| Processor | Folder in the release |
|---|---|
| Cortex-M0, M0+ (RP2040, SAMD21, STM32G0/L0) | src/cortex-m0plus |
| Cortex-M3 (STM32F1, SAM3X) | src/cortex-m3 |
| Cortex-M4, M4F (any float ABI) | src/cortex-m4 |
| Cortex-M7 (any float ABI) | src/cortex-m7 |
| Cortex-M33 (any float ABI; RP2350 Arm, STM32U5, nRF5340) | src/cortex-m33 |
| ESP32-C3, ESP32-C2 | src/esp32c3, src/esp32c2 |
| ESP32-C5, C6, C61, H2, RP2350 RISC-V | src/esp32c5, src/esp32c6, src/esp32c61, src/esp32h2, src/rv32imac |
| ESP32-P4 (single-float ABI) | src/esp32p4 |
The Cortex-M4, M7 and M33 libraries pass no floating-point values across the API, so they link with soft, softfp and hard float firmware alike.
ESP-IDF
- Copy
extras/esp-idf/agriql_edgeinto your project'scomponents/folder. - Add a data partition to
partitions.csv:agriql, data, 0x99, , 256K, - Get a driver and mount the log:
#include "agriql_esp.h"
static agriql_edge_t log_;
void app_main(void) {
agriql_flash_t flash;
if (agriql_esp_flash(&flash, "agriql") != AGRIQL_OK) return;
agriql_edge_mount(&log_, &flash, 4, 1);
agriql_edge_append(&log_, 7, 0, 0, 3005, 0);
}
The component carries the ESP32-C2, C3, C5, C6, C61, H2 and P4 libraries. The Xtensa ESP32, S2 and S3 are not precompiled yet.
Raspberry Pi Pico SDK
Add extras/pico/agriql_pico_flash.c to your target and link the library for your chip: src/cortex-m0plus for RP2040, src/cortex-m33 for RP2350. The driver uses the top 256 KB of the QSPI flash and turns interrupts off while flash is busy. With both cores running, define AGRIQL_PICO_MULTICORE.
Zephyr
Add extras/zephyr/agriql_zephyr_flash.c and a fixed partition labelled agriql in the device tree. Enable CONFIG_FLASH, CONFIG_FLASH_MAP and CONFIG_FLASH_PAGE_LAYOUT.
STM32Cube
The rd, pr and er functions in the Stm32InternalFlash example use only the STM32 HAL, so they work unchanged in an STM32Cube project. Link the library for your core.
Rust
AgriQLEdge is written in Rust as a no_std crate with no heap and no dependencies. With any HAL that implements embedded-storage (embassy, esp-hal, rp2040-hal, stm32 HALs, nrf-hal), the crate's embedded-storage feature adapts the HAL's flash directly. The crate is not published on crates.io yet.
The ESP-IDF, Pico SDK and Zephyr drivers follow each SDK's documented flash API, but they are not compiled in the library's CI. The Arduino examples are.