Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
Hi E2E,
I am using TMS570LC4357 . I've found a CAN based bootloader in https://git.ti.com/cgit/hercules_examples/hercules_examples/. With little modification, the boot loader works fine for my own device.
Now I want to have a Ethernet Bootloader for my device, but there is no ethernet based boot loader for TMS570LC4357 so far.
So I think, by replacing the communication layers of the CAN based boot loader with ethernet based may works for me. I removed all code about CAN communication, added lwip 1.41 in and UDP is adopted.
The file bl_link.cmd of my ethernet boot loader is customized by QJ Wang (I just copy the file from the example boot loader project provided by QJ Wang). Here comes the problem:
1. With the bl_link.cmd and ethernet tx/rx interrupts enabled, the function _c_int00 called again and again. Keep this way.
I set a breakpoint in the line 113 of the file HL_sys_startup.c.
/* Reset handler: the following instructions read from the system exception status register
* to identify the cause of the CPU reset.
*/
rstSrc = getResetSource();
When function _c_int00 called, rstSrc is NO_RESET. SO WHY _c_int00 be called again and again?
2. BUT, if exclude file bl_link.cmd from build and use the HL_sys_link.cmd generated by HALCoGen, the lwip runs well. Of cource, the main function needs some change.
I attached my project below. It's not finished yet. Hope to hear from you.