casainho wrote on Tuesday, December 11, 2007:
Thanks for your suggestions. I can build with success if I uncomment "serial.c" on "makefile" however the final code is this:
Size after:
main.elf :
section size addr
.data 74 8388864
.text 9410 0
.bss 1667 8388938
.stab 888 0
.stabstr 113 0
.debug_aranges 448 0
.debug_pubnames 1838 0
.debug_info 10299 0
.debug_abbrev 3552 0
.debug_line 13334 0
.debug_frame 1536 0
.debug_str 4743 0
.debug_loc 5406 0
.debug_ranges 24 0
Total 53332
Errors: none
-------- end --------
9410 bytes of program memory? is to much? I think so and that is because I am build unnecessary files, right? - and it flashes the LED ok, at the right times, I saw on oscilloscope 
If I "make clean" and after "make", the result is this one - without "serial.c":
C:\Users\jpinto\Documents\01_projectos\90-auto_formacao\FreeRTOSV4.6.1\Demo\AVR_
ATmega168_GCC-AVR>make
set -e; avr-gcc -MM -mmcu=atmega168 -I. -D GCC_MEGA_AVR -I. -I…/…/Source/inclu
de -I…/Common/include -g -Os -fsigned-char -funsigned-bitfields -fpack-struct -
fshort-enums -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-a
lign -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wunused -Wa,-adhlns=ParTest/ParTest.lst -std=gnu99 ParT
est/ParTest.c
| sed ‘s,\(.*\)\.o[ :]*,\1.o \1.d : ,g’ > ParTest/ParTest.d;
[ -s ParTest/ParTest.d ] || rm -f ParTest/ParTest.d
set -e; avr-gcc -MM -mmcu=atmega168 -I. -D GCC_MEGA_AVR -I. -I…/…/Source/inclu
de -I…/Common/include -g -Os -fsigned-char -funsigned-bitfields -fpack-struct -
fshort-enums -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-a
lign -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wunused -Wa,-adhlns=main.lst -std=gnu99 main.c
| sed ‘s,\(.*\)\.o[ :]*,\1.o \1.d : ,g’ > main.d;
[ -s main.d ] || rm -f main.d
-------- begin --------
avr-gcc (GCC) 4.1.2 (WinAVR 20070525)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiling: main.c
avr-gcc -c -mmcu=atmega168 -I. -D GCC_MEGA_AVR -I. -I…/…/Source/include -I…/C
ommon/include -g -Os -fsigned-char -funsigned-bitfields -fpack-struct -fshort-en
ums -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsi
gn-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing
-declarations -Wunused -Wa,-adhlns=main.lst -std=gnu99 main.c -o main.o
main.c: In function ‘main’:
main.c:40: warning: pointer targets in passing argument 2 of ‘xTaskCreate’ diffe
r in signedness
Compiling: ParTest/ParTest.c
avr-gcc -c -mmcu=atmega168 -I. -D GCC_MEGA_AVR -I. -I…/…/Source/include -I…/C
ommon/include -g -Os -fsigned-char -funsigned-bitfields -fpack-struct -fshort-en
ums -Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsi
gn-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing
-declarations -Wunused -Wa,-adhlns=ParTest/ParTest.lst -std=gnu99 ParTest/ParTe
st.c -o ParTest/ParTest.o
Linking: main.elf
avr-gcc -mmcu=atmega168 -I. -D GCC_MEGA_AVR -I. -I…/…/Source/include -I…/Comm
on/include -g -Os -fsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
-Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-
compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-de
clarations -Wunused -Wa,-adhlns=main.o -std=gnu99 main.o ParTest/ParTest.o –
output main.elf -Wl,-Map=main.map,–cref -lm
main.o: In function `main’:
C:\Users\jpinto\Documents\01_projectos\90-auto_formacao\FreeRTOSV4.6.1\Demo\AVR_
ATmega168_GCC-AVR/main.c:40: undefined reference to `xTaskCreate’
C:\Users\jpinto\Documents\01_projectos\90-auto_formacao\FreeRTOSV4.6.1\Demo\AVR_
ATmega168_GCC-AVR/main.c:42: undefined reference to `vTaskStartScheduler’
main.o: In function `vFlashLED’:
C:\Users\jpinto\Documents\01_projectos\90-auto_formacao\FreeRTOSV4.6.1\Demo\AVR_
ATmega168_GCC-AVR/main.c:76: undefined reference to `xTaskGetTickCount’
C:\Users\jpinto\Documents\01_projectos\90-auto_formacao\FreeRTOSV4.6.1\Demo\AVR_
ATmega168_GCC-AVR/main.c:77: undefined reference to `vTaskDelayUntil’
C:\Users\jpinto\Documents\01_projectos\90-auto_formacao\FreeRTOSV4.6.1\Demo\AVR_
ATmega168_GCC-AVR/main.c:84: undefined reference to `xTaskGetTickCount’
C:\Users\jpinto\Documents\01_projectos\90-auto_formacao\FreeRTOSV4.6.1\Demo\AVR_
ATmega168_GCC-AVR/main.c:85: undefined reference to `vTaskDelayUntil’
ParTest/ParTest.o: In function `vParTestToggleLED’:
ParTest/ParTest.c:110: undefined reference to `vTaskSuspendAll’
ParTest/ParTest.c:123: undefined reference to `xTaskResumeAll’
ParTest/ParTest.o: In function `vParTestSetLED’:
ParTest/ParTest.c:84: undefined reference to `vTaskSuspendAll’
ParTest/ParTest.c:98: undefined reference to `xTaskResumeAll’
make: *** [main.elf] Error 1
C:\Users\jpinto\Documents\01_projectos\90-auto_formacao\FreeRTOSV4.6.1\Demo\AVR_
ATmega168_GCC-AVR>
And here is a portion of "makefile", showing "task.c":
# List C source files here. (C dependencies are automatically generated.)
DEMO_DIR = …/Common/Minimal
SOURCE_DIR = …/…/Source
PORT_DIR = …/…/Source/portable/GCC/ATMega168
SRC =
main.c
ParTest/ParTest.c
#serial/serial.c
regtest.c
$(SOURCE_DIR)/tasks.c
$(SOURCE_DIR)/queue.c
$(SOURCE_DIR)/list.c
$(SOURCE_DIR)/croutine.c
$(SOURCE_DIR)/portable/MemMang/heap_1.c
$(PORT_DIR)/port.c
$(DEMO_DIR)/crflash.c
$(DEMO_DIR)/integer.c
$(DEMO_DIR)/PollQ.c
$(DEMO_DIR)/comtest.c
Can you help?
I would suggest a wiki style system and a forum for FreeRTOS - people could share this adaptations from microcontroler to microcontroler.
Thank you.