-->
Page 1 of 2

os_printf() prints nothing

PostPosted: Tue Apr 02, 2019 1:13 am
by andyjjones2
Hi everyone,

I'm trying to get the DHCP server (dhcpserver.c) to print DHCP debug information to the console. I can see that there are many calls (45 to be exact) calls to os_printf, however, none of them print anything to the console.

Strangely, in my app initialization code, if I call:
Code: Select allos_printf("Hello world, from os_printf()\n");

Then I see the 'hello world' message.

So basically os_printf() works at a high level, but not from within dhcpserver.c. Can somebody help?

Thankyou!

Re: os_printf() prints nothing

PostPosted: Tue Apr 02, 2019 4:46 pm
by davydnorris
Where are you calling your DHCP server code?

Make sure you set up the UART ports as one of the first things you do - os_printf relies on them being initialised. I do it as the first line in my startup code

Re: os_printf() prints nothing

PostPosted: Tue Apr 02, 2019 5:51 pm
by andyjjones2
Hi davydnorris, thanks for the reply.

It's part of MongooseOS, and I'm doing a local build. It appears that the toolchain I'm using insists on pulling certain parts of the Espressif SDK from the cloud instead of my version (which contains os_printf() calls).

I guess it's better that I ask the Mongoose OS forums than here, since it appears now to be a toolchain/build issue for Mongoose.

Re: os_printf() prints nothing

PostPosted: Wed Apr 03, 2019 12:00 pm
by Agentsmithers
Andy, if I may. What are you seeing technically on your side that would indicate that? Is it part of your makefile?