M52235EVB gcc opentcp arpinit

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

M52235EVB gcc opentcp arpinit

1,074 次查看
Petter
Contributor II
I'm trying to include opentcp in my application. I have a small UART application which is writing data to the serial port just fine. This is on a M52235EVB. I'm using gcc under Linux. However, when I include opentcp and call arpinit in my program it will not run. This occurs even if arpinit is called at the very end of the program. It will lock up long before the it reaches the call to arpinit. If I change the #if 0 to a #if 1 I will never reach the arpinit.
  uart_putchar(0,'>');

  while (1) {
    if (uart_getchar_present(0)) {
      led = ~led;
      led_val(led);
      c = uart_getchar(0);
      uart_putchar(0,c);
      if (c== 'q') {
        break;
      }
    }
  }
#if 0
 arpinit();
#endif


It seems like it's the inclusion of arpinit which is causing the problem. Any ideas or anybody who has experienced similar problems?

TIA.

标签 (1)
0 项奖励
1 回复

248 次查看
Petter
Contributor II
It seems like this is related to global variables (e.g. .bss) data which is initialized. But I have other programs using the same linker-script and makefiles which is also using global variables...
0 项奖励