I’m having this strange problem using freertos. So basically in main.c I use the following code to statically assign xQueue to address 0x0820F000.
static QueueHandle_t xQueue __attribute__ ((section("0x0820F000"))) = NULL;
objdump -t shows that xQueue was exactly at 0x0820F000. However, after I boot the kernel using
qemu-system-riscv32 and use gdb to debug it, I found that somehow during runtime the xQueue was in somewhere else, not at 0x0820F000 anymore. I checked that both in runtime and using objdump the initial address for kernel was the same, so how can xQueue goes to somewhere else.
Also, I know it is not exactly a FreeRTOS question (I’ve checked some related questions on the forums), but I’m wondering if there is a way that can make a variable assigned at a specific address in the FreeRTOS kernel?