nobody wrote on Wednesday, October 18, 2006:
I tried to compile the SAM7 Rowley Web Demo(IwIP) but the board’s Ethernet didn’t show any signs of life.The other tasks seems to work O.K. After some search in the code and a few debug msgs on UART I found that the source of the problem was the code below:
In file netif.c
/* call user specified initialization function for netif */
if (init(netif) != ERR_OK) {
return NULL;
}
The code simply stuck here when the init(netif) is called. In project’s .elf file it jumps to an address that it doesn’t seem to have any meaning:
4718 bx r3
46C0 mov r8, r8
*
*/
void
pbuf_init(void)
{
B5F0 push {r4-r7, lr}
struct pbuf *p, *q = NULL;
u16_t i;
pbuf_pool = (struct pbuf *)&pbuf_pool_memory[0];
4810 ldr r0, [pc, #0x040]
4B10 ldr r3, [pc, #0x040]
6018 str r0, [r3, #0x00]
LWIP_ASSERT("pbuf_init: pool aligned", (mem_ptr_t)pbuf_pool % MEM_ALIGNMENT == 0);
#if PBUF_STATS
lwip_stats.pbuf.avail = PBUF_POOL_SIZE;
4910 ldr r1, [pc, #0x040]
2204 movs r2, #0x04
23A8 movs r3, #0xa8…
Maybe the compiler is trying to change mode Thumb–>ARM? I really don’t understand.
I searched a bit but I couldn’t find where’s the function’s code. Any clues anyone? Did anybody have the same problem?