Missing freertos component

I noticed that freertos is not in the following directory:

./amazon-freertos/vendors/espressif/esp-idf/components

However it is in the official esp-idf release v3.3
Link to ESP-IDF repo

Specifically I was trying to use gdbstub and gdbstub.c contains the following function:

static unsigned getTaskInfo(unsigned index, unsigned * handle, const char ** name, unsigned * coreId) {
	static unsigned taskCount = 0;
	static TaskSnapshot_t tasks[STUB_TASKS_NUM];

	if (!taskCount) {
		unsigned tcbSize = 0;
		taskCount = uxTaskGetSnapshotAll(tasks, STUB_TASKS_NUM, &tcbSize);
	}
	if (index < taskCount) {
		TaskHandle_t h = (TaskHandle_t)tasks[index].pxTCB;
		if (handle) *handle = (unsigned)h;
		if (name) *name = pcTaskGetTaskName(h);
		if (coreId) *coreId = xTaskGetAffinity(h);
	}
	return taskCount;
}

where

TaskSnapshot_t

and

uxTaskGetSnapshotAll()

are defined in the freertos component’s task.h. But these aren’t included in the AmazonFreeRTOS build. So I was wondering how I could use this component for my ESP32?

Thanks!

@isnore,

Thank you bringing this issue into our attention. I have a few questions/comments related to the issue that you are facing.

  1. Which version of amazon-freertos are you using?
  2. Are you following the build steps from AWS docs for building for FreeRTOS for ESP?
  3. ESP-IDF is maintained by ESP. Also the file gdbstub.c is maintained by ESP. I have also noticed that the FreeRTOS kernel version used in the ESP-IDF release 3.3 is an older version(V8.2.0) whereas the latest kernel version is V10.3.1. ESP forums would be a good resource for checking if there are any list of supported FreeRTOS kernel versions to be used with ESP-IDF release 3.3.
  1. I’m using the latest version on the master branch
  2. Yes, I’ve got other aspects of my custom project working correctly.
  3. Would the kernel version provide a different version of the task.h file?

@isnore,

Thanks for the answers 1 and 2.
For the kernel version, kernel version V8.2.0 task.h file doesn’t have TaskSnapshot_t and uxTaskGetSnapshotAll(). Whereas the task.h included in the ESP-IDF V3.3 has those members. This difference could be a ESP specific modification. So Espressif forum (link ) could be the best place to answer this, so could you try posting your query there?

Okay but I am simply using the ESP version that is included in the AmazonFreeRTOS git repo. Am I expect to upgrade that version? I suspect that would break somethings.