Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Error compiling the Mg Net Lib for the TMS570 on LWIP 2.0.3

slushman007slushman007 Magog, Canada

I have previously ported lwip for TI TMS570 without an OS. Currently I tried to add the Mg Network Lib on top of lwip to have a decent http server with digest authentification, but I can't get it compiling.
Which options should I put in the "mg_locals.h" to make it works? Currently I get errors during the linking about mongoose not finding "lwip_close", "lwip_recv" nor "lwip_send".

/*
 * mg_locals.h
 *
 *  Created on: Aug 1, 2018
 *      Author: blanc
 */

 #ifndef CONFIG_MG_LOCALS_H_
 #define CONFIG_MG_LOCALS_H_

 #define CS_PLATFORM 0

 #define LWIP_TCP 1
 #include <assert.h>
 #include <ctype.h>
 #include <errno.h>
 #include "lwip/err.h"
 #include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 #include <time.h>
 #include <lwip/inet.h>
 #include <lwip/opt.h>


 #define MG_LWIP 1

/* We really need the definitions from sockets.h. */

 #ifdef LWIP_HDR_SOCKETS_H 
 #undef LWIP_HDR_SOCKETS_H
 #endif

 #ifndef MG_NET_IF
 #define MG_NET_IF MG_NET_IF_LWIP_LOW_LEVEL
 #endif

 #include "src/common/platforms/lwip/mg_lwip.h"
 #include "src/common/platforms/lwip/mg_lwip_net_if.h"

 #ifndef CS_ENABLE_STDIO
 #define CS_ENABLE_STDIO 1
 #endif

 #define SIZE_T_FMT "u"
typedef struct stat cs_stat_t;
 #define DIRSEP '/'
 #define to64(x) strtoll(x, NULL, 10)
 #define INT64_FMT PRId64
 #define INT64_X_FMT PRIx64
 #define __cdecl
 #define INVALID_SOCKET (-1)
 #define SOMAXCONN 10

void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
                                  int interval, int count);


 #endif /* CONFIG_MG_LOCALS_H_ */

**** Build of configuration Debug for project nodeRt ****

"C:\ti\ccsv8\utils\bin\gmake" -k -j 8 all -O

Building file: "../mongoose/mongoose.c"
Invoking: ARM Compiler
"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --include_path="C:/views/nodeRt/SC3RT/include" --include_path="C:/views/nodeRt/SC3RT/mongoose" --include_path="C:/views/nodeRt/SC3RT/mongoose/src" --include_path="C:/views/nodeRt/SC3RT/mongoose/src/common" --include_path="C:/views/nodeRt/SC3RT/mongoose/src/common/platforms" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/ports/hdk/include/arch" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include" --include_path="C:/views/nodeRt/SC3RT" --include_path="C:/views/nodeRt/SC3RT/config" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/ports/hdk/check" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/ports/hdk" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/src/include" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/src/apps/httpd" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/src/core/ipv4" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/ports/hdk/include/netif" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/ports/hdk/netif" --include_path="C:/views/nodeRt/SC3RT/lwip-2.0.3/ports/hdk/include" --define=MG_ENABLE_HTTP --define=MG_CUSTOM --define=MG_LOCALS --define=MG_ENABLE_BROADCAST --define=MG_ENABLE_MULTICAST -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="mongoose/mongoose.d_raw" --obj_directory="mongoose"  "../mongoose/mongoose.c"
"C:/views/nodeRt/SC3RT/mongoose/src/common/platforms/lwip/mg_lwip_net_if.h", line 33: warning #109-D: signed bit field of length 1
"C:/views/nodeRt/SC3RT/mongoose/src/common/platforms/lwip/mg_lwip_net_if.h", line 35: warning #109-D: signed bit field of length 1
"../mongoose/mongoose.c", line 845: warning #225-D: function "gettimeofday" declared implicitly
"../mongoose/mongoose.c", line 10269: warning #179-D: function "mg_get_errno" was declared but never referenced
Finished building: "../mongoose/mongoose.c"

Building target: "nodeRt.out"
Invoking: ARM Linker
"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armcl" -mv7R4 --code_state=32 --float_support=VFPv3D16 --define=MG_ENABLE_HTTP --define=MG_CUSTOM --define=MG_LOCALS --define=MG_ENABLE_BROADCAST --define=MG_ENABLE_MULTICAST -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi -z -m"nodeRt.map" --heap_size=0x800 --stack_size=0x800 -i"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/lib" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="nodeRt_linkInfo.xml" --rom_model --be32 -o "nodeRt.out" "./lwip-2.0.3/ports/hdk/lwiplib.obj" "./lwip-2.0.3/src/apps/httpd/fs.obj" "./lwip-2.0.3/src/apps/httpd/httpd.obj" "./lwip-2.0.3/src/core/def.obj" "./lwip-2.0.3/src/core/timeouts.obj" "./lwip-2.0.3/src/netif/ethernetif.obj" "./lwip-2.0.3/src/netif/slipif.obj" "./mongoose/mongoose.obj" "./source/dabort.obj" "./source/emac.obj" "./source/esm.obj" "./source/gio.obj" "./source/mdio.obj" "./source/notification.obj" "./source/phy_dp83640.obj" "./source/pinmux.obj" "./source/rti.obj" "./source/sci.obj" "./source/sys_core.obj" "./source/sys_dma.obj" "./source/sys_intvecs.obj" "./source/sys_main.obj" "./source/sys_mpu.obj" "./source/sys_pcr.obj" "./source/sys_phantom.obj" "./source/sys_pmm.obj" "./source/sys_pmu.obj" "./source/sys_selftest.obj" "./source/sys_startup.obj" "./source/sys_vim.obj" "./source/system.obj" "../source/sys_link.cmd"  -lrtsv7R4_T_be_v3D16_eabi.lib 
<Linking>

 undefined  first referenced       
  symbol        in file            
 ---------  ----------------       
 lwip_close ./mongoose/mongoose.obj
 lwip_recv  ./mongoose/mongoose.obj
 lwip_send  ./mongoose/mongoose.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "nodeRt.out" not built

 #>> Compilation failure
makefile:183: recipe for target 'nodeRt.out' failed
gmake[1]: *** [nodeRt.out] Error 1
makefile:179: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****
Sign In or Register to comment.