"Hello Word" code on FreeRTOS does not display output

Thank you for responding
I was trying o implement a simple “hello word” program on FreeRTOS using HiFiv RevB and Freedom Studio. Code gets Built successfully and Debug step is also completed but the output is not available on the terminal. Please check and suggest where I am going wrong!

#include <stdio.h>
#include “FreeRTOS.h”
#include “task.h”

TaskHandle_t myTask1Handle = NULL;

void myTask1(void p){
int count=0;
const char * const pcMessage = “Hello Word\r\n”;*/
printf(“Hello Word: %d\r\n”,count++);

int main(void)
xTaskCreate(myTask1, “task1”, 1024, NULL,1, NULL );




Hi Abhishek,

I just brought up my HiFive1 RevB target and created an “example-freertos-minimal” project using the Freedom E SDK instance bundled with Freedom Studio. I am able to see output on the serial port terminal in Freedom Studio. The example code uses this construct to output text:

	const char * const pcMessage = "FreeRTOS Demo start\r\n";
	write( STDOUT_FILENO, pcMessage, strlen( pcMessage ) );

It does not use the printf() function. Also, the board presents two serial ports. On my Windows system I see the output on the highest numbers serial port.


I agree with ur observation. I was able to run and modify sample freertos code using write function.
I was referring to freertos code that was typically used on arm controllers and considering its simplicity, expected it to run on HiFive board as well but no success.

As far as I recall, with FreeRTOS, you may need to implement some code to redirect printf() to a specific device such as a UART. The Arm FreeRTOS port that you previously used may have had this implemented for printf() redirection to a UART by default. I presume that the FreeRTOS documentation covers this?