Got SAM3S-EK2 port working with Crossworks

I have managed to take the Atmel Studio version of FreeRTOS and get it working with Crossworks. It’s a little bit cobbled together because I have put absolute paths in for all the include files, so I mist improve that. Also, it seemed to specify that the clock was 4MHz, so I have put in some code from previous run-to-complete software I wrote to use the external crystal and changed this line: /* FIXME: should be generated by sock */
uint32_t SystemCoreClock = CHIP_FREQ_CPU_MAX; Not sure what “sock” means. Would be good to initialise the clock to use the external crystal and step up to 64MHz properly without putting in my code maybe? So, once I have improved the paths set-up, it would be nice to have it available for other Crossworks users to use. How can/should I package this up to make available for others? Would it be good to wait until I have knitted in my SD card/HSMCI code into it too? Rob

Got SAM3S-EK2 port working with Crossworks

The Atmel Studio project uses the Atmel CMSIS libraries.  Both Atmel Studio and CrossWorks use GCC so you should be able to use most of the same files.  CrossWorks probably has its own start up file, but you can get that to call the SystemInit() (I think that is the name anyway) function you will see called from the Atmel start up files.  SystemInit() configures the clocks and sets SystemCoreClock accordingly. Once you have completed it it would be great if you could post it to the FreeRTOS Interactive site.  Here is the Atmel formum:
http://interactive.freertos.org/forums/103473-atmel Thanks and regards.

Got SAM3S-EK2 port working with Crossworks

Hi Richard, It’s already working actually, I just created a new project from scratch, imported all the source files to the new project and had to add all the header file paths to the project. (There’s a lot of them!). Crossworks takes care of all the startup stuff and as you say, they’re both GCC, so that takes care of an awful lot of stuff. I’ve changed the paths to be relative and am adding SD card/FAT support as I have that working on a run-to-complete program; I think people would find that rather useful. Will also add some other stuff I have working from run-to-complete software such as DMA for UART and SPI, I’m just working on making sure I understand the syntax for adding to queues from interrupts. :)

Got SAM3S-EK2 port working with Crossworks

Will also add some other stuff I have working from run-to-complete software such as DMA for UART and SPI, I’m just working on making sure I understand the syntax for adding to queues from interrupts. :)
This is already done for you on the SAM3/4 devices: http://www.atmel.com/images/doc42049.pdf Regards.