rainer32 wrote on Wednesday, April 26, 2006:
ok, i hadn’t understood the part about the semaphore initialization etc. and why they were separately declared until your explanation.
about the rmii: i think i told you already that i read on http://www.at91.com/www/phpBB2_mirror/viewtopic.php4?t=1573 that that the errata supposedly say rmii isn’t supported any more by atmel because of some bug.
anyways, i tested the uip demo, and it looks good. there’s still a couple problems though:
- The stack values do go down:
initial values (shown at first page load):
uIP: 192, IDLE: 122, each LEDx: 118
in the second page load, i already have uIP at 7 (seven!). i have to refresh manually, as the page doesn’t have an auto-refresh (i might add one to look). anyways, i tried my wget loop script on /cgi/rtos and after 40000 page hits, IDLE stays at 122, each LEDx settled to an apparently stable 108, uIP is still at 7. damn that looks low! but the thing is, it runs stably anyways (i didn’t go beyond 40000, though)
so now for the real problem: /cgi/tcp. when i load that page, i’ve occasionally seen the uIP stack size drop to 4 before crashing. sometimes it crashes even before displaying the /cgi/tcp page. when i leave plenty times between manual refreshes of that page, i get about 40 or so done before the crash. with a wget loop, it crashes immediately after the first. actually, if i wget /cgi/rtos and then /cgi/tcp inside the same loop, it crashes on the first attempt of getting /cgi/tcp.
unlike the lwip demo, where the leds kept blinking while the tcp stack froze, i’m talking of a real crash with leds freeze here.
so that leaves me with the following questions:
- while the end stack size of 108 (down from 118) for LEDx still looks comfy, the stack size of uIP going down from 192 to 7 seems abnormal (/cgi/rtos still loads correctly though, 40000 times and on). is that a problem? if so, do you have a clue about where it could be?
- there’s definitely a problem with the page /cgi/tcp. i can systematically bring all to crash by loading the page quickly (via wget loop) 2 times or reloading it manually 50 or so times at most. in contrast, /cgi/rtos loads fine 40000 times and more even with a uIP stack size of 7.
- did you also have those problems? if not, could you send me your rtosdemo.bin, and maybe one compiled with iar, so as to look if there’s a compiler issue?
for reference, here’s my wget loop bash script. i guess it should work in cygwin too if you have bash and wget installed and start the script out of a bash shell:
----------------------
#!/bin/sh
while true
do
wget http://10.0.3.204/cgi/tcp
done
----------------------
when i tested, i had -O0 optimizations in though. could that be a prob?