simulavr-devel
[Top][All Lists]
Advanced

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

Re: [Simulavr-devel] OSX compilation


From: Jakob Schwendner
Subject: Re: [Simulavr-devel] OSX compilation
Date: Fri, 29 Apr 2005 18:43:45 +1000

Hey guys,

finally I got everything working fine. 
In my first try I did the endianess swap in the wrong place. 
I've done a diff to the current CVS that compiles fine on my 10.3.9 OSX.
There seemed to be a small change in the binutils (2.15-1) as well. I
haven't really tried to do the config changes very variable as I don't
know that much about autoconf and the like.
In the docs it says something about a printf style debug facility. How
can I get that to work?
Anyway, here is the patch.

begin 644 darwin-patch.diff.gz
M'XL("$KO<4(``V1A<G=I;BUP871C:"YD:69F`-V7>V^;2!#`_S:?8M2XD2D&
MC)V729PF39-3JN02Q;T^5$5H#>L8%5C$+DY\;;[[S8+!X,;I2]=[(-G`,#LS
M._/;63B-/'address@hidden"8F7P\X=R=32$L1]0&TQWRA.T;7(_3`,R3<J+NSNS
M=-J>address@hidden"9ZXSR*PC`W%\\=CT%/address@hidden(address@hidden
M0J=G][;address@hidden:433M(IRMP^'<3)7WK&[&_;&7%DY.`#=ZK<M"[3\='"@
address@hidden>`45O!?Y(,!:`KD]I(D-580],CT[-*`T"V*]<=_?7+?C\&3XI
M>F;'G;#%%3QYSU((address@hidden"KM^Q`4)`NJ!8."R,,9<0O/RZN+5\=%KX\G<
M0!Z2?J]H:S\6D;96AK2X_-&8YA;RH+0U3%2C`:!`BZ2"A>0C_;[8H`SM-"?4
M9='8OTD3:A#W5T):];N24VN[!JJU70]7PEH5-#;@G"0EKE;7MA:XHBW):TW_
M:\AN=]M;B"R>MC-DLT)R*F3U1F//D;-S`N82(>/%`C8_/address@hidden';ZZ<L],7
MIR^.KUZ_;WU8H7FM*MHW:IHH]D<T$3-5`4RJDU#BT6`\:+8\/XE(B!R55Q^:
MK=N)[TZDHCY7O%95]8&X*J;NI0\,"0I:>.*:YPB=++!!PE\)S)+KU<QLU9G9
address@hidden<JP^6+,5\C9M!`9+3])<@[/G:/+RY.S
MP]^&6)_71V?.Z>]'9W^\/':&E\=':J[P[EVNH%]T93^<:PP;C0'HI\V69&!2
M`J!F,L%B!V/#,JLR0RB#7#A*_<`KQ(KV+;:69*9AF'[D!JE'O\<5HKX&;P^O
M;address@hidden@)R'3`'^,-\%O_!GP.'A74%=0S#`-'96G;ZF5IRTXR;8UF2VH[
M,address@hidden@N2<address@hidden'!RGM%;]S(<3B%>address@hidden&D-'FSP=
M83]^:@address@hidden:;L]S@"address@hidden&M\_>R;+A4\I)!GC!225B^
address@hidden"F:%\;=8?YS+4T`-,8!#B+W+3A%,..I^0!+<!G56GI6C_C>#'`1&.[#0\
M)B[RPG%5!M0)F9?B?J9[,address@hidden&L<)Y7QYSEA9-Z`D<JKU
MS6"X.E>KFG-JMC<R:address@hidden"+D-^:!4W/I<^YK.:U$-;A<N/X
M,;ST4S/E2;%XS-Q$U^C]6.G^+LJ:!P_`A:$/9US0T#SS1PE)9N9)@E6]9<E'
M;EYF$S'&A<1\D[]X<!,G]^^<[D]SB5DJ<<QG5O*Q0/(!<I;!,>+92I:JNRO*
M\;7-=VGVX!?OKS7G*W?8?FV#[4,]Y&*'K4D;5F_Q:F9MV)N;^'96[K']<HNM
M#_K:)MOM9.L^.Q5?%,6!6TV+4U??1P)N^/KP^,@YNSA\">OKD(FG(=GKW.UT
MQGBH\`E,DT7!#.2+#^`0/H'13"!!)/+`(X+4K6<>(H%-X$^Z^^4CTY0/!IDC
MQV7L(_6<7%5?5ETH)N0VU]%6ZSBHY*QPFD;<OY'XNKC$X9D(XT%K2::&^*G!
MW):address@hidden&RH<]"57%X8>"1H)WB+XI"T3UP:TVX9.&U;9.)')T_??)KZ@
MYS1LY0.RZ(.0E./R`O;S`O;G!?SN$NX/L(:6)$(M/FX>+M'_/^^E2SEI-A[C
address@hidden)->9&FWVFHRS/^)-E,Z7MEB>K46TX-%J$5[*26-+KPBT;RS8%OIV]WM
MLK/TRLY2T?^RJUB5KK+9;>^`EOU+)*?,]^!PFF18V_8"ZZ42HX_V0S58$F)%
MAK*`!:UCEL""%B$&G5W\WYNKR6MMT)7]:5%PN2Q0G)O?XW-K-<"?M<(9!LF2
MF59JJ@,,\0/>6M>[CVE;2_K72POC,=N/ZRY;SB(I=>_G4Y0?RW\!-"LRM#X3
"````
`
end

On 4/29/05, Bill <address@hidden> wrote:
> Thanks Klaus...I thought I broke something on my system...but after
> chasing my tail for a while, turns out I just misunderstood a few things
> about the update to 2.6 kernel ;-)
> 
> Anyway, I have a little cleanup to do on simulavrxx to do as I add the
> endianness change. (doesn't build/compile for me at the moment...minor
> things it seems)
> 
> Cheers
> 
> Klaus Rudolph wrote:
> 
> >Hi Jakob,
> >
> >
> >
> >>I finally got everything to compile properly. I even got the .so to
> >>compile (changed the -shared to '-flat_namespace -single_module
> >>-dynamiclib -undefined suppress').
> >>
> >>
> >
> >Great! I hope bill could introduce this for the configure script.
> >It would be nice if you could do the tests for us.
> >
> >
> >
> >>     7750 flyer.elf 0x024a: bufferIsNotFull+0xb            RJMP fffff64e
> >>     8000 flyer.elf 0xf64e: ,__data_end,_edata,__data_start+0xdf81
> >>CPU-waitstate
> >>     8250 flyer.elf 0xf64e: ,__data_end,_edata,__data_start+0xdf81
> >>Invalid Instruction!
> >>
> >>
> >
> >Could you compile a simple program for me which also runs into this
> >trouble and send me the elf file and sources and also the compiler
> >flags you used. Most important is the elf file.
> >
> >
> >
> >>bufferIsNotFull is from the avrlib.
> >>
> >>I tried changing the byte order in flash.cpp as you suggested, but
> >>couldn't get any result there. I did the following:
> >>    opcode=((MemPtr[addr])>>8)+((MemPtr[addr]&0xff)<<8);
> >>changed to
> >>    opcode=MemPtr[addr];
> >>
> >>after compilation the simulator wouldn't accept any code.
> >>
> >>
> >
> >You told us that at your last startpoint you could not get any code
> >to run. So what have you changed from the last try? Could
> >you send a complete diff file from the source after finishing your
> >patches?
> >
> >
> >
> >>I know my other programm is running fine, as it is running on an
> >>actual atmega128. Anything I need to be aware of when compiling the
> >>elfs?
> >>
> >>
> >
> >Code that runs in real hardware should run in the simulator. If not
> >the simulation is buggy :-)
> >But sometimes the simulator is giving much more detailed information
> >of problems which could not be seen in real hardware.
> >I also have wondered sometimes code run in real hardware but not
> >as expected. There where some jumps into the data area. The real core
> >runs through this data area and restarts with a reset  or wado and the
> >functionality was as expected but the code was really wrong. Only
> >the simulation crashes and this was correct :-)
> >
> >
> >
> >
> >
> >>Just at the side: How fast will the simulator run? can it perform
> >>real-time?
> >>
> >>
> >
> >On my laptop which is a 800 Mhz Intel the code for one 8515 runs
> >in realtime.
> >
> >
> >
> >>Where can I hook into the simulation? Don't want to use tcl
> >>or any of the like. Would prefer to actually use the shared library in
> >>an objective-c application. The things I need to do are:
> >>
> >>
> >
> >
> >
> >
> >>- uart in and out
> >>
> >>
> >Look for SerialRx and SerialTx class. There is actually the need
> >for a pipe to communicate to a UI. But you could change this for your needs.
> >
> >
> >
> >>- i/o pins out
> >>
> >>
> >Simply use a Net.
> >To the nets you could add pins. If you want to set the net to a defined
> >state (all others are inputs) then you simply add a "own" pin and
> >set the state of the pin as you needed.
> >
> >
> >
> >>- pwm out
> >>
> >>
> >Some as above. Create a Net from Net class. Add your pin where
> >the pwm out is on and read the state from an addition connected
> >"input pin".
> >
> >
> >
> >
> >>any way of doing this higher-order, rather than getting/setting pin
> >>values?
> >>
> >>
> >
> >?? If you want pin values you have to read/write pin values.
> >Maybe there is a misunderstanding. But I think we could
> >solve all your questions :-)
> >If you could not get a solution I maybe can provide some
> >example in native c++. But that needs some days because I have actually
> >no access to my sources.
> >
> >Bye
> >  Klaus
> >
> >
> >
> >
> >
> >
> 
>




reply via email to

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