avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [RFC] Patch to sfr_defs.h for XMEGA


From: Weddington, Eric
Subject: [avr-libc-dev] [RFC] Patch to sfr_defs.h for XMEGA
Date: Mon, 28 Apr 2008 13:39:01 -0600

Hi All,

Small problem in XMEGA support: the macros in pgmspace.h are using a lot
of "_SFR_IO_ADDR(RAMPZ)" as operands. Obviously the RAMPZ address will
be incorrect because it is subtracting the 0x20 offset used for the rest
of the AVR devices. The XMEGA devices do not have such an offset.

Instead of writing a whole new set of macros in pgmspace.h for the
XMEGA, I propose to make a change to sfr_defs.h to change the definition
of _SFR_IO_ADDR (and related macros) to have an offset of 0x00 when the
device is an XMEGA device.

I understand that this now places a magic number in a different place by
having lines like:
#  if __AVR_ARCH__ >= 100
IIRC, Dmitry brought up this issue.

I need to fix this *today* (as in the next few hours), so I'm ok with
still having a magic number here. This is so I can build and re-release
WinAVR with at least preliminary XMEGA support.

Are there any potential issues with this patch?

Thanks,
Eric Weddington


begin 666 sfr.patch
address@hidden(&EN8VQU9&4O879R+W-F<address@hidden/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/0I20U,@address@hidden)C97,O879R+6QI8F,O879R+6QI8F,O
M:6YC;'5D92]A=G(O<V9R7V1E9G,N:"QV"G)E=')I979I;F<@<F5V:7-I;VX@
M,2XQ. ID:69F("UU("UP("UR,2XQ."!S9G)?9&5F<RYH"BTM+2!I;F-L=61E
M+V%V<B]S9G)?9&5F<RYH"3$W($UA>2 R,# V(# X.C(R.C0U("TP,# P"3$N
M,address@hidden(&EN8VQU9&4O879R+W-F<E]D969S+F@),C@@07!R(#(P,#@@,3DZ
M,S Z,C @+3 P,# *0$ @+3$S-2PW("LQ,S4L,address@hidden *("address@hidden
M1E)?3T9&4T54"B O*B!$969I;address@hidden,@,"!B969O<F4@:6YC;'5D:6YG('1H
M:7,@9FEL92!F;W(@8V]M<&%T:6)I;&ET>2!W:71H(&]L9"!A<VT*(" @('-O
M=7)C97,@=&AA="!D;VXG="!S=6)T<F%C="!?7U-&4E]/address@hidden)O;2!S
M>6UB;VQI8R!)address@hidden<F5S<V5S+B @*B\*+2-D969I;address@hidden)?3T9&
M4T54(#!X,C **R,@(&EF(%]?05927T%20TA?7R ^/2 Q,# **R,@(" @9&5F
M:6YE(%]?4T927T]&1E-%5" P># P"BLC("!E;'-E"BLC(" @(&1E9FEN92!?
M7U-&4E]/1D93150@,'@R, HK(R @96YD:68*("-E;address@hidden@"B C:address@hidden
M4T927T]&1E-%5" A/2 P*2 F)B H7U]31E)?3T9&4T54("$](#!X,C I"D! 
M("TQ-C$L,address@hidden,R! 0 H@"B C96QS92 @+RH@(5]31E)?05--7T-/
M35!!5" J+PH@"BLC:69N9&5F(%]?4T927T]&1E-%5 HK(R @:address@hidden)?
M05)#2%]?(#X](#$P, HK(R @("!D969I;address@hidden)?3T9&4T54(#!X,# *
M*R,@(&5L<V4**R,@(" @9&5F:6YE(%]?4T927T]&1E-%5" P>#(P"BLC("!E
M;address@hidden(V5N9&EF"BL*("-D969I;address@hidden&4E]-14TX*&UE;5]A9&1R*2!?
M34U)3U]"651%*&UE;5]A9&1R*0H@(V1E9FEN92!?4T927TU%33$V*&UE;5]A
M9&1R*2!?34U)3U]73U)$*&UE;5]A9&1R*0H@(V1E9FEN92!?4T927TU%33,R
M*&UE;5]A9&1R*2!?34U)3U]$5T]21"AM96U?861D<BD*+2-D969I;address@hidden&
M4E])address@hidden:6]?861D<address@hidden@H:6]?861D<address@hidden P>#(P*0HM
M(V1E9FEN92!?4T927TE/,38H:6]?861D<address@hidden"@H:6]?861D
M<address@hidden P>#(P*0HK(V1E9FEN92!?4T927TE/."AI;U]A9&1R*2!?34U)3U]"
M651%*"AI;U]A9&1R*2 K(%]?4T927T]&1E-%5"D**R-D969I;address@hidden&4E])
M3S$V*&EO7V%D9'(I(%]-34E/7U=/4D0H*&EO7V%D9'(I("address@hidden)?3T9&
M4T54*0H@"B C9&5F:6YE(%]31E)?345-7T%$1%(H<V9R*2 H*'5I;G0Q-E]T
M*2 F*'-F<BDI"BTC9&5F:6YE(%]31E)?24]?041$4BAS9G(I("A?4T927TU%
M35]!1$12*'-F<address@hidden P>#(P*0HM(V1E9FEN92!?4T927TE/7U)%1U]0*'-F
M<address@hidden)?345-7T%$1%(H<V9R*2 \(#!X-C I"BLC9&5F:6YE(%]31E)?
M24]?041$4BAS9G(I("A?4T927TU%35]!1$12*'-F<address@hidden&4E]/1D93
M150I"BLC9&5F:6YE(%]31E)?24]?4D5'7U H<V9R*2 H7U-&4E]-14U?041$
M4BAS9G(I(#P@,'@T," K(%]?4T927T]&1E-%5"D*( H@(V1E9FEN92!?4T92
@7T%$1%(H<V9R*2!?4T927TU%35]!1$12*'-F<BD*( H`
`
end




reply via email to

[Prev in Thread] Current Thread [Next in Thread]