rudy 1 Posted December 25, 2012 Share Posted December 25, 2012 hi, i tried enc module but froze on "wainting for ip" Welcome ENC_ESTAT: 1 Econ: 0 Silicon Revision: 6 int enabled Waiting for IP address... dhcp on router is on, works fine on other pc, i tried set static ip but server not working Any thoughts? langepaul and Rickta59 2 Quote Link to post Share on other sites
xpg 127 Posted December 30, 2012 Author Share Posted December 30, 2012 hi, i tried enc module but froze on "wainting for ip" Welcome ENC_ESTAT: 1 Econ: 0 Silicon Revision: 6 int enabled Waiting for IP address... dhcp on router is on, works fine on other pc, i tried set static ip but server not working Any thoughts? That sounds a bit strange. As the Silicon Revision is reported correctly, the MISO/MOSI and CLK lines are ok. Is the interrupt line correctly connected? It's supposed to be on PE4. Are you using the lwIP or the uIP version? Quote Link to post Share on other sites
jalder 0 Posted January 6, 2013 Share Posted January 6, 2013 I'm working with latest copy of your lwIP branch and running into some trouble. Welcome ENC_ESTAT: 1 Econ: 0 Silicon Revision: 6 int enabled launching lwip init lwip initialized adding netif add [Hard fault handler - all numbers in hex] R0 = 20004f44 R1 = 20004fb9 R2 = 12910 R3 = 6 R12 = 6 LR [R14] = 0 subroutine call return address PC [R15] = c71f program counter PSR = 12290 BFAR = e000ed38 CFSR = 10000 HFSR = 40000000 DFSR = 0 AFSR = 0 I'm getting a Hard Fault when trying to call the netif_add() function. I've tried both static and dhcp configurations, but no luck. I'm going to try digging deeper but was wondering/hoping you had ran into it and knew a quick fix. Thanks! Quote Link to post Share on other sites
xpg 127 Posted January 7, 2013 Author Share Posted January 7, 2013 I'm working with latest copy of your lwIP branch and running into some trouble. Welcome ENC_ESTAT: 1 Econ: 0 Silicon Revision: 6 int enabled launching lwip init lwip initialized adding netif add [Hard fault handler - all numbers in hex] R0 = 20004f44 R1 = 20004fb9 R2 = 12910 R3 = 6 R12 = 6 LR [R14] = 0 subroutine call return address PC [R15] = c71f program counter PSR = 12290 BFAR = e000ed38 CFSR = 10000 HFSR = 40000000 DFSR = 0 AFSR = 0 I'm getting a Hard Fault when trying to call the netif_add() function. I've tried both static and dhcp configurations, but no luck. I'm going to try digging deeper but was wondering/hoping you had ran into it and knew a quick fix. Thanks! Interessting. I haven't experienced that. If you could provide me with either the binary ELF file or the output of "objdump -d" run on the ELF file I will try and see if I can figure out what goes wrong. Cheers, Paul Quote Link to post Share on other sites
vincent1971 0 Posted January 7, 2013 Share Posted January 7, 2013 Maybe a stupid question. Is there a wizzard guide how to build this? I installed stellisware, works very fine, installed the gnu tools and what must I next?? Quote Link to post Share on other sites
jalder 0 Posted January 9, 2013 Share Posted January 9, 2013 Sure, attached is the main.elf. Be warned, it's pretty messy and riddled with snippets testing the LED ports and printf's from stepping through the program to see if it was indeed the netif_add() function. Thanks again! So, from what I've gathered with online resources, I'm thinking it is a stack/heap memory issue. I've tried adjusting the stack in startup_gcc as well as adjusting the memory variable in the lwip.opts without much luck. Not sure offhand what the last compiled combination that elf I've attached used. main.zip Quote Link to post Share on other sites
xpg 127 Posted January 9, 2013 Author Share Posted January 9, 2013 Sure, attached is the main.elf. Be warned, it's pretty messy and riddled with snippets testing the LED ports and printf's from stepping through the program to see if it was indeed the netif_add() function. Thanks again! So, from what I've gathered with online resources, I'm thinking it is a stack/heap memory issue. I've tried adjusting the stack in startup_gcc as well as adjusting the memory variable in the lwip.opts without much luck. Not sure offhand what the last compiled combination that elf I've attached used. Does the output from your Hard Fault handler come from the ELF file you sent? I'll try to run flash the ELF file tonight and see if I can figure out what is happening. Cheers Quote Link to post Share on other sites
xpg 127 Posted January 12, 2013 Author Share Posted January 12, 2013 Jalder, I tried out your ELF file and tried to see if I could figure out what went wrong, but couldn't seem to get anywhere within the short time I had available. If you are willing to share the source code with me I'll try to have a second look at it. Cheers, Quote Link to post Share on other sites
soccou 1 Posted January 21, 2013 Share Posted January 21, 2013 Hello, This is pretty new to me, but I have finally made some progress. However, I am stuck again. Any suggestions? Make complains of inability to fit into restrictions: user@ubuntu:~/stellaris-enc28j60-booster$ makearm-none-eabi-gcc -DDTARGET_IS_BLIZZARD_RA2 -DPART_LM4F120H5QR -Dgcc -I/home/user/stellaris-enc28j60-booster/lwip/src/include -I/home/user/stellaris-enc28j60-booster/lwip/src/include/ipv4 -I/home/user/stellaris-enc28j60-booster/lwip/src/include/ipv6 -I./ -I/home/user/stellarisware -std=c99 -fno-common -O0 -g -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -T bootlink.ld -nostartfiles -o main.elf main.c echo.c /home/user/stellarisware/driverlib/uart.c /home/user/stellarisware/utils/uartstdio.c /home/user/stellarisware/utils/ustdlib.c /home/user/stellaris-enc28j60-booster/lwip/src/core/raw.c /home/user/stellaris-enc28j60-booster/lwip/src/core/init.c /home/user/stellaris-enc28j60-booster/lwip/src/core/tcp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/udp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/tcp_in.c /home/user/stellaris-enc28j60-booster/lwip/src/core/tcp_out.c /home/user/stellaris-enc28j60-booster/lwip/src/core/pbuf.c /home/user/stellaris-enc28j60-booster/lwip/src/core/sys.c /home/user/stellaris-enc28j60-booster/lwip/src/core/def.c /home/user/stellaris-enc28j60-booster/lwip/src/core/mem.c /home/user/stellaris-enc28j60-booster/lwip/src/core/memp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/ip4.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/ip4_addr.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/icmp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/ip_frag.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/igmp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/stats.c /home/user/stellaris-enc28j60-booster/lwip/src/core/inet_chksum.c /home/user/stellaris-enc28j60-booster/lwip/src/core/netif.c /home/user/stellaris-enc28j60-booster/lwip/src/core/timers.c /home/user/stellaris-enc28j60-booster/lwip/src/core/dhcp.c /home/user/stellaris-enc28j60-booster/lwip/src/netif/etharp.c startup_gcc.c arch/sys_arch.c /home/user/stellarisware/driverlib/gcc-cm4f/libdriver-cm4f.a enc28j60.c/home/user/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: main.elf section `.text' will not fit in region `FLASH'/home/user/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: main.elf section `.bss' will not fit in region `SRAM'/home/user/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 3688 bytes/home/user/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: region `SRAM' overflowed by 8200 bytescollect2: error: ld returned 1 exit statusmake: *** [main.elf] Error 1 Quote Link to post Share on other sites
xpg 127 Posted January 23, 2013 Author Share Posted January 23, 2013 Hello, This is pretty new to me, but I have finally made some progress. However, I am stuck again. Any suggestions? Make complains of inability to fit into restrictions: Have you made any changes to the code? Which compiler are you using? Quote Link to post Share on other sites
soccou 1 Posted January 23, 2013 Share Posted January 23, 2013 No changes to the code, just the toolchainsettings. Ubuntu 12.04 with gcc 4.6.3 [edit] oh, I guess you mean the arm compiler, i installed per the directions from here the summon toolchain http://recursive-labs.com/blog/2012/10/28/stellaris-launchpad-gnu-linux-getting-started/ Quote Link to post Share on other sites
xpg 127 Posted January 24, 2013 Author Share Posted January 24, 2013 No changes to the code, just the toolchainsettings. Ubuntu 12.04 with gcc 4.6.3 [edit] oh, I guess you mean the arm compiler, i installed per the directions from here the summon toolchain http://recursive-labs.com/blog/2012/10/28/stellaris-launchpad-gnu-linux-getting-started/ Yes, the ARM compiler. I will try to reproduce this. Quote Link to post Share on other sites
xpg 127 Posted January 24, 2013 Author Share Posted January 24, 2013 Hello, This is pretty new to me, but I have finally made some progress. However, I am stuck again. Any suggestions? Make complains of inability to fit into restrictions: user@ubuntu:~/stellaris-enc28j60-booster$ make arm-none-eabi-gcc -DDTARGET_IS_BLIZZARD_RA2 -DPART_LM4F120H5QR -Dgcc -I/home/user/stellaris-enc28j60-booster/lwip/src/include -I/home/user/stellaris-enc28j60-booster/lwip/src/include/ipv4 -I/home/user/stellaris-enc28j60-booster/lwip/src/include/ipv6 -I./ -I/home/user/stellarisware -std=c99 -fno-common -O0 -g -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -T bootlink.ld -nostartfiles -o main.elf main.c echo.c /home/user/stellarisware/driverlib/uart.c /home/user/stellarisware/utils/uartstdio.c /home/user/stellarisware/utils/ustdlib.c /home/user/stellaris-enc28j60-booster/lwip/src/core/raw.c /home/user/stellaris-enc28j60-booster/lwip/src/core/init.c /home/user/stellaris-enc28j60-booster/lwip/src/core/tcp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/udp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/tcp_in.c /home/user/stellaris-enc28j60-booster/lwip/src/core/tcp_out.c /home/user/stellaris-enc28j60-booster/lwip/src/core/pbuf.c /home/user/stellaris-enc28j60-booster/lwip/src/core/sys.c /home/user/stellaris-enc28j60-booster/lwip/src/core/def.c /home/user/stellaris-enc28j60-booster/lwip/src/core/mem.c /home/user/stellaris-enc28j60-booster/lwip/src/core/memp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/ip4.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/ip4_addr.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/icmp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/ip_frag.c /home/user/stellaris-enc28j60-booster/lwip/src/core/ipv4/igmp.c /home/user/stellaris-enc28j60-booster/lwip/src/core/stats.c /home/user/stellaris-enc28j60-booster/lwip/src/core/inet_chksum.c /home/user/stellaris-enc28j60-booster/lwip/src/core/netif.c /home/user/stellaris-enc28j60-booster/lwip/src/core/timers.c /home/user/stellaris-enc28j60-booster/lwip/src/core/dhcp.c /home/user/stellaris-enc28j60-booster/lwip/src/netif/etharp.c startup_gcc.c arch/sys_arch.c /home/user/stellarisware/driverlib/gcc-cm4f/libdriver-cm4f.a enc28j60.c /home/user/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: main.elf section `.text' will not fit in region `FLASH' /home/user/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: main.elf section `.bss' will not fit in region `SRAM' /home/user/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 3688 bytes /home/user/sat/lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld: region `SRAM' overflowed by 8200 bytes collect2: error: ld returned 1 exit status make: *** [main.elf] Error 1 Ok, I just figured this one out. You have set SERIALPROG=1 in toolchainsettings, which seems reasonable. However, when doing that the Makefile I am using is using a wrong linker script (both Makefile and linker script are borrowed from http://teholabs.com/). Try set SERIALPROG=0 again, and you should get a nice resulting main.bin, which you will need to flash yourself using lm4flash. I apologize for the confusion. Cheers, Paul bluehash 1 Quote Link to post Share on other sites
soccou 1 Posted January 24, 2013 Share Posted January 24, 2013 awesome, it compiles now. and i was able to flash it. thanks for taking your time to check into this for me. now on to checking wiring of the enc28j60 and see if i can get connectivity. Quote Link to post Share on other sites
soccou 1 Posted January 25, 2013 Share Posted January 25, 2013 hmm, well as is typical for me. one mountain crossed another on the horizon looms. so I got the programmed flashed and running, with the ETH chip wired up. Now I am getting a hard fault like jalder @jalder did you ever make any progress on that error? here is a capture of the output, i added a print statement is the only change to the code so i am guessing it get's lost somewhere in here printf("netif setup\n"); netif_add(&netif, &ipaddr, &netmask, &gw, NULL, enc28j60_init, ethernet_input); netif_set_default(&netif); netif_set_up(&netif); printf("netif done\n"); WelcomeENC_ESTAT: 1Econ: 0Silicon Revision: 6int enabledlwip init completenetif setup[Hard fault handler - all numbers in hex]R0 = 20004f44R1 = 20004fb9R2 = 107f0R3 = 6R12 = 20004fb9LR [R14] = 0 subroutine call return addressPC [R15] = ae77 program counterPSR = 10222BFAR = e000ed38CFSR = 10000HFSR = 40000000DFSR = 0AFSR = 0 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.