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] [January 2007 Threads] SAM7X lwIP_Demo Project ModificationPosted by Nobody/Anonymous on January 26, 2007 Hi,
I've been attempting to take the lwIP_Demo project and modify it for my own use. It compiles initially before I start modifying it, but after a while it starts to break. The issue seems to come up as soon as I try to remove the demo tasks:
(from main.c) /* Demo application includes. */ //#include "partest.h" #include "PollQ.h" //#include "semtest.h" //#include "flash.h" #include "integer.h" #include "BlockQ.h" //#include "BasicWEB.h" #include "USB-CDC.h"
I was able to remove the BasicWS and lwIP without problems, but once I start removing the partest.h, samtest.h, flash.h and the other related referenced I get the following errors:
../../Source/queue.o(.text+0x4c8): In function `xQueueReceive': ../../Source/queue.c:470: internal error: dangerous error /usr/local/bin/../lib/gcc-lib/arm-elf/3.3.2/../../../../arm-elf/bin/ld: /usr/local/bin/../lib/gcc-lib/arm-elf/3.3.2/../../../../arm-elf/lib/libg.a(memcpy.o)(memcpy): warning: interworking not enabled. /usr/local/bin/../lib/gcc-lib/arm-elf/3.3.2/../../../../arm-elf/bin/ld: first occurrence: ../../Source/queue.o: thumb call to arm ../../Source/queue.o(.text+0x59a): In function `xQueueReceiveFromISR': ../../Source/queue.c:515: internal error: dangerous error collect2: ld returned 1 exit status make: *** [rtosdemo.elf] Error 1 ecnaab119:~
I don't know what it is that causes these issues, but it is really annoying! Are these demo applications necessary for the project to compile for some reason? The error seems to be in the linking phase but I can't nail it down.
Thanks, Chris
RE: SAM7X lwIP_Demo Project ModificationPosted by Nobody/Anonymous on January 26, 2007 Hi,
I did the same thing. I.e. removed demo project and tried to make use of lwip optional (as its easier to fit the application to ram as lwip is not included to test different stuff). My make file source list looks like:
# List C source files here FREERTOS_THUMB_SRC= \ ../FreeRTOS/Source/tasks.c \ ../FreeRTOS/Source/queue.c \ ../FreeRTOS/Source/list.c \ ../FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/port.c \ ../FreeRTOS/Source/portable/MemMang/heap_2.c DEMO_APP_THMUB_SRC= \ main.c \ serial/serial.c # BasicWEB.c # USB/USB-CDC.c # ../FreeRTOS/Demo/Common/Minimal/flash.c \ # ../FreeRTOS/Demo/Common/Minimal/BlockQ.c \ # ../FreeRTOS/Demo/Common/Minimal/integer.c \ # ../FreeRTOS/Demo/Common/Minimal/PollQ.c \ # ../FreeRTOS/Demo/Common/Minimal/semtest.c \
ifeq ($(USE_LWIP),YES)
LWIP_THUMB_SRC= \ lwip-1.1.0/src/core/tcp_out.c \ lwip-1.1.0/src/core/inet.c \ lwip-1.1.0/src/core/mem.c \ lwip-1.1.0/src/core/memp.c \ lwip-1.1.0/src/core/netif.c \ lwip-1.1.0/src/core/pbuf.c \ lwip-1.1.0/src/core/raw.c \ lwip-1.1.0/src/core/stats.c \ lwip-1.1.0/src/core/sys.c \ lwip-1.1.0/src/core/tcp.c \ lwip-1.1.0/src/core/tcp_in.c \ lwip-1.1.0/src/core/ipv4/ip.c \ lwip-1.1.0/src/core/ipv4/ip_addr.c \ lwip-1.1.0/src/core/ipv4/icmp.c \ lwip-1.1.0/src/api/tcpip.c \ lwip-1.1.0/src/api/api_msg.c \ lwip-1.1.0/src/api/err.c \ lwip-1.1.0/src/api/api_lib.c \ lwip-1.1.0/src/netif/etharp.c \ lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c \ lwip-1.1.0/src/netif/ethernetif.c \ EMAC/SAM7_EMAC.c \ lwip-1.1.0/src/core/udp.c \ lwip-1.1.0/src/core/ipv4/ip_frag.c
endif
ARM_SRC= \ ../FreeRTOS/Source/portable/GCC/ARM7_AT91SAM7S/portISR.c \ Cstartup_SAM7.c \ serial/serial_ISR.c ifeq ($(USE_LWIP),YES) ARM_SRC += EMAC/SAM7_EMAC_ISR.c endif
And had the same kind of problem as you. But I noticed that I forgot -mthumb-interwork from linker flags. Now I have:
LDFLAGS = $(MCFLAGS) -mthumb-interwork -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--no-warn-mismatch
and it works. Thing is that there are different versions of libraries under: C:\Program Files\yagarto\arm-elf\lib and linker has to know which one to use.
I hope this helps you, Madis
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|