FreeRTOS-Kernel/FreeRTOS/Demo/AVR_Dx_Atmel_Studio
Paul Bartell 569c78fd8c
Remove coroutines (#874)
* Remove co-routine centric CORTEX_LM3S102_Rowley demos.

Remove CORTEX_LM3S102_Rowley Demo2 and Demo3.
Update Demo1 to no longer use coroutines.

* Remove co-routines from MB91460_Softune demo

* FreeRTOS_96348hs_SK16FX100PMC: Remove co-routine usage.

Remove co-routine usage from FreeRTOS_96348hs_SK16FX100PMC demo.

* MB96350_Softune_Dice_Kit: Remove co-routine usage

Remove co-routines usage from MB96350_Softune_Dice_Kit demo

* AVR_Dx_IAR: Remove co-routine usage

* AVR_Dx_Atmel_Studio: Remove co-routine usage

* PIC24_MPLAB: Remove autogenerated files and add to .gitignore

* PIC24_MPLAB: Remove co-routine usage from demo

* AVR_ATMega323_IAR: Remove co-routine usage

* ColdFire_MCF52221_CodeWarrior: Remove coroutine usage

* AVR_ATMega4809_MPLAB.X: Remove co-routine usage

* AVR_ATMega4809_IAR: Remove co-routine usage

* AVR_ATMega4809_Atmel_Studio: Remove coroutine usage

* AVR_ATMega323_WinAVR: Remove coroutine usage

* AVR_Dx_MPLAB.X: Remove coroutine usage

* dsPIC_MPLAB: Remove coroutine usage

* CORTEX_LM3S102_GCC: Remove coroutines and coroutine centric demos

* CORTEX_LM3S102_GCC: Update makefile to discard unused symbols

Allows fitting in the limited ram/flash for this part.

* CORTEX_LM3S316_IAR: Remove coroutines

* Demos: Remove references to crflash.c, crhook.c, crflash.h, crhook.h

* Remove coroutine options from FreeRTOSConfig.h files

* Xilinx: Remove backup file generated by revup utility

* Demos: Remove Coroutine related config items and references

* Format CBMC FreeRTOSConfig.h

* Update URL from aws.amazon.com/freertos to github.com/FreeRTOS

* Fix copyright year and license text

* Fix license text in demo files

* Update header check excluded path list

* Add configBENCHMARK to lexicon
2022-11-22 10:29:53 +05:30
..
RTOSDemo Remove coroutines (#874) 2022-11-22 10:29:53 +05:30
readme.md Update previous AVR ATmega0 and AVR Dx projecs + addition of equivalent projects in MPLAB.X and IAR (#180) 2020-08-06 12:37:08 -07:00
RTOSDemo.atsln Add Atmel Studio projects for ATMega4809 and AVR128DA48 (#159) 2020-07-27 17:30:53 -07:00

Overview

This directory contains a Atmel Studio demo project for AVR128DA48 Curiosity Nano board (GCC compiler) equipped with AVR128DA48 microcontroller (128 KB Flash, 16 KB SRAM, 512 bytes EEPROM).

The project comes as three different demos, selectable by a define in the main.c file. Each demo has its own main-demo_name.c file

Blinky Demo

#define mainSELECTED_APPLICATION 0

Blinky demos are intended for beginners. They normally create just two tasks that communicates with each other through a queue. Their functionality is contained in a single C source file called main_blinky.c.

One of the tasks repeatedly sends a predefined value to the queue with 200 ms intervals, while the other task waits for messages to be available in the queue. Once a new message is available, it toggles on board LED if the value matches the expected value.

Minimal Demo

#define mainSELECTED_APPLICATION 1

This demo includes a higher number of tasks than the Blinky demo, but the complexity is still fairly low. Whole functionality is included in the main_minimal.c file by using the following tasks:

  • integer math task (Integer.c)
  • register tasks to verify the context switch (regtest.c)
  • polled queue tasks (PollQ.c)
  • serial communiation tasks (Serial.c)
  • check task that periodically checks the other tasks are operating without error.

This demo uses the check task to periodically inspect the standard demo tasks in order to ensure all the tasks are functioning as expected. The check task also toggles an LED to give a visual feedback of the system status. If the LED is toggling roughly every second, then the check task has not discovered any problems. If the LED stops toggling, then the check task has discovered a problem in one or more tasks.

To see the console output from serial communication tasks, serial port could be configured as:

  • baud rate 9600
  • data 8-bit
  • parity none
  • stop bits 1-bit
  • flow control none

Full Demo

#define mainSELECTED_APPLICATION 2

This demo is a comprehensive demonstration and test of a lot of FreeRTOS features, including direct task to task notifications, queues, semaphores, recursive semaphores, software timers, and more. The following tasks are created in main_full.c file:

  • register tasks to verify the context switch (Regtest.c)
  • semaphores task (Semtest.c)
  • direct task to task notification task (TaskNotify.c)
  • recursive semaphores task (Regmutex.c)
  • check task that periodically checks the other tasks are operating without error

The demo uses the check task to periodically inspect the standard demo tasks in order to ensure all the tasks are functioning as expected. The check task also toggles an LED to give a visual feedback of the system status. If the LED is toggling roughly every 3 seconds, then the check task has not discovered any problems. If the LED stops toggling, then the check task has discovered a problem in one or more tasks.

Quick start

To run this demo on AVR128DA48 Curiosity Nano platform, the following steps are required:

  • install Atmel Studio IDE
  • open RTOSDemo.atsln project file from current folder
  • select desired demo using #define mainSELECTED_APPLICATION as explained in the previous section
  • build and debug the project

References