You can chat about native SDK questions and issues here.

User avatar
By JackB
#66723 So I gave up on the AT interface and have installed a virtual Ubuntu and installed esp-open-sdk, and was able to compile and install the 'blinky' program on my esp-12, and it WORKS, i.e. it blinks the led. Woo Hoo! ( I note I had to edit the makefile since the flash locations were different).

OK, cool, now I copied the blinky code to another directory, changed the name from blinky to usermain, edit the makefile for the name changed, fixed the flash locations, and got THAT to compile and load and run. Then implemented a simple http server, and THAT works. Progress. So now I move on getting the serial communication to work, and I start with just putting os_printf statements in my app, but I see no output. Boo hoo.

If I reset/reboot the board, it spits out some garbage, which I assume is the wrong baud rate, but it does show that minicom is getting output from the esp8266. I tried different baud rates, 115200 garbage, 78800 garbage, etc, and no success here, and don't really care about the boot messages anyway, but I still don't see any outputs from my app os_printf statements, not even any garbage. What could be wrong? Well some say I must init the uart in my user_setup, but I have not seen that done in any examples, but I tried it and there is no uart_init symbol defined.
OK, another post There was a uart_div_modify(0, UART_CLK_FREQ / 115200) to change the baud, so I tried that and uart_div_modify was defined, but this didn't cause any output to be seen, so I went back to trying to get a uart_init working.
This lead me to digging around until I found libdriver.a with that symbol, and when I link that lib to my app, I get a iram1_0_seg overflow. WTF? So then I found uart.c
and got that to compile and linked that into my app, and get the same overflow error.

Ok, I'm stumped.
A) shouldn't os_printf just output to the same serial line (uart0) that is used to upload new firmware? I read that uart1 can also be used but docs say uart0 is the default.
B) do I need to init the uarts?

thanks, appreciate any help.
User avatar
By JackB
#66732
davydnorris wrote:Just a small thing - it's 76800, not 78800 and that's the start up boot baud rate.
See if that gets you going and if not we'll next look at your compile issues


I've tried all kinds of baud rates, they tend to change the kind of garbage, but none work,
in any case I don't get any output once user_init has started, i.e.

Code: Select allvoid ICACHE_FLASH_ATTR user_init()
{
  // init gpio subsytem
  gpio_init();
  uart_div_modify(0, UART_CLK_FREQ / 115200);
  os_printf("Hello World\r\n");
  ...
 }

 
User avatar
By JackB
#66733 Port /dev/ttyUSB0, 13:59:48

Press CTRL-A Z for help on special keys

This is what I see at 76800 baud, then silence once my program starts and the led is blinking.

lrâÜçÉ8ærlØrcânà
ìp|ßìxßÇÜäp
ònnäÄ;ònÄä
bç$rrpònàÜ
àÀl
bnâãnÀäìØ
8
ònnîÄÁl`Ü#nrnrß;
À
?rpònàÜ
àrâ
p
pÜ<ÄãlÜ
bÀÄ>~ònîÄÀ
rÜ#nÀ$l`8`rn|nÀàr`9~ÄÀ
Ü#n$
ònnîÄØl`nnàÜ
àrÇâìÇ8
pÜ<ÄÃ
8
ònnîÄÁl`#nÀrnrß;
À
à;rÛnà{âÜì8nä>rØònãb
lrâÜçÉ8æ