I'm using a CC3100 SimpleLink and FreeRtos on an STM32F4 part and am trying to move my code into a library.
If I setup the OS, start SinpleLink, connect to my AP and wait a little while, I can call sl_NetAppDnsGetHostByName() and get proper name resolution all day long.
If I call a function libgetname() which is in a library, sl_NetAppDnsGetHostByName() returns with SL_NET_APP_DNS_INTERNAL_8 all day long.
I've put a breakpoint at the entry to sl_NetAppDnsGetHostByName() and I can see that the exact same parameters are in R0-3, so I'm confised as to what's going on.
function maingetname() and libgetname() are identical. One is in the main project and one is in a library that was compiled using a different workspace/project.
mygetname()/libgetname() {
char bname[] = "google.com";
int retval;
long uiIP;
retval = sl_NetAppDnsGetHostByName(copied_name, sizeof( bname ), (unsigned long*) &uiIP, SL_AF_INET );
printf("retval = %d IP = 0x%08x\n",retval,uiIP);
}
The library is built with the same processor target as the main application.
My process is as follows:
1) open the workspace/project for the library project.
2) Build the library.
3) Open the workspace/project for the main application
4) Build and link in the library from the library project with Options->Linker->Library set toC:\cygwin64\home\myname\libmylib-v3\proj\IAR\libxively\Debug\Exe\libmylib.a
5) Download and debug using a IAR (Segger) Jlink
I figure I've got something misconfigured in the library build, but I just can't seem to find it.