Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

CDC demo for IAR?

Posted by Nobody/Anonymous on September 1, 2005
Thanks very much for releasing the new version. I see the new USB CDC files.

Do you have them integrated into the AT91sam7S65 IAR environment?

My first attempts to compile them get tangled up with portENTER_SWITCHING_ISR() not being defined for IAR. Also the AT91F_AIC_ConfigureIt() arguments in USB-CDC.c don't compile when dropped into the IAR demo.

RE: CDC demo for IAR?

Posted by Richard on September 1, 2005
Interrupt service routines require different syntax between GCC and IAR.

GCC has a very powerful inline assembler, meaning the entire ISR can be written in C by simply calling the save and restore context macros.

IAR on the other hand does not have the same inline assembler capabilities, and therefore requires an ASM wrapper for the ISRs.

Also the macro used to cause a context switch at the end of the ISR is different.

See the “Interrupt service routines” section of the page http://www.freertos.org/portsam7xlwIP.html for an explanation of the required GCC syntax, and the “Interrupt service routines” section of http://www.freertos.org/portsam7iar.html for an explanation of the required IAR syntax. It is a small task to convert the provided GCC function to the IAR syntax. You can also copy the syntax from the existing USB hid demo in the files FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c and FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USB_ISR.s79.

Basically in IAR you want to use:

__arm void vUSB_ISR( void )
{
// Paste the code from the GCC CDC file here, all the
// code between but not including the ENTER and EXIT
// switching ISR macros.

/* We may want to switch to the USB task, if this message has made
it the highest priority task that is ready to execute. */
portEND_SWITCHING_ISR( xTaskWokenByPost );

/* Clear the AIC ready for the next interrupt. */
AT91C_BASE_AIC->AIC_EOICR = 0;
}


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner