FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2008 Threads] AVR32 UC3 and GCC ToolsPosted by Kevin on March 31, 2008 There's a recently identified problem with Atmel's AVR32 UC3 build GCC build tools. The problem seems to be that the linker will include an entire library instead of scanning the library for used functions. This results in a program file bloated with unnecessary and uncalled functions. I'm working on a USB application that almost triples in size when build with the GCC tools vs. IAR's kickstart version. To get around this I had to add tell the linker to not use the standard gcc library (-nostdlib linker option). I then had to modify the FreeRTOS source code to remove the standard library calls, replacing them with functions added to port.c. Being new to open source code I'm not sure of the procedure for modifying the code. I know I have to make changes publicly available. (This is a commercial application). It seems it may be useful to someone to not use any library calls in the main RTOS code, and include library calls only in port.c which could be removed by conditional compile flag. Would this be useful to any one else? Atmel has admitted this problem but I havent' heard a timeframe for getting it fixed.
RE: AVR32 UC3 and GCC ToolsPosted by Richard on March 31, 2008 Thanks for the info.
Does the makefile use the -ffunction-sections and -fdata-sections compiler options, and then the --gc-sections linker option? I think in theory this should reduce the code size by removing unused functions but it can be difficult.
If you send your modification to me (r _dot_ barry _@_ freertos.org) then I can hold them on record, and then forward them to anybody else who expresses after reading this post. That way the source code is 'available'.
Regards.
RE: AVR32 UC3 and GCC ToolsPosted by Kevin on April 1, 2008 Even with the compiler and linker options you mentioned, the program file is huge. Apparently the problem is with the gcc library crt0.o startup file. To workaround, use the startup file included in the software framework provided by Atmel (UTILS/STARTUP_FILES/GCC/crt0.S) then use the -ffunction-sections and -fdata-sections compile options, and --gc-sections and -nostdlib linker options. memset(), memcpy(), and strncpy() functions will need to be replaced. After this my program size went from 88kB to 36kB. Ideally Atmel will resolve this before production release of this product, if not, or if anybody else is interested I'll send you the modified source code.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|