I’ve been trying to build the subject demo program (FreeRTOS V4.2) using the current YAGARTO gnu-arm toolchain under Windows XP Pro. Until today I’ve not modified any source files or the makefile. The resulting binary image file is programmed into an AT91SAM7X256 on a AT91SAM7X-EK board. The demo program built using the supplied makefile and unmodified source files does not run correctly. The LEDs flash as expected, however the first http request causes the system to crash. I have Ethereal packet captures that document the errant behavior. Ping (ICMP) requests to the SAM7X do not cause a problem, however the very first web page request kills the system.
Modifying the makefile to change the compiler OPTIM setting from OPTIM=-O0 to OPTIM=-O3 then rebuilding the rtosdemo.bin file results in a working demo program.
I am using arm-elf-gcc version 4.1.1. Other optimization levels may also work, but I’ve not yet tried others.
While it’s good to see the FreeRTOS software run as expected, I am hoping to track down the reason why the unoptimized code causes a problem. Generally execution problems are more common with OPTIMIZED code. I am concerned that source level debugging using gdb may not be possible with this optimization level.
Anyway, I wanted to share this information with other uses. I’ve spend quite a bit of time tracking down the nature of the problem and other might also.
SQUIRES ENGINEERING, INC.