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.
Hi TI Team,
I currently working on a project based on ethernet bootloader. The Application code was transfering but not executing.
Here below i have mentioned the address used in application code,
VECTORS (X) : origin=0x00020020 length=0x00000020
FLASH0 (RX) : origin=0x00020040 length=0x0015FFC0
FLASH1 (RX) : origin=0x00180000 length=0x00180000
STACKS (RW) : origin=0x08000000 length=0x00001500
RAM (RW) : origin=0x08001500 length=0x0003EB00
My APP start address was 0x00020020.The code executing some time but suddenly occurs data abort exception. My app bin size size was 112KB I have allocated 128KB for APP IMAGE FILE. Other than this project all other project which are smaller bin size like 32kb,12bkb lesser than that was perfectly executing with the same procedure. But the main project i have made was not executing.
I have searched several thread regrading this problem, I was increased the stack memory space. I have tried them but issue was not cleared,
Please guide me what was the mistake i have made.
Thanks in Advance,
Best Regards,
A. Ajith Kumar
HI TI Team,
From above thread i have filed,i have found out that lwip ethernet data receive peripheral was not executing.Other than that all other peripherals was working correctly i have checked spi,gpio,rti timer,uart,n2het timer this peripheral was used in application program was working perfectly.But lwip program included it hanging on data entry(data abort exception).
In my project i want to receive the ethernet data.Is there any example program to receive ethernet data without lwip or any other procedure is there or how to overcome this issue.When my application code is filled with lwip program was that executing.
Please support us, Eagerly waiting for your response.
Thanks and Regards,
A.Ajith Kumar
Hi Ajith Kumar,
Can i get your complete project of the bootloader and application for the verification?
You can just do a private message if needed.
--
Thanks & regards,
Jagadish.
Hi Jagadish,
I have sent application code(main project)to you privately.
Thanks and Regards,
A. Ajith Kumar
Hi Jagadish,
I have found that while receiving the ethernet data the code was hanging in data entry. I have attached the project below,
I have attached a video below,
In that video I have created a program LWIP Ethernet data receive while executing the code as in main program I have received the ethernet data which I was sent through HERCULES Software. After that I have dumped the ethernet bootloader code to the board and I have sent the LWIP ethernet data receive code as application code to the board. But while executing the application code the code was hanging in data entry during ethernet data receive.
Kindly guide me to rectify the problem.
Please share me the update as soon as possible.
Thanks in advance
Best Regards,
A.Ajith Kumar
Hi Ajith Kumar,
Can you please test with my debug code once.
Just now i tested and i don't see any data abort and also here is the serial COM results:
As you can see after downloading the application i just changed the baud rate to 9600 and you can see the application output also in serial COM.
Here is my bootloader code, please test it and let me know the results.
0028.Hercules_Ethernet_Bootloader.zip
--
Thanks & regards,
Jagadish.
Hi Jagadish,
The above bootloader code you have provided was not debugging for me.
And I have an previous Ethernet Bootloader example and debugged and dumped it.it does not work.
Please check the application code was working after reset sometimes it was working in first time after the reset it does not.
--
Thanks & regards,
A.Ajith Kumar
Hi Ajith Kumar,
8255.Hercules_Ethernet_Bootloader.zip
Use same application code you used before, but use bootloader as above project.
Two things you may consider here.
1. One is the above bootloader i used and tested on lauchpad but if you are using HDK board then in project properties you should need to change the debugger to XDS100 v2
2. I tested with static ip, but you can't use my static ip settings directly in your PC right?
either you have to change static ip compatible with your PC or else you have to use dynamic ip.
So please change it accordingly.
--
Thanks & regards,
Jagadish.
Hi Jagadish,
I have downloaded the project which you have provided. Is not connecting to my target i am using LAUNCHXL2-RM57L and XDS110 on board usb debug probe it was successfully verified.But the target was not connecting.I have shared the video which i was done.
Thanks and Regards,
A.Ajith Kumar
Hi Ajith kumar,
Just do the following steps after getting error,
1. Right click on the debugger and click on connect target as shown below
2. once the target is connected
Now just select load option in Run menu
3. Now click on browse project
And select the bootloader project that we need to load.
4. Now click on ok to load the project
5. Once the project got loaded you can see normal debug window,
--
Thanks & regards,
Jagadish
Hi Jagadish,
Thanks for your response. The target was connected.
Jagadish said "Use same application code you used before, but use bootloader as above project".
I have used the bootloader as above project and used the application code as same as before. But the program still hanging on data entry abort for me.
Kindly please check for me after the application code was transmitted press the reset button and the application code working or hanging in data entry .This was the issue for me.
After that I have made several chances in HL_sys_intvecs.c file as below,in my application code and bootloader code.
.sect ".intvecs"
.arm
;-------------------------------------------------------------------------------
; import reference for interrupt routines
.ref _c_int00
.ref phantomInterrupt
.def resetEntry
;-------------------------------------------------------------------------------
; interrupt vectors
resetEntry
b _c_int00
undefEntry
b #0x00020004
svcEntry
b #0x00020008
prefetchEntry
b #0x0002000C
dataEntry
b #0x00020010
b phantomInterrupt
ldr pc,[pc,#-0x1b0]
ldr pc,[pc,#-0x1b0]
After mading this changes my code was Break at address "0x20030" with no debug information available, or outside of program code.
and continuously program restarting and executing.
Kindly guide me,
Thanks and Regards,
A.Ajith Kumar
Hi Ajith Kumar,
Actually, when i tested at my end with the same application project, i didn't see any abort issues.
Anyway, let me test it again. But i will be out of office till this Monday, so please expect some delay for further update on this issue.
--
Thanks & regards,
Jagadish.
Hi Ajith Kumar,
I tested again but i don't see any issues.
Here is the screen recording for my testing:
--
Thanks & regards,
Jagadish.
Hi Jagadish,
Thats not my issue. My application code was executing for first time as shown in your video but after pressing the reset button again and again it was hanging in data entry.
Now the issue was solved by changing the reset source to external source in HL_sys_startup.c and disabling the cache and mpu in halcogen R5-MPU-PMU tab.
Thanks for your supports,
Regards,
A. Ajith Kumar
Hi Ajith Kumar,
I understood the root cause for the problem:
Actually, there are two RESET possibilities in Debug right?
CPU Reset and System Reset.
If we do System Reset then SYS ESR register value is becoming the 0x808 like as shown below:
And due to this the Reset source is becoming EXT RESET:
If reset source is EXT RESET, then there won't be any issue in the execution because all the initializations like memory, system and VIM initializations will be happen in this case:
But if i did "CPU RESET" in debugger then SYS ESR register value becomes 0x00000000
So, due to this the reset source value becomes NO_RESET:
So, as reset source value becomes NO_RESET, then the execution will directly go to _mpuInit_ function without performing memory initializations, System initializations and VIM initializations as we discussed earlier.
Due to that, the program ends up "dataEntry" abort.
Solution:
This issue was already identified in the past
(+) TMS570LC4357: When switching from bootloader to application, the application get stuck at etharp_gratuitous(netif) - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums
Here they just added all the initializations functions in the NO_RESET case as well, if we do that then it won't be problem. Whenever we perform CPU_RESET also all the initializations will happen and code will work perfectly.
The other way is just don't do CPU RESET, instead of do SYSTEM RESET only.
--
Thanks & regards,
Jagadish.