These routines are an useful tool for debugging complex systems based on Microchip's Ethernet-enabled PIC18 micro-controllers.
They take advantage of the large Ethernet packet buffer to save all the registers, hardware stack and RAM, immediately after an abnormal reset, before they get corrupted by the firmware.
NOTE: In the given sample the core-dump is saved to a file in a file-system. If your board doesn't have a file system, it would be possible to transmit the core-dump by any available interface (serial, for instance) even by the Ehternet controller if you are careful enough for not corrupting the core-dump image in the Ethernet packet buffer.
In the C library startup file (one of the following, depending on your configuration: c018_e.c, c018i_e.c or c018iz_e.c), replace the sequence:
" ... #pragma code _entry_scn=0x000000 void _entry (void) { _asm goto _startup _endasm} ... "With:
" ... extern void __init0 (void); #pragma code _entry_scn=0x000000 void _entry (void) { _asm goto __init0 _endasm} ... "
Probably you will need to add explicitly a linker-script file to your project, and comment the reference to the original "C018*.c".
Code:
file: /Techref/member/IMB-yahoo-J86/core-dump-PIC18FxxJ6x.htm, 2KB, , updated: 2014/2/10 12:45, local time: 2024/11/8 14:38,
owner: IMB-yahoo-J86,
3.129.63.186:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/Techref/member/IMB-yahoo-J86/core-dump-PIC18FxxJ6x.htm"> A core-dump implementation for PIC18 devices with on-chip Ethernet controller</A> |
Did you find what you needed? |