فهرست منبع

freertos: place `xQueueGenericCreateStatic` into flash

`xQueueGenericCreateStatic` is placed into flash by the linker script to
reduce IRAM usage.  This will also cause the `xRingbufferCreate` not
not callable when cache is disabled.
michael 5 سال پیش
والد
کامیت
1ca25688a8
2فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 1 1
      components/esp_ringbuf/test/test_ringbuf.c
  2. 1 0
      components/freertos/linker.lf

+ 1 - 1
components/esp_ringbuf/test/test_ringbuf.c

@@ -673,9 +673,9 @@ static IRAM_ATTR __attribute__((noinline)) bool iram_ringbuf_test(void)
 {
     bool result = true;
 
-    spi_flash_guard_get()->start(); // Disables flash cache
     RingbufHandle_t handle = xRingbufferCreate(CONT_DATA_TEST_BUFF_LEN, RINGBUF_TYPE_NOSPLIT);
     result = result && (handle != NULL);
+    spi_flash_guard_get()->start(); // Disables flash cache
     xRingbufferGetMaxItemSize(handle);
     vRingbufferDelete(handle);
     spi_flash_guard_get()->end(); // Re-enables flash cache

+ 1 - 0
components/freertos/linker.lf

@@ -2,4 +2,5 @@
 archive: libfreertos.a
 entries:
     * (noflash_text)
+    queue:xQueueGenericCreateStatic (default)