This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
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
Dear Bob,
Ethernet application works when application code programmed through jtag (XDS110).but if application code programmed through the Erhernet boot loader it get struck after some time.
So if i comment memp_init() fuction in lwip_init(),the application wont get struck but ethernet wont work it seems like there must be some memory related problem so can you tell me the exact reason for this problem
Dear Bob,
My application is running in flash bank 1 and i wanted to store some data in same bank so how can i read and write same bank through my application
While it is possible to use the FEE driver to write a single value to bank 7, you do not get to define it to a specific address. In this case you can just use the F021 Flash API functions to program that location. The flowchart for programming is here. I suggest you program a 64-bit location (8-bytes) using the "Fapi_AutoEccGeneration" mode.
There is not Fapi_BlockProgram function in v2.01.01 of the F021 Flash API. Is this a function you wrote?
Hi Bob,
while writing application in flash application is getting struck in Fapi_issueProgrammingCommand fuction.
I have uploaded the project please try it in tms570lc4357 launch pad and give some solution because project is in development stage we have
to finalize the processor if all goes well it will be in consider as regular product or we have to think about some other make processors.
/cfs-file/__key/communityserver-discussions-components-files/312/6014.BOOT_5F00_APP.rar
Hi chuck,
do you have any proven boot loader application example for TMS570LC4357 launch pad.
i downloaded boot application for TMS570LS3137 for ti forum similarly is there any example code for TMS570LC4357.
Hello Sunil,
I have uart bootloader for RM57. RM57 and TM570LC4357 have same package, architecture, flash, SRAM, but different endianess.
Hi,
In my boot loader application i am not erasing bank 0, i am erasing bank 1 and writing application in bank 1 only.
Hi Wang,
It wont work for 300MHz frequency so I kept system clock frequency to 150MHz
Hi Wang,
The problem I am facing is,after dumping boot loader code I can able to dump application binary file in flash bank 1 and application runs properly then if I modify the application and generate the binary file and again try to dump then application gets struck but if I put previous application bin file again then it get dumped, so to dump modified application binary file I need to dump boot loader code again.
Hello Sunil,
So my understanding is:
1. Program Bootloader to flash bank0 through JTAG -- work
2. Program original Application binary to flash bank1 through Bootloader -- work
3. program the updated Application binary to flash bank1 through bootloader -- fail
4. Re-Program original Application binary to flash bank1 through bootlader -- work
5. Re-program bootloader to bank0, then program the updated application binary to bank1 through bootloader -- work
What is the difference between the original application and the updated application? Did you modify the cmd file?
Hi Wang,
yes Exactly same,i am not modified any cmd file in updated application i will just comment any of the condition in my application or will add any of the condition in my application that's it.
Hi Wang,
i am just changing the text message which is sending through the serial port and generate the binary file.
for example in first Binary file i am sending sciDisplayText(sciREG1,(uint8_t *)"Boot testBin==", sizeof("Boot testBin==")) and in second bin file sending
sciDisplayText(sciREG1,(uint8_t *)"Boot testBinary==", sizeof("Boot testBinary==")) .there wont be any other changes in source.
even you can add any logic in application or remove logic from application and try tu put it doesn't work
Hi Wang,
I have attached RAR file which included with boot loader and application project with used tool and procedure of testing.
2251.BOOT_LOAD.rarHi Wang,
Hello Sunil,
I tested the boatloader itself, it works on and the application image is programmed into the flash bank1.
The code gets stuck somewhere, I didn't get the display of "BOOT BIN1=xxx".
I checked the CP15 registers, the value in data fault and instruction fault registers: 0x00001008 which is a synchronous external abort. It is a software error that a store instruction occurred to an unmapped memory address.
Hi wang,
After programming application image you just restart the launch pad so application gets run and you can get the data from SCI1 debug port of launchpad with the baud rate of 9600.
I have attached 2 application binary file you just program application image BIN1 after programming boot loader image and restart the launch pad then application gets run then follow the the procedure which i have given earlier to program the application image BIN2.
Hello Sunil,
This is a different question. Can you start another thread? Otherwise, I have to scroll down pages to read your latest post.
This is my test:
1. Program the bootloader
2. Start the bootloader + TeraTerm + tftp32 (or 64)
3. Download BIN1 to bank1 without any problem
4. Re-start bootloader, download BIN2 with tftp32, and got a timeout problem as below:
5. Re-start the bootloader, and program BIN1 again, I did not see any problem.
What are the differences between BIN1 and BIN2?
Hi Wang,
i just added some logic related with my application there wont be any much difference between both BIN.
the problem is same what i told earlier and telling now. i am just trying to simplify for better understanding.
for your reference you can also add some logic in source TFTP application code which i have given and generate BIN and just modify the source application simply by adding logic or removing logic in application code and generate bin so both generated bin you can program through the above procedure in that the bin you put after boot loader program will dump but the bin which you put second time will get time out.
In above test you programmed BIN1 in flash 1 and while trying to program BIN2 you will get time out so if you do reverse i mean first you put BIN2 and then you try to put BIN1 then time out appear while putting BIN1.
Hello Sunil,
I repeated re-programming BIN1 through bootloader several times, didn't see the problem so far.
Hi Wang,
After Boot loader program through JTAG you can program any BIN(BIN1 or BIN2),there wont be any problem.but once you program BIN1 then you cant program BIN2. If you program BIN2 then you cant program BIN1 .but same BIN can be program repeatedly.