Other Parts Discussed in Thread: TMS570LC4357, TMS570LS3137
Tool/software: Starterware
Hi,
I am using TMS570LC4357 Launch pad and implement Ethernet boot loader where my application is in Flash bank1
from the location 0x00200000 for this i made some changes in sys link cmd in application project and Application code
having only sci and some gpio, in this case application is working fine even though the system get restart the application runs properly,
but when application is included with LWIP_Init then the application get struck after 200 odd cycle.
Application project
/* USER CODE BEGIN (0) */
#include "lwip/udp.h"
#include "lwip/ip_addr.h"
#include "HL_sci.h"
#include "HL_reg_sci.h"
#include "HL_gio.h"
#include "ti_fee.h"
#include "lwiplib.h"
#include "HL_sys_common.h"
extern void EMAC_LwIP_Main (uint8_t * emacAddress);
extern void gioInit();
void Debug_Display_Val(unsigned int);
void sciDisplayText (sciBASE_t *sci, uint8_t *text,uint32_t length);
struct udp_pcb *pcb;
struct ip_addr ipaddr, netmask, gw,Src,Dst;
unsigned short PORT_NO=7000;
uint8 emacAddress[6U] = {0x00U, 0x08U, 0xEEU, 0x03U, 0xA6U, 0x6CU};
uint32 emacPhyAddress = 1U;
int main(void)
{
uint32 Ip_addr=0xC0A8000C,Gatway=0xC0A80001,Net_Mask=0xFFFFFF00;/* Initialize RAM array.*/
gioInit();
IP4_ADDR(&Src, 192, 168, 0, 12);
IP4_ADDR(&Dst, 192, 168, 0, 10);
IP4_ADDR(&netmask, 255, 255, 255, 0);
IP4_ADDR(&gw, 192, 168, 0, 1);
//EMAC_LwIP_Main(emacAddress);
lwIPInit(0,emacAddress,Ip_addr ,Net_Mask,Gatway,IPADDR_USE_STATIC); //if comment this lwip init apllication will run properly or else it get struck after 200 or odd cycles
while(1)
{
sciDisplayText(sciREG1,(uint8_t *)"Testing serial==", sizeof("Testing serial=="));
sciDisplayText(sciREG1,(uint8_t *)"\r \n", sizeof("\r \n"));
}
}
changes in sys link cmd
VECTORS (X) : origin=0x00200000 length=0x00200020
//FLASH0 (RX) : origin=0x00000020 length=0x001FFFE0
FLASH1 (RW) : origin=0x00200020 length=0x001FFFE0
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x0002EB00
So please help me to resolve this problem if you want i will attach both boot loader and application code