Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

AVR323_WinAVR demo compilation with AVR Studi

Posted by Gerardo Rosiles on March 28, 2010
I used to be able to compile the FreeRTOS demo for the Atmega32 (using the Atmega323 demo) with AVR Studio. I downloaded the newer version of FreeRTOS and get the following errors:
C:\WinAVR\FreeRTOS\Demo\AVR_ATMega323_WinAVR\rtosdemo\default/../../main.c:269: undefined reference to `eeprom_read_block'

C:\WinAVR\FreeRTOS\Demo\AVR_ATMega323_WinAVR\rtosdemo\default/../../main.c:271: undefined reference to `eeprom_write_byte'

I know this looks more like an AVR studio or WinAVR question, but since it is related to the FreeRTOS demos I would like to see if someone has encountered this problem. It would seem that the compiler does not know were to locate the eeprom library, but if I make the program directly on a command window I don't get this problem.

Thanks.

RE: AVR323_WinAVR demo compilation with AVR Studi

Posted by Gerardo Rosiles on March 28, 2010
Ok, I found the culcript, which I do not know who to blame :). The main.c code for the demo has the following lines:

#ifdef GCC_MEGA_AVR
/* EEPROM routines used only with the WinAVR compiler. */
#include
#endif

It seems that GCC_MEGA_AVR is not defined. I assume FreeRTOS is expected this to be defined somewhere in the compiler, but it is not being detected at compilation time. As I said, if I "make" directly on a command line there is no problem. Hence, somehow AVR Studio is not providing this definition at compile time. I do not think I need to add the file into the project since this is suppose to be part of the compiler standard definitions (?).

In any case, this did not happen with the older versions on the WinAVR and AVRStudio tools.

Regards.


RE: AVR323_WinAVR demo compilation with AVR Studi

Posted by Gerardo Rosiles on March 28, 2010
Forgot to mention, commenting out the pre-processor lines fixes the problem.

RE: AVR323_WinAVR demo compilation with AVR Studi

Posted by Gerardo Rosiles on March 28, 2010
I meant to say:
// #ifdef GCC_MEGA_AVR
/* EEPROM routines used only with the WinAVR compiler. */
#include
// #endif

Sorry for so much blurb.

RE: AVR323_WinAVR demo compilation with AVR Studi

Posted by Richard on March 28, 2010
Its been a while since I updated my WinAVR, but have just tried the very latest WinAVR against the very latest FreeRTOS and found it compiled without any problems (I got the "../../Source/tasks.c:420: warning: cast from pointer to integer of different size" warning which has been discussed here before), although I have not tried actually running the code.

The GCC_MEGA_AVR definition should be set on the GCC command line, using the -D option. Take a look at the makefile that comes in the FreeRTOS WinAVR example project.

Regards

RE: AVR323_WinAVR demo compilation with AVR Studi

Posted by Gerardo Rosiles on April 28, 2010
Thanks, that fixed the problem.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists