Beginners question - setting up an ATSAM3X project under GCC/Linux

tomkcook wrote on Monday, February 20, 2017:

Sorry for a newbie question.

I’m trying to set up a FreeRTOS project for an ATSAM3X8E mcu, building on Linux using the Atmel arm-none-eabi toolchain. There’s no demo project for this combination. Does anyone know of a reasonable guide to doing it?

I’ve got a basic project building using the Atmel toolchain but without FreeRTOS - a makefile generated using the Atmel pack-utils. There’s also the CORTEX_ATSAM3X_Atmel_Studio demo. As far as I can tell, Atmel Studio uses GCC under the hood, so it should be fairly straightforward to get this building under Linux - right?

If not, what’s my best strategy? Should I start from the bare project generated by pack-utils and start trying to paste FreeRTOS into it? Or should I start from the Atmel Studio project and port it to the Linux toolchain?

Thanks for any advice.
Tom

dibosco wrote on Monday, February 20, 2017:

Yes, Atmel studio uses gcc.

I work on Linux (although use Crossworks - which is also gcc based) and when getting stuff going on Linux I look at the Atmel Studio project, examine exactly what files it uses and then copy them into a new project.

This kind of thing I have done:

https://interactive.freertos.org/hc/en-us/community/posts/210025726-SAM3S-EK2-For-Rowley-Crossworks-inc-FAT-file-system-

IIRC the Atmel Studio project files make it reasonably plain which files belong in the project.

If you know your way round make files then I would think it should be easy for you to do this. If you don’t know your way around make files, I can thoroughly recommend Crossworks for ARM that runs natively on Linux and is a really excellent IDE; makes it easy, even for duffers like me, to get projects up and running quite quickly.

Rob

dibosco wrote on Monday, February 20, 2017:

Sorry for double post

tomkcook wrote on Tuesday, February 21, 2017:

Thank you. Makefiles are not a problem, especially not with a template from the bare-metal project the pack-utils generate. In fact I’ve got it building, though the board hasn’t come back to be tested yet.

Thanks for your help.

tomkcook wrote on Tuesday, February 21, 2017:

What I’ve got at the moment is a reasonably generic port of the CORTEX_ATSAM3X_Atmel_Studio demo from the ATSAM3X-EK demo board to a ATSAM3X8E part on a custom board building under GCC.

Would FreeRTOS be interested in having this contributed back to the project?

dibosco wrote on Tuesday, February 21, 2017:

Most definitely. Stick it here:

https://interactive.freertos.org/hc/en-us/community/topics

In the Atmel section of course! :smiley:

Are you using a JTAG debugger to do anything more than load the code with Linux on this (ie are you debugging with the JTAG interface)? I’m a little interested in how you’re doing it if so. Unless it’s Eclipse based, in which case I don’t care! ;~)

tomkcook wrote on Friday, March 03, 2017:

Sorry, I haven’t got that far yet. I’m not planning to use JTAG for loading code; the mcu is connected to raspberry pi through its UART and I’m going to use the SAM3X bootloader to load the code over that. I’ll be looking into JTAG debugging - if I make progress, I’ll let you know.

tomkcook wrote on Friday, March 03, 2017:

Also, when you say, “Stick it here,” that site doesn’t have an obvious way to upload files…

dibosco wrote on Friday, March 03, 2017:

Sign in, go the relevant forum, create a new post and it will be dead obvious.