Quality RTOS & Embedded Software

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


Loading

How to build AVR32 example under Atmel Studio 7

Posted by anb80 on May 17, 2016

I have downloaded FreeRTOS 9.0.0 rc2 because I need to work with the latest FreeRTOS while Atmel ASF only provides FreeRTOS v.7. However, it's unclear to me how should I build the samples provided with the FreeRTOS download under Atmel Studio. I only get folder with main.c and other folders that contain AVR32 specific files. Unfortunately I don't know how to build this under Atmel Studio and also how to link it with FreeRTOS sources which are in completely different directory and have no relation to demo sources.

Thanks for help.


How to build AVR32 example under Atmel Studio 7

Posted by heinbali01 on May 18, 2016

AVR32 : is this a project with the UC3?

What version of Atmel Studio are you using?

What I would do is select a FreeRTOS V7 demo project. Also you select other features from the ASF that you need. Compile and test it on your hardware.

When this basic demo project works, you can replace the kernel with 9.0.0 rc2, and gradually make it your own project. Let us know if it helps.


How to build AVR32 example under Atmel Studio 7

Posted by anb80 on May 18, 2016

Thanks, Hein, yes, I am working with UC3. What you suggest is the what I have tried multiple times last year with FreeRTOS v8 and now for the new project I am trying the same thinkg with v9. However, I am getting countless compile errors which I am trying to fix one by one, but every time I am close to zero, the build process seems to progress one step further and I get even more compile errors then. Therefore I don't see any way how to get rid of all the errors.


How to build AVR32 example under Atmel Studio 7

Posted by rtel on May 18, 2016

Note the UC3 files in the FreeRTOS download are for old ES parts so the port layer should come from the ASF.


How to build AVR32 example under Atmel Studio 7

Posted by anb80 on May 18, 2016

By "port" here do you mean port.c+portmacro.h+exception.S files from SourcePortableGCCAVR32_UC3 or gpio.c + gpio.h from Demos - DRIVERS?


How to build AVR32 example under Atmel Studio 7

Posted by rtel on May 18, 2016

The files in FreeRTOS/Source/portable/[compiler]/AVR32_UC3


How to build AVR32 example under Atmel Studio 7

Posted by anb80 on May 18, 2016

Is there any paid support or a person I can pay directly that would do this for me? I am spending too much time upgrading FreeRTOS v7 to v9 in Atmel Studio 7 project instead of doing the development. I need to have a modified sample of basic FreeRTOS sample from Atmel Studio 7 with FreeRTOS v9 instead of v7...will give it another couple of tries today, but I am willing to pay someone if I have to lose more time than that.


How to build AVR32 example under Atmel Studio 7

Posted by heinbali01 on May 18, 2016

I don't mind looking at the compiler output and give some hints.

If you want, email me directly to h point tibosch at freertos point org and we'll get through it after a few emails. I'm not unfamiliar with the UC3A0512.

In return, I would appreciate if you put your DEMO project available for other users.

Regards.


How to build AVR32 example under Atmel Studio 7

Posted by anb80 on May 19, 2016

I am not sure I can really preserve the e.g. portmacro.h from the FreeRTOS/Source/portable/[compiler]/AVR32UC3 folder of the Atmel ASF because then I am completely missing the BaseTypet definition which is defined in FreeRTOS v9 sources in portmacro.h as: typedef long BaseType_t;

Are you sure in that case I must preserve all files from FreeRTOS/Source/portable/[compiler]/AVR32_UC3 folder created by Atmel Studio?


How to build AVR32 example under Atmel Studio 7

Posted by heycki on November 27, 2016

Hi, sorry to revive an old thread but the problem in question persist.

I'm also working with AVR32 UC3C and there's no problem building FreeRTOS v7 provided by ASF.

Building v9 is impossible, though, because the Atmel Framework doesn't even have the header files (sys/cpu.h, sys/usart.h) referenced from FreeRTOS/portable/GCC/AVR32/AVR32_UC3/port.c.

Have you found any solution to this?

Using AVR32 Toolchain 3.4.3.


How to build AVR32 example under Atmel Studio 7

Posted by heinbali01 on November 28, 2016

I tried both toolchains :

	avr32-gcc (AVR_32_bit_GNU_Toolchain_3.4.3_820) 4.4.7
    avr32-gcc (AVR_32_bit_GNU_Toolchain_3.4.2_435) 4.4.7

Both had a few missing defines in some avr32 header files:

AVR32_INTC_IPR0_INTLEV_SIZE
AVR32_INTC_IPR0_INTLEV_MASK
AVR32_INTC_IPR0_INTLEV_OFFSET
AVR32_PWM_PWM_[0-3]_FUNCTION
AVR32_USART0_RXD_0_PIN
AVR32_USART0_RXD_0_FUNCTION
AVR32_USART0_TXD_0_PIN
AVR32_USART0_TXD_0_FUNCTION
AVR32_USART1_RXD_0_PIN
AVR32_USART1_RXD_0_FUNCTION
AVR32_USART1_TXD_0_PIN
AVR32_USART1_TXD_0_FUNCTION

which were easy to add.

After that I saw linker errors:

~~~~ port.c(1,1): error: undefined reference to set_cpu_hz' port.c(1,1): error: undefined reference tosetusartbase' port.c(1,1): error: undefined reference to usart_init' ~~~~ setcpuhz()has to do with Newlib and functions likeudelay()`.

Do you plan to use a usart?

I can not find a function that matches the call usart_init( configDBG_USART_BAUDRATE ).

When the ASF Wizard (in AS-7) creates usart-support I get this module:

~~~~ srcASFavr32driversusartusart[.ch] ~~~~

with this function:

~~~~ extern int usartinitrs232(volatile avr32usartt *usart, const usartoptionst *opt, long pba_hz); ~~~~

That is how far I got with this demo project. Maybe some else knows where usart_init( BaudRate ) is defined.

Regards.


[ 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