Does anyone have a full port for the AT91SAM7S256? Thanks.
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?
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.
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.
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.) Jokke
Jokke, Thanks for the post. The only thing I see regarding the linker options is a file called: $PROJ_DIR$resourceat91SAM7S256_NoRemap.xcl 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. :) Thanks!
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. Regards.
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.
Hi… 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:FreeRTOSDemoARM7_AT91SAM7S64_IARSrcIARCstartup_SAM7.c 44 + Error[Pe020]: identifier "AT91C_SYSC_URSTEN" is undefined C:FreeRTOSDemoARM7_AT91SAM7S64_IARSrcIARCstartup_SAM7.c 72 any suggestions? thanks a lot mirza note: i use IAR EWARM Kickstart V4.30A
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.
Hi again… I changed line 44 of Cstartup_SAM7.c to: AT91C_BASE_WDTC->WDTC_WDMR= AT91C_WDTC_WDDIS; 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 mirza
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.