EmbeddedRelated.com
Forums

FreeRTOS on AT91SAM7S-EK

Started by "gabriele.brosulo" August 10, 2007
Gabrielle,

I havent tried to use FreRTOS yet due to the problems you reported.
I will wait to see how it evolve.

Thanks

Marcio
----- Original Message -----
From: Gabriele Brosulo
To: A...
Sent: Tuesday, August 21, 2007 7:24 AM
Subject: Re: [AT91SAM] Re: FreeRTOS on AT91SAM7S-EK
On Thursday 16 August 2007 14:43:40 Marcio Campos Lima(Net Open) wrote:
> Gabriele
>
> Did you solve the problem of using FreeRTOS in AT91SAM7S_EK ? If so,
> could you send me directions to work with it ?
>
> Thanks
>
> MArcio

Hi Marcio,
Now I try to solve the problem, I'm just returned from my holiday. Like I said
in a previous post I'll post my solution (if I've got one) to the list after
my test. Did you find a solution during the last week?

g4b0
> Hi Richard,
> I tried this solution, I had to do some change:
>
> Added AT91SAM7S256.h to my project.
> Modified all occurencies of AT91SAM7X256.h with the new one.

I presume the S256 and X256 have the same memory map? If not you will also
have to change the linker script.

Did you change the startup code? I don't think any changes are required,
but if so make sure you call main() from Supervisor mode.

> Solved some case-sensitive problem (I work on linux).
> Removed from makefile all occurencies of lwIP and BasicWEB.c.

I should for now also remove the USB stuff. In particular set
configUSE_IDLE_HOOK to 0 in FreeRTOSConfig.h as the idle hook is used to
initiate USB transfers. This is particularly important if you try the small
test program suggested below.
> Compiled.
> Programmed on flash (no error from OpenOCD).
>
> No LED blinking :(
The functions vParTestToggleLED, vParTestSetLED, and vParTestInitialise are
used to write to the LEDs. Did you change these to be correct for the
SAM7SEK?

I would try the following, first a simple program to check the LEDs are
working:

int main( void )
{
volatile unsigned long ul;

____/* Setup the ports. */
____prvSetupHardware();

____/* Setup the IO required for the LED's. */
____vParTestInitialise();
____
____for( ;; )
____{
________for( ul = 0; ul < 0x1ffff; ul++ );
________
________vParTestToggleLED( 0 );
________vParTestToggleLED( 1 );
________vParTestToggleLED( 2 );
________vParTestToggleLED( 3 );
____}
}

Then once you have the LEDs working, try a simple program that just creates
three separate tasks then flashes one LED from each:

int main( void )
{
____/* Setup the ports. */
____prvSetupHardware();

____/* Setup the IO required for the LED's. */
____vParTestInitialise();

____/* Create the three tasks. */
____vStartLEDFlashTasks( mainFLASH_PRIORITY );

____/* Start the scheduler. */
____vTaskStartScheduler();

____/* Should never get here! */
____return 0;
}
Regards,
Richard.

+ http://www.FreeRTOS.org
A free real time kernel for 8, 16 and 32bit systems.

+ http://www.SafeRTOS.com
An IEC 61508 certified real time kernel for safety related systems.
On Wednesday 22 August 2007 08:24:55 FreeRTOS.org Info wrote:
> I would try the following, first a simple program to check the LEDs are
> working:
>
> int main( void )
> {
> volatile unsigned long ul;
>
> ____/* Setup the ports. */
> ____prvSetupHardware();
>
> ____/* Setup the IO required for the LED's. */
> ____vParTestInitialise();
> ____
> ____for( ;; )
> ____{
> ________for( ul = 0; ul < 0x1ffff; ul++ );
> ________
> ________vParTestToggleLED( 0 );
> ________vParTestToggleLED( 1 );
> ________vParTestToggleLED( 2 );
> ________vParTestToggleLED( 3 );
> ____}
> }

Hi Richard,
In order to try the simple program above, I started from my own previous
project, which can blink led, read/write from UART0 and DBGU and manage
interrupt (obviously without a rtos). So I guess that the config files,
memory map etc. are ok.

I added to my project:
- FreeRTOSV4.4.0/Source (entire directory)
- FreeRTOSV4.4.0/Demo/lwIP_Demo_Rowley_ARM7/FreeRTOSConfig.h

In files port.c and portISR.c I replaced
#include "AT91SAM7X256.h"
with
#include "AT91SAM7S256.h"

I added this line to my AT91SAM7S256.h:
#define AT91F_AIC_ConfigureIt( irq_id, priority, src_type, newHandler ) \
{\
____unsigned int mask ; \
____mask = 0x1 << irq_id; \
____/* Disable the interrupt on the interrupt controller */ \
____AT91C_BASE_AIC->AIC_IDCR = mask ; \
__/*Save the interrupt handler routine pointer and the interrupt priority* / \
____AT91C_BASE_AIC->AIC_SVR[irq_id] = (unsigned int) newHandler ; \
____/* Store the Source Mode Register */ \
____AT91C_BASE_AIC->AIC_SMR[irq_id] = src_type | priority ; \
____/* Clear the interrupt on the interrupt controller */ \
____AT91C_BASE_AIC->AIC_ICCR = mask ; \
}

Then I added the following files to my makefile:
list.o
queue.o
tasks.o
croutine.o
port.o
portISR.o
heap_2.o
ParTest.o

So I modified the main writing your simple program. I compiled whith my make
file (reported below) and I got one error I can't solve:

libc.a(syscalls.o)(.text+0x69c): In function `_sbrk':
../../../../../../newlib-1.12.0/newlib/libc/sys/arm/syscalls.c:508: undefined
reference to `end'

Here is the output of make command:

make -k all
.assembling
arm-elf-as -ahls -mapcs-32 -o crt.o crt.s > crt.lst
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g main.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g timerisr.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g timersetup.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g isrsupport.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g lowlevelinit.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g blinker.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g serial.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g dbgu.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g button_led.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g FreeRTOS/list.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g FreeRTOS/queue.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g FreeRTOS/tasks.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g FreeRTOS/croutine.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g FreeRTOS/portable/GCC/ARM7_AT91SAM7S/port.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g FreeRTOS/portable/GCC/ARM7_AT91SAM7S/portISR.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g FreeRTOS/portable/MemMang/heap_2.c
.compiling
arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
SAM7_GCC -fno-common -O0 -g ParTest/ParTest.c
..linking
arm-elf-ld -v -Map main.map -Tlinker_script.cmd -o main.out crt.o main.o
timerisr.o timersetup.o isrsupport.o lowlevelinit.o blinker.o serial.o dbgu.o
button_led.o list.o queue.o tasks.o croutine.o port.o portISR.o heap_2.o
ParTest.o libc.a libm.a libgcc.a
libc.a(syscalls.o)(.text+0x69c): In function `_sbrk':
../../../../../../newlib-1.12.0/newlib/libc/sys/arm/syscalls.c:508: undefined
reference to `end'
GNU ld version 2.15
make: *** [main.out] Error 1
make: Target `all' not remade because of errors.

And Finally, here is my Makefile (a modified version of James P Lynch's
Makefile):
# ***************************************************************
# * Makefile for Atmel AT91SAM7S256 - flash execution *
# * *
# * *
# * James P Lynch May 12, 2007 *
# ***************************************************************

NAME = gps_at91sam7

# variables
CC = arm-elf-gcc
LD = arm-elf-ld -v
AR = arm-elf-ar
AS = arm-elf-as
CP = arm-elf-objcopy
OD = arm-elf-objdump

CFLAGS = -I./ \
-I./FreeRTOS \
-I./FreeRTOS/include \
-I./AT91SAM7S_GCC \
-I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S \
-I./FreeRTOS/portable/MemMang \
-I./ParTest \
-c \
-D SAM7_GCC \
-fno-common \
-O0 \
-g

AFLAGS = -ahls -mapcs-32 -o crt.o
LFLAGS = -Map main.map -Tlinker_script.cmd
CPFLAGS = --output-target=binary
ODFLAGS = -x --syms

OBJECTS = crt.o \
main.o \
timerisr.o \
timersetup.o \
isrsupport.o \
lowlevelinit.o \
blinker.o \
serial.o \
dbgu.o \
button_led.o \
list.o \
queue.o \
tasks.o \
croutine.o \
port.o \
portISR.o \
heap_2.o \
ParTest.o
# make target called by Eclipse (Project -> Clean ...)
clean:
-rm $(OBJECTS) crt.lst main.lst main.out main.bin main.hex main.map main.dmp

#make target called by Eclipse (Project -> Build Project)
all: main.out
@ echo "...copying"
$(CP) $(CPFLAGS) main.out main.bin
$(OD) $(ODFLAGS) main.out > main.dmp

main.out: $(OBJECTS) linker_script.cmd
@ echo "..linking"
$(LD) $(LFLAGS) -o main.out $(OBJECTS) libc.a libm.a libgcc.a

crt.o: crt.s
@ echo ".assembling"
$(AS) $(AFLAGS) crt.s > crt.lst

main.o: main.c
@ echo ".compiling"
$(CC) $(CFLAGS) main.c

timerisr.o: timerisr.c
@ echo ".compiling"
$(CC) $(CFLAGS) timerisr.c

lowlevelinit.o: lowlevelinit.c
@ echo ".compiling"
$(CC) $(CFLAGS) lowlevelinit.c

timersetup.o: timersetup.c
@ echo ".compiling"
$(CC) $(CFLAGS) timersetup.c

isrsupport.o: isrsupport.c
@ echo ".compiling"
$(CC) $(CFLAGS) isrsupport.c

blinker.o: blinker.c
@ echo ".compiling"
$(CC) $(CFLAGS) blinker.c

serial.o: serial.c
@ echo ".compiling"
$(CC) $(CFLAGS) serial.c

dbgu.o: dbgu.c
@ echo ".compiling"
$(CC) $(CFLAGS) dbgu.c

button_led.o: button_led.c
@ echo ".compiling"
$(CC) $(CFLAGS) button_led.c

croutine.o: FreeRTOS/croutine.c
@ echo ".compiling"
$(CC) $(CFLAGS) FreeRTOS/croutine.c

list.o: FreeRTOS/list.c
@ echo ".compiling"
$(CC) $(CFLAGS) FreeRTOS/list.c

queue.o: FreeRTOS/queue.c
@ echo ".compiling"
$(CC) $(CFLAGS) FreeRTOS/queue.c

tasks.o: FreeRTOS/tasks.c
@ echo ".compiling"
$(CC) $(CFLAGS) FreeRTOS/tasks.c

port.o: FreeRTOS/portable/GCC/ARM7_AT91SAM7S/port.c
@ echo ".compiling"
$(CC) $(CFLAGS) FreeRTOS/portable/GCC/ARM7_AT91SAM7S/port.c

portISR.o: FreeRTOS/portable/GCC/ARM7_AT91SAM7S/portISR.c
@ echo ".compiling"
$(CC) $(CFLAGS) FreeRTOS/portable/GCC/ARM7_AT91SAM7S/portISR.c

heap_2.o: FreeRTOS/portable/MemMang/heap_2.c
@ echo ".compiling"
$(CC) $(CFLAGS) FreeRTOS/portable/MemMang/heap_2.c

ParTest.o: ParTest/ParTest.c
@ echo ".compiling"
$(CC) $(CFLAGS) ParTest/ParTest.c

#
**********************************************************************************************
# FLASH PROGRAMMING
#
# Alternate make target for flash programming only
#
# You must create a special Eclipse make target (program) to run this part of
the makefile
# (Project -> Create Make Target... then set the Target Name and Make Target
to "program")
#
# OpenOCD is run in "batch" mode with a special configuration file and a
script file containing
# the flash commands. When flash programming completes, OpenOCD terminates.
#
# Note that the script file of flash commands (script.ocd) is part of the
project
#
# Programmers: Martin Thomas, Joseph M Dupre, James P Lynch
#
**********************************************************************************************

# specify output filename here (must be *.bin file)
TARGET = main.bin

# specify the directory where openocd executable and configuration files
reside
#OPENOCD_DIR = 'c:/Program Files/openocd-2007re141/bin/'
OPENOCD_DIR = '/usr/local/OpenOCD/src/'

# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB
debuggers)
#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
#OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
OPENOCD = $(OPENOCD_DIR)openocd

# specify OpenOCD configuration file (pick the one for your device)
#OPENOCD_CFG = $(OPENOCD_DIR)at91sam7s256-wiggler-flash-program.cfg
#OPENOCD_CFG = $(OPENOCD_DIR)at91sam7s256-jtagkey-flash-program.cfg
#OPENOCD_CFG = $(OPENOCD_DIR)at91sam7s256-armusbocd-flash-program.cfg
#OPENOCD_CFG $(OPENOCD_DIR)/../configs/at91sam7s256-wiggler-flash-program.cfg
OPENOCD_CFG = at91sam7s256-wiggler-flash-program.cfg

# program the AT91SAM7S256 internal flash memory
program: $(TARGET)
@echo "Flash Programming with OpenOCD..." # display a message on the
console
sudo $(OPENOCD) -f $(OPENOCD_CFG) # program the onchip FLASH here
@echo "Flash Programming Finished." # display a message on the console

Sorry for the lenght of my message, I hope we can find a solution.
Thank you for your time
g4b0
> Hi Richard,
> In order to try the simple program above, I started from my
> own previous
> project, which can blink led, read/write from UART0 and DBGU
> and manage
> interrupt (obviously without a rtos). So I guess that the
> config files,
> memory map etc. are ok.
So you did not start from a know, working, preconfigured FreeRTOS.org
project, like the SAM7X GCC example? This is why they are provided.

The DBGU and PIT use the same interrupt - have you accounted for this?


>
> So I modified the main writing your simple program. I
> compiled whith my make
> file (reported below) and I got one error I can't solve:
>
> libc.a(syscalls.o)(.text+0x69c): In function `_sbrk':
> ../../../../../../newlib-1.12.0/newlib/libc/sys/arm/syscalls.c
> :508: undefined
> reference to `end'
Sounds like you have an inconsistency with your library setup and the
startup and liker scripts.

> Here is the output of make command:
>
> make -k all
> .assembling
> arm-elf-as -ahls -mapcs-32 -o crt.o crt.s > crt.lst
> .compiling
> arm-elf-gcc -I./ -I./FreeRTOS -I./FreeRTOS/include
> -I./AT91SAM7S_GCC -I./FreeRTOS/portable/GCC/ARM7_AT91SAM7S
> -I./FreeRTOS/portable/MemMang -I./ParTest -c -D
> SAM7_GCC -fno-common -O0 -g main.c



Am I right in thinking then that you building everything in ARM mode?

Here is an example of the output from the provided SAM7X build command:

arm-elf-gcc -c -mthumb -I. -I./EMAC -I../Common/include -I./USB
-I./lwip-1.1.0/src/include -I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X -I
../../Source/include -I../../Source/portable/GCC/ARM7_AT91SAM7S
-I./lwip-1.1.0/src/include/ipv4 -Wall -Wextra -Wstrict-prototypes -Wmissing-
prototypes -Wmissing-declarations -Wno-strict-aliasing -D SAM7_GCC -D
THUMB_INTERWORK -mthumb-interwork -mcpu=arm7tdmi -Tatmel-rom.ld -g -O0
-fomit-frame-pointer main.c -o main.o
> crt.o main.o
How is your crt.o configured? Does it set the processor into Supervisor
mode prior to calling main? Does it setup stacks for Supervisor and IRQ
modes?

> And Finally, here is my Makefile (a modified version of James
> P Lynch's
> Makefile):

Was this configured for FreeRTOS.org?

Regards,
Richard.

+ http://www.FreeRTOS.org
A free real time kernel for 8, 16 and 32bit systems.

+ http://www.SafeRTOS.com
An IEC 61508 certified real time kernel for safety related systems.
On Wednesday 22 August 2007 13:25:59 FreeRTOS.org Info wrote:
> So you did not start from a know, working, preconfigured FreeRTOS.org
> project, like the SAM7X GCC example? This is why they are provided.



Oh yeah! Now it works!! You're right, I was working in the wrong direction,
using makefile, startup script and friends not written for FreeRTOS..

Now I created a new port for my AT91SAM7S-EK board, that is a subset of the
lwIP_Demo_Rowley_ARM7 (it just use ParTest to blink the leds). I also added
to the port a working OpenOCD script useful to flash program rtosdemo.bin
trough a Olimex Parallel port JTAG dongle interface
(http://www.olimex.com/dev/index.html).

If it's useful I can post it, so you can add to the FreeRTOS project. I think
I will upgrade it , because I need to use UART, DBGU, and perhaps other
peripheral, but I think I will open some other thread berfore :)

Thanks a lot for your help,

g4b0
On Saturday 11 August 2007 08:48:48 Caglar Akyuz wrote:
> gabriele.brosulo wrote:
> > Hi all,
>
> Hi,
>
> > I've got an AT91SAM7S256 on the subject's evaluation board, and I can
> > use it with some simple code that blinks leds, read/write from UART0
> > and DBGU, count time and use interrupt.
> >
> > I develop with Eclipse, gnuarm's gcc toolchain, OpenOcd & friends on a
> > linux box.
> >
> > Now I want to use FreeRTOS, I downloaded it from the official site,
> > but I can't compile it. Also I didn't found a demo application for my
> > board.. I also don't know if it possible with my board and my develop
> > environment.
>
> I'm using exactly the same environment. I started from SAM7X-LWIP-GCC
> project from FreeRTOS, replaced SAM7X specific ATMEL files in
> portable/gcc/arm7_AT91SAM7S(yes I guess port is originally started using
> a SAM7S then changed to SAM7X) with SAM7S related files. Moreover, you
> may need to edit Board.h file in order to correctly blink leds and you
> should remove lwIP related code from the Makefile. Then It should work
> definitely. I guess editing the linker script is not mandatory, I think
> SAM7S256 and SAM7X256 has the same memory map.
>
> These info may be incomplete since it was more than 1 year I did this,
> re-doing this should be a 5 minute task. If these don't work, I'll be
> happy to mail a SAM7S64(I only have that board to test) port for you.
>
> Regards,
> Caglar AKYUZ

Hi Caglar,
Like you can see in my previous messages I followed exatly your same way, and
now I've got a working led blinking on FreeRTOS.

Thank for your help!
g4b0

--
Cordiali saluti

Brosulo Gabriele
responsabile Web - EdiSoft Srl
Corso Piemonte n.13
12037 SALUZZO (CN)
Tel. 017543443
fax 0175475196
email b...@edisoft.net

Avvertenze ai sensi del Dlgs. 196/2003

Questo documento e gli eventuali allegati sono indirizzati unicamente al
destinatario, a cui la lettura e l'utilizzo delle informazioni contenute sono
esclusivamente riservati. Nel caso di utilizzo non autorizzato, la Edisoft
Srl potrdar corso alle azioni piopportune per il risarcimento dei danni
subiti anche da terzi. Nell'ipotesi che l'e-mail non fosse indirizzato a Voi
o il contenuto lasci intendere che possano esservi stati errori o
manipolazioni nella trasmissione, vogliate cortesemente segnalarlo al
seguente indirizzo e-mail (i...@edisoft.net) e cancellare il presente
documento e gli eventuali allegati.

L'interessato puopporsi in ogni momento, in via gratuita, al trattamento dei
propri dati al fine dell'invio di analoghe comunicazioni a mezzo di posta
elettronica, semplicemente dandone comunicazione all'indirizzo e-mail
i...@edisoft.net o al seguente numero di fax (0175475196).

L'informativa di cui all'art. 13 del D. Lgs n. 196/03 puessere reperita al
seguente indirizzo: www.edisoft.net/privacy/informativa.pdf

Quanto precede ai fini del rispetto del D.Lgs 196/03 sulla tutela dei dati
personali.
Greetings,
I have been lurking in this group for a few weeks, I'm VERY new to
the ARM/ SAM7X devices, and I am trying to learn them.

My expertise is with the AVR series, and I couldn't imagine the
overhead of using an OS.

I am relying on the fact that stupid question aren't against the
rules :)

What is the advantage of using an OS when you are only running a
single application?

You compile the app with the OS, its not like there is an executable
on an SD card that is being run. Of course I'm not talking about any
device that does run in this fashon, however, from what I've seen
using SAM7X example code, ethernet code, I can't see the advantage of
using an OS over an endless loop, state bits, and isr fcns?

Any good args for OS usage are welcomed, I'm probably missing the key
advantage here.

Regards,

Ray

--- In A..., Gabriele Brosulo wrote:
>
> On Saturday 11 August 2007 08:48:48 Caglar Akyuz wrote:
> > gabriele.brosulo wrote:
> > > Hi all,
> >
> > Hi,
> >
> > > I've got an AT91SAM7S256 on the subject's evaluation board, and
I can
> > > use it with some simple code that blinks leds, read/write from
UART0
> > > and DBGU, count time and use interrupt.
> > >
> > > I develop with Eclipse, gnuarm's gcc toolchain, OpenOcd &
friends on a
> > > linux box.
> > >
> > > Now I want to use FreeRTOS, I downloaded it from the official
site,
> > > but I can't compile it. Also I didn't found a demo application
for my
> > > board.. I also don't know if it possible with my board and my
develop
> > > environment.
> >
> > I'm using exactly the same environment. I started from SAM7X-LWIP-
GCC
> > project from FreeRTOS, replaced SAM7X specific ATMEL files in
> > portable/gcc/arm7_AT91SAM7S(yes I guess port is originally
started using
> > a SAM7S then changed to SAM7X) with SAM7S related files.
Moreover, you
> > may need to edit Board.h file in order to correctly blink leds
and you
> > should remove lwIP related code from the Makefile. Then It should
work
> > definitely. I guess editing the linker script is not mandatory, I
think
> > SAM7S256 and SAM7X256 has the same memory map.
> >
> > These info may be incomplete since it was more than 1 year I did
this,
> > re-doing this should be a 5 minute task. If these don't work,
I'll be
> > happy to mail a SAM7S64(I only have that board to test) port for
you.
> >
> > Regards,
> > Caglar AKYUZ
>
> Hi Caglar,
> Like you can see in my previous messages I followed exatly your
same way, and
> now I've got a working led blinking on FreeRTOS.
>
> Thank for your help!
> g4b0
>
> --
> Cordiali saluti
>
> Brosulo Gabriele
> responsabile Web - EdiSoft Srl
> Corso Piemonte n.13
> 12037 SALUZZO (CN)
> Tel. 017543443
> fax 0175475196
> email brosulo@...
>
> Avvertenze ai sensi del Dlgs. 196/2003
>
> Questo documento e gli eventuali allegati sono indirizzati
unicamente al
> destinatario, a cui la lettura e l'utilizzo delle informazioni
contenute sono
> esclusivamente riservati. Nel caso di utilizzo non autorizzato, la
Edisoft
> Srl potrdar corso alle azioni piopportune per il risarcimento
dei danni
> subiti anche da terzi. Nell'ipotesi che l'e-mail non fosse
indirizzato a Voi
> o il contenuto lasci intendere che possano esservi stati errori o
> manipolazioni nella trasmissione, vogliate cortesemente segnalarlo
al
> seguente indirizzo e-mail (info@...) e cancellare il presente
> documento e gli eventuali allegati.
>
> L'interessato puopporsi in ogni momento, in via gratuita, al
trattamento dei
> propri dati al fine dell'invio di analoghe comunicazioni a mezzo di
posta
> elettronica, semplicemente dandone comunicazione all'indirizzo e-
mail
> info@... o al seguente numero di fax (0175475196).
>
> L'informativa di cui all'art. 13 del D. Lgs n. 196/03 puessere
reperita al
> seguente indirizzo: www.edisoft.net/privacy/informativa.pdf
>
> Quanto precede ai fini del rispetto del D.Lgs 196/03 sulla tutela
dei dati
> personali.
>
On Saturday 11 August 2007 08:48:48 Caglar Akyuz wrote:
> I'm using exactly the same environment. I started from SAM7X-LWIP-GCC

Where did you find this?? In my FreeRTOSV4.4.0 there's no trace about it.. or
I've got to search better?

> project from FreeRTOS, replaced SAM7X specific ATMEL files in
> portable/gcc/arm7_AT91SAM7S(yes I guess port is originally started using
> a SAM7S then changed to SAM7X) with SAM7S related files. Moreover, you
> may need to edit Board.h file in order to correctly blink leds and you
> should remove lwIP related code from the Makefile. Then It should work
> definitely. I guess editing the linker script is not mandatory, I think
> SAM7S256 and SAM7X256 has the same memory map.
>
> These info may be incomplete since it was more than 1 year I did this,
> re-doing this should be a 5 minute task. If these don't work, I'll be
> happy to mail a SAM7S64(I only have that board to test) port for you.

Now I search for the starting point, after that if I have problem I will tell
you.

>
> Regards,
> Caglar AKYUZ

Thanks a lot
g4b0
> On Saturday 11 August 2007 08:48:48 Caglar Akyuz wrote:
> > I'm using exactly the same environment. I started from
> SAM7X-LWIP-GCC
>
> Where did you find this?? In my FreeRTOSV4.4.0 there's no
> trace about it.. or
> I've got to search better?

See http://www.freertos.org/portsam7xlwIP.html#CommandLineUsage (right down
at the bottom of the page for the makefile location).

Regards,
Richard.

+ http://www.FreeRTOS.org
A free real time kernel for 8, 16 and 32bit systems.

+ http://www.SafeRTOS.com
An IEC 61508 certified real time kernel for safety related systems.
> What is the advantage of using an OS when you are only running a
> single application?

Try starting here:
http://www.freertos.org/FAQWhat.html#WhyUseRTOS

No religious war please - I am aware of the counter arguments too.
Regards,
Richard.

+ http://www.FreeRTOS.org
A free real time kernel for 8, 16 and 32bit systems.

+ http://www.SafeRTOS.com
An IEC 61508 compliant real time kernel for safety related systems.