FreeRTOS on SAMD51J19A with Atmel Studio

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I used the SAMD51J19A in a custom board intending to use it with the Arduino framework but decided to go a different route. I would like to use FreeRTOS now and was planning to use Atmel Studio 7.

 

I've been looking around and can't seem to find much for using FreeRTOS with this particular chip.  Has anyone here been able to get FreeRTOS running for SAMD51 under Atmel Studio? Or any tool chain for that matter?

 

Thanks

This topic has a solution.
Last Edited: Thu. Sep 24, 2020 - 02:04 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't know if its relevant, but I am doing a project using a couple of SAM4S boards with FreeRTOS under Atmel studio 7: all I had to do (so far) is to include GCC version of the port.c and portmacro.h for the CM4F core (it is available in the FreeRTOS source dir). Something that should work for you as well since  SAMD51J19A  appears to also be a CM4F.

As I mentioned, it is an ongoing project for my part, so more info may become available - at least I will share as much as possible, as I go along. If youre interested

 

Ilya

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I might be a few steps behind you on how to do that.  I am new to Atmel Studio (I'm usually more of a TI/CCS person, but am branching out a little). Did you include FreeRTOS with the ASF Wizard in Atmel Studio or how are you adding the FreeRTOS source into your project?  If not, where are you pulling the port.c and portmacro.h files from?

 

Thanks for the help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The port.c and portmacro.h are part of the FreeRTOS distribution (I am not using the FreeRTOS thats part of the ASF wizard, I am pulling the sorcecode from https://sourceforge.net/projects...)

 

I am adding the FreeRTOS code to my project separately from the ASF wizard:

1) You go into your project properties:

 

 

 

to get to:

 

 

 

 

2) Then you choose the Directories option to add the location of the FreeRTOS code within your project

 

 

 

 

3) This is what it should look like once you've added the FreeRTOS src folders to Atmel Studio

 

 

 

4) I have also put the FreeRTOSConfig.h file into the project/src/config folder together with the rest of the config files - but that is just my personal preference:

 

 

 

Thats how I add the sourcecode bypassing the ASF wizard. There is however one thing that may catch you offguard about Atmel studio however - you will need to run "Show all files" (since Atmel studio doesnt by default/automatically add the new files (that you create within the project) to the project view) once every so often, like once you added your FreeRTOS code and also once youve created new .c/.h:

 

 

 

 

 

 

 

 

 

 

 

Thats pretty much the lot I think, for now

 

Ilya

 

 

 

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can add FreeRTOS to a project on start.atmel.com. I never tried that so don't know how it works but it looks like you get some choices for which version to use.

/Lars

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

¨@Lajon its also part of the ASF3, but theres no guarantee that the OP wouldnt have to add the port.c and portmacro.h separately anyway to support the SAMD51J19A

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Lajon  If my memory serves me right, the SAMD51J19A wasnt supported out of the box by Atmel ASF wizard/FreeRTOS combo but you could add the support for it (just like for the SAM4S I am using) by manually adding the port and portmacro files from the GCC portable directory in the main FreeRTOS distro

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lajon, that worked amazeballs!

 

I was getting frustrated with the super buggy ASF thing built in to Atmel Studio. It never gave me options for the SAMD51 chips and did lots of odd things.

 

Opened up start.atmel.com, chose the processor and added the FreeRTOS v8.2.3 software component and configured a few other things. And like magic it immediately compiled successfully without needing to manually copy any files around.

 

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Kunzy personally I never used the start.atmel.com simply because many people here actually say that it is buggy like mad why I do as much as possible without having to rely on either ASF3 or start.atmel.com - hence I wasnt aware that they sorted the FreeRTOS part for the newer parts. I still feel I should warn you that you might yourself badly bitten by the bugs in start.atmel.com - based on people's experiences here. But Im glad that you are having a positive experience with start.atmel.com - so far anyway

 

Ilya

Last Edited: Thu. Sep 24, 2020 - 06:08 AM