My very first post here. So please be gentle. After successfully compiling and flashing my very first c program that blinks a LED tied to GPIO2; I wanted to try out sending some text over the UART using os_printf(). The output image is built using esp-open-sdk and esspressif 0.9.3 SDK. The program compiles without errors, and I was able to flash the image on to the esp8266. I can see from the blue led that there is definitely stuff coming out of the UART; which is a good sign. But all I see on the serial terminal is just unreadable garbage. I have tried 9600, 115200 and a bunch of other baud rates. Any help is appreciated. It's kind of annoying when such a simple program turns out to be a major pain in the you-know-what.
Thanks
. . . header files . . .
#define user_procTaskPrio 0
#define user_procTaskQueueLen 1
os_event_t user_procTaskQueue[user_procTaskQueueLen];
static void loop(os_event_t *events);
//Main code function
static void ICACHE_FLASH_ATTR
loop(os_event_t *events)
{
os_printf("Hello\n\r");
os_delay_us(10000);
system_os_post(user_procTaskPrio, 0, 0 );
}
//Init function
void ICACHE_FLASH_ATTR
user_init()
{
//Start os task
system_os_task(loop, user_procTaskPrio,user_procTaskQueue, user_procTaskQueueLen);
system_os_post(user_procTaskPrio, 0, 0 );
}