Tool/software: TI C/C++ Compiler
I am having some trouble with using the TI-RTOS NDK on the M3 core of an F28M36 Concerto.
Following the tcpecho example, I attempted to add the NDK to the .cfg file as follows.
/* ================ NDK configuration ================ */
var Ndk = xdc.loadPackage('ti.ndk.config');
var Global = xdc.useModule('ti.ndk.config.Global');
var Ip = xdc.useModule('ti.ndk.config.Ip');
var Tcp = xdc.useModule('ti.ndk.config.Tcp');
var Udp = xdc.useModule('ti.ndk.config.Udp');
Global.IPv6 = false;
Global.stackLibType = Global.MIN;
Global.networkOpenHook = "&net_open_hook";
/* automatically call fdOpen/CloseSession for our sockets Task */
Global.autoOpenCloseFD = true;
Global.pktNumFrameBufs = 10;
Global.memRawPageCount = 6;
Global.ndkThreadStackSize = 8192;
Global.lowTaskStackSize = 1024;
Global.normTaskStackSize = 1024;
Global.highTaskStackSize = 1024;
Tcp.transmitBufSize = 1024;
Tcp.receiveBufSize = 1024;
When this is added, the entire .const section is uninitialised, which naturally causes failure to boot due to crashing on the first de-reference of anything in .const, which happens to be when the XDC runtine Startup_execImpl (which is .const:xdc_runtime_Startup_execImpl__C) is used as a pointer.
This is the only change made. There is also no change to the linker .cmd file.
Without NDK in .cfg file, the .map file shows:
.init_array
* 0 00218000 00000000 UNINITIALIZED
.const 0 00227a80 0000233e
00227a80 00001840 prog_m3_pem3.oem3 (.const:xdc_runtime_Text_charTab__A)
With NDK in .cfg file:
.init_array
* 0 00218000 00000000 UNINITIALIZED
.const 0 00233364 00002554 UNINITIALIZED
00233364 0000186f prog_m3_pem3.oem3 (.const:xdc_runtime_Text_charTab__A)
What could be causing this section to become uninitialised, and how can I fix it?
The compiler is arm_15.12.3.LTS and the TI-RTOS version is tirtos_c2000_2_16_01_14.