rtel wrote on Sunday, January 15, 2017:
the main(). I did your suggested send_character_to_uart(“a”) but i don’t
have its definition so it would not compile. So i did
It is pseudo code, intended to describe what I’m suggesting you do. It
is not a function that actually exists.
char *testuart; //declared pointer
testuart = “testing now\n”; \ assigned string literal to pointer
for( ; ; )
{
printf(testuart); \use printf to print string pointed to
}
It printed fine. Did as you said and xTaskCreate(my_uart_ask, …)
with for loop and printed fine.
So the characters are being output from your UART both with and without
the RTOS running?
You need to be careful with how printf() is implemented. Some
implementations are very stack hungry, can bring in all floating point
libraries bloating your code massively, and are almost never thread
safe. For something as simple as sending fixed strings it is best to
write to the UART directly (send characters to the UART regsiters
directly) rather than indirectly using printf.
Where is the send_character_to_uart defined?
As above, it doesn’t exist, which is why I said it was pseudo code, so
you wouldn’t think it did exist.
I have the vPrintString() defined so should also work.
Going back to the start of this thread. You have to provide an
implementation of vPrintString() that works for your application. Now
you have characters being output from the UART you can go ahead and
implement vPrintString() to call your printf() function … >>>>BUT<<<<
note all the other advice in this thread such as it is better NOT to use
printf() but write to the UART directly, copy other implementations of
vPrintString() to ensure it is FAST AND THREAD SAFE, etc.
How much hardware config does the FreeRTOS have and how do I modify it
to meet my microstickii needs?
Please read and re-read this thread and take note of what is being said,
all I can do is keep repeating myself. FreeRTOS does nothing with the
peripherals on your hardware other than the clock used to generate the
tick interrupt.
I maybe wrong but i thought most of the
config was in the FreeRTOS.
Yep, you were wrong, it has been mentioned once or twice ;o)