Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem



Posted by Nobody/Anonymous on February 21, 2006
Does anyone have a full port for the AT91SAM7S256?


RE: AT91SAM7S256

Posted by Nobody/Anonymous on February 21, 2006
The existing SAM7S port should work straight off I think. The 256 just has more RAM doesn't it? Maybe you need to change the build/link options from 64 to 256?

RE: AT91SAM7S256

Posted by Nobody/Anonymous on February 21, 2006
The IAR one should just by changing the target,

If you're using Gcc, u just change the linker script atmel-rom.ld with the RAM and FLASH segment sizes, and check SFR addresses are the same.. i think there are some differences in the memory map for SFR's between 64 & 256.

RE: AT91SAM7S256

Posted by Henk Visser on February 21, 2006
All I need to do is change the target in the project settings? There are also cstartup and other type files that I will probably have to drop in.

RE: AT91SAM7S256

Posted by Jokke on February 22, 2006
The only setting that needs to be changed (to just run) from S64 to S256 is for the flash programmer. Therefore you need to change the target in your IDE. Then to make use of the extra ram and flash you need of course to change your link command files.
All the start-up code is identical, since all the periferals are (almost) identical. (I think there are some extra features in e g the USARTs for the bigger chips in the series.)


RE: AT91SAM7S256

Posted by Henk Visser on February 22, 2006

Thanks for the post. The only thing I see regarding the linker options is a file called:


Here the ROM and RAM addresses ranges are defined. What is really scaring me are the definitions for the CSTACK size, IRQ stack size and the heap size. Do you think that the default setting from the IAR sample projects are correct?

What is the difference between this file and changing the target? I was expecting that just changing the target would handle everything for me. :)


RE: AT91SAM7S256

Posted by Richard on February 22, 2006
From my very quick look I would say (as partly said already):

+ In the project settings->General options->Settings set the target to the SAM7S256.

+ In the project settings->Linker set the linker command line.

+ In board.h, change the include file from including AT91SAM7S64.h and lib_AT91SAM7S64.h to the 256 equivalents.

The Supervisor stack size has to be large enough to get to the where the scheduler starts, and hold the stack used by your ISR's.

The IRQ stack has to be large enough for your IRQ's (stating the obvious there!).

User/System mode stacks do not need to be setup up as these are allocated to each task by the scheduler.

Other stacks are only required if your application uses the mode.


RE: AT91SAM7S256

Posted by Jokke on February 23, 2006
When I did this migration I had an older version of IAR, without "at91SAM7S256_NoRemap.xcl", so I don't know if they made anything special there. I just made a copy of the 64-file and changed the sizes for RAM and ROM.
I still use AT91SAM7S64.h and lib_AT91SAM7S64.h for both targets, and saw no problems so far.
I guess they cannot change the linker command file just like that, since it is likely that the user may have changed it.

RE: AT91SAM7S256

Posted by Nobody/Anonymous on March 10, 2006
I tried to use AT91SAM7S64 IAR port on my s256 chip.
I followed Richard instruction, but i got the following errors:

+ Error[Pe020]: identifier "AT91C_SYSC_WDDIS" is undefined C:\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup_SAM7.c 44

+ Error[Pe020]: identifier "AT91C_SYSC_URSTEN" is undefined C:\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup_SAM7.c 72

any suggestions?
thanks a lot

note: i use IAR EWARM Kickstart V4.30A

RE: AT91SAM7S256

Posted by Nobody/Anonymous on March 10, 2006
AT91C_SYSC_WDDIS is defined within the header files included in the download (FreeRTOS/Source/Portable/IAR/AT91SAM7S64 directory).

The project file includes this directory in its include path so they should get picked up.

Have you:

i/ Modified the project at all?
ii/ Got some other header files that are being picked up first?
iii/ Changed the directory structure?
iv/ Created your own project?

Does the demo exactly as downloaded build correctly.

This just seems to be an include or path problem with your particular project or installation.

RE: AT91SAM7S256

Posted by mirza on March 10, 2006
Hi again...
I changed line 44 of Cstartup_SAM7.c to:

and line 72 to:
AT91C_BASE_RSTC->RSTC_RMR = AT91C_RSTC_URSTEN | (0x4<<8) | (unsigned int) (0xA5<<24);

Everythings went fine...

In S64 include file, URSTEN (User Reset Enable) defined as AT91C_SYSC_URSTEN. And WDDIS (Watchdog Disable) defined as AT91C_SYSC_WDDIS.
In S256 include file: AT91C_WDTC_WDDIS and AT91C_RSTC_URSTEN respectively.

Thank you

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner