[En-Nut-Discussion] RE: Compiler problem
Rob van Lieshout (PragmaLab)
info at pragmalab.nl
Thu Mar 16 09:24:20 CET 2006
Hello Herman,
the 'FRAM' variable indeeed comes from your Ethernut startup code
'crtnutram.s' and runtime enables exernal onboard RAM. Just make sure that
the linker flags (normally 'LDFLAGS') contain the '-dFRAM:1' option. This
way, your build as well as your code enable external RAM and not (like in
your case) only the code.
regards,
Rob van Lieshout
>Hello,
>I installed Ethernut Version 4.0.3 and use the AVR Icc V7 Compiler.
>When I compile a Project I get an error:
>C:\iccv7avr\bin\imakew -f ftpd.mak iccavr -c -I..\..\include -e -
>D__ICC_VERSION="7.04A" -DETHERNUT2 -D_MCU_enhanced -D__HARVARD_ARCH__
>-DATMEGA -DATMega128 -l -g -Mavr_enhanced
>C:\ethernut-4.0.1\nut\app\ftpd\ftpserv.c
>!W C:\ethernut-4.0.1\nut\app\ftpd\ftpserv.c: [warning] in function
>'FtpThread', argument 'arg' has no use.
>!W C:\ethernut-4.0.1\nut\app\ftpd\ftpserv.c(299):[warning] source code
.specifies an infinite loop
> iccavr -o ftpd -L..\..\lib\icc\enhanced -g -ucrtatmega.o
>-bfunc_lit:0x8c.0x20000 -dram_end:0x10ff -bdata:0x100.0x10ff
-dhwstk_size:16
>-beeprom:0.4096 -fihx_coff -ucrtnutram.o ..\..\lib\icc\enhanced\nutinit.o
>-S2 @ftpd.lk -lnutpro -lnutfs -lnutnet -lnutos -lnutdev -lnutcrt
-lnutarch
>-lcatmega
>!ERROR file 'crtnutram.o': undefined symbol 'FRAM'
>C:\iccv7avr\bin\imakew.exe: Error code 1
>Done: there are error(s). Exit code: 1
>
>
>I found in the file extram.s this code:
>
> MCUCR = 0x35
>
> ldi R16,0x80 ; extern RAM enable
> ldi R17,FRAM
> sbrs R17,0
> ori R16,0x40 ; wait state
> out MCUCR,R16
>
>But when I replaced FRAM with 0x00 the error was the same.
>Can anybody help me?
>
>
>regards
>Hermann
More information about the En-Nut-Discussion
mailing list