SAM7XDemo Build for Latest Yagarto!

Good day FreeRTOS forum, Has any one been successful with compiling a working Yagarto build for the SAM7x lwIP web server project?
I have compiled the source code a few years back on an older Yagarto build, however the later Yagarto compiler needs a syscall addition to the linker addition when compiling. I did add this file and it complies with the latest Yagarto compiler. The project runs, however the web server is unstable. I’d like to know if someone has been successful with this before I spend more days debugging this. Best regards,
Warren

SAM7XDemo Build for Latest Yagarto!

Hi Warren, I’m not sure if it will solve the problem but you could give it a try: I found a bug in the linker script which causes the initialisation of c-variables to fail. It is described here:
https://sourceforge.net/projects/freertos/forums/forum/382005/topic/5055263 I didn’t test it on the demo but when I started with FreeRTOS I had the same experience with the demo. Some tasks are dodgy. Let me know your results. My tasks are running stable now. Regards,
Rob

SAM7XDemo Build for Latest Yagarto!

Hello Rob, Thank you for this advice! I followed your post and it fixed the problem of the USB task falling over when I plugged in the Ethernet cable. I’m still having a hassle with the webserver but I should get to the bottom of that a lot quicker now that the stability of the tasks has been resolved. Did you also add a syscalls file to your project? Best regards,
Warren

SAM7XDemo Build for Latest Yagarto!

The Yagarto site used to have an FAQ on this, as I recall, and even supply a syscalls file for download.  The file is only required to provide stubs of the functions that the linker is looking for (unless you actually make use of them of course).  You may even find a syscalls.c containing these stubs in the FreeRTOS distribution. Please post any updated/working files to the FreeRTOS interactive site. Regards.

SAM7XDemo Build for Latest Yagarto!

Hi Warren, Good to hear the fix at least solved part of the problems. And yes, I added a syscalls.c file to my project. I found a basic version on the internet and modified it until it works with the stdio library in combination with the debug unit of the microcontroller. You can find my modified version here: http://couchtiger.nl/files/syscalls.zip. Not all functions are tested but the read and write function work for standard input and standard output, which is the debug unit. The sbrk functionality also appears to work because FreeRTOS is able to allocate memory. The only thing you need to do is include this code to initialise the uart of the debug unit:
    // Disable PIO control for debug unit RX/TX pins
    AT91C_BASE_PIOA->PIO_PDR = AT91C_PIO_PA28 | AT91C_PIO_PA27;
    /* Initialise the debug unit USART. */
    DBGU_Configure(0x00000800, 9600, 48000000);
You can always change the baud rate and other communication parameters of course. Success! Regards,
Rob