Starting RTOS project for E70, would appreciate words of wisdom

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

I'm an old hand with RTOS projects and the Atmel ARM7 and ARM9 microcontrollers. I am completely new to the Atmel Studio. I installed Studio 7 and have run a couple of demos for the E70 Xplained. But now it will not rebuild the project for my actual hardware due to a server fault when downloading. Also, when I add the RTOS component, it looks like it is going to build a bare metal project, then adding an RTOS off to the side. In other words, that the RTOS is not being used as the operating system to synchronize and provide services for the various components. Finally, I learned that the Studio debugger does not support the ETB or ETM.

 

Am I understanding these things correctly ?

 

If so, then I think that the better path is to go with a a different IDE and a current copy of FreeRTOS. I like Segger's Embedded Studio, and it supports FreeRTOS with a task-aware plugin. But what about the device drivers and more complicated middle-ware like a USB device stack ? Can one find RTOS-compatible source for these ? It becomes quite a big job to port over to an RTOS if the only code available is single-threaded with busy-waits everywhere. I did it once for a SAM7 and got a good result, but surely I can't be the first one. Any guidance or comments and discussion would be much appreciated.

 

George 

 

 

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

Dear George,

 

to my knowledge there is no 'RTOS aware driver lib' for all the µC peripherals like timers, ADC, CAN, GPIO ... . Some of the ASF example projects come with hints how to use peripherals with FreeRTOS (at least the USB driver comes to my mind). I would be rather surprised if any IDE really gives you a RTOS aware driver lib. The reason for this is that the peripherals behave different between µC and even if they provide you with such a lib they have to consider a lot of possible interaction with other peripherals they might be used or not in your application. So I think the bottom line is that you have to write the adoption of the driver lib to be inline with an RTOS will be your task.

There is a nice tool from SEGGER called SystemView that allows to trace the task execution and FreeRTOS internal states. It is not a plugin for AtmelStudio but I run it in parallel with AtmelStudio with no problem at all.

 

Best Regards

Markus

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

Hi Markus,

 

Thank you for your sensible comments. Since posting I've put together most of the elements of my current project in an RTOS framework. There has been quite a bit of non-trivial work, some to just adapt for the RTOS and some to fix bugs. The Atmel Studio does an impressive job of pulling together various facilities and making it look like something whole. I did not find that result so useful to build a custom project with multiple peripherals and features for the reasons noted previously. It was useful for quickly trying individual examples and various capabilities in the microcontroller.

 

I have been working primarily in Segger's Embedded Studio and am eager to try SystemView, as the FreeRTOS plugin is pretty weak. At a glance it looks like one needs to add several SystemView files to the build, and patch FreeRTOS.

 

George

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

Dear George,

I use SystemView and FreeRTOS a lot because my application has about 20 tasks and uses 2x I²C, SPI, 12 TC channels, HSMCI, FatFS, USB composite, 2 UART, 1 USART, 10 ADC channels. Most of those peripherals are using DMA to copy data between them and memory. To use SystemView was not a big deal with FreeRTOS v8.2.3. I upgraded to v9.0.0 and have a lot of trouble since. I think partly they are related to AS. So I thought to give Seggers EmbeddedStudio a chance. Actually I posted a question for you concerning the startup in the Segger Embedded Studio forum.

On the other side it was not a big thing to have an open AS and and open SystemView. They cooperate quite nice. So I'm still not sure which tool to use in the future. AS makes trouble with every update - but still have a lot of problems so updates are welcome. If I look at the comments in the Segger forum it might be the same for Seggers Embedded Studio. The compile time seems to be faster in Embedded Studio. But I haven't really tested it in a real world project.

 

Best Regards

Markus