I followed the steps in the following article to integrate PlatformIO with Renode:
The demo works properly, but however I’m not able to run my own custom programs
Here’s a program I wrote:
#include <FreeRTOS.h>
#include <stdio.h>
#include <queue.h>
#include <task.h>
TaskHandle_t vTask1Handle = NULL;
void vTask1(void* pvParameters)
{
int count = 0;
while(1)
{
printf("This is Task 1: %d\r\n", count++);
vTaskDelay(1000);
}
}
int main(void)
{
xTaskCreate(&vTask1, // Function that the task executes
"Task 1", // Name
1024, // Stack Size
NULL, // Parameters
1, // Priority
&vTask1Handle); // Task Handler
vTaskStartScheduler();
while(1)
{
;
}
return 0;
}
Here’s the platformio.ini file:
[env:sipeed-maix-go]
platform = kendryte210
board = sipeed-maix-go
framework = kendryte-freertos-sdk
## ----- Settings below are for Antmicro Renode integration ----- ##
# Monitor port for Renode integration
monitor_port = socket://localhost:1234
monitor_speed = 115200
# Upload settings for Renode integration
; debug_tool = renode
upload_port = /dev/ttyUSB0
upload_command = renode $UPLOAD_FLAGS
upload_flags =
-e include @scripts/single-node/kendryte_k210.resc
-e machine StartGdbServer 3333 True
-e logLevel 3 ;Loglevel = Error
-e emulation CreateServerSocketTerminal 1234 \"externalUART\"
-e connector Connect uart externalUART
-e sysbus LoadELF @$PROJECT_BUILD_DIR/$PIOENV/$PROGNAME".elf"
-e start
# Debug settings for Renode integration
debug_tool = custom
debug_port = localhost:3333
debug_server = renode
--hide-log
-e include @scripts/single-node/kendryte_k210.resc
-e machine StartGdbServer 3333 True
-e logLevel 3 ;Loglevel = Error
-e emulation CreateServerSocketTerminal 1234 "externalUART"
-e connector Connect uart externalUART
debug_extra_cmds =
monitor start
It gets stuck. But if I remove the line involving delay, it works perfectly. I’m also facing similar issues while using queues. I believe that I would have to make some changes in the FreeRTOS source files. Please let me know what do I have to do and where I could find the source files.