* [ECOS] Building from OS X @ 2003-11-10 20:28 Rib Rdb 2003-11-10 20:34 ` Gary Thomas 2003-11-13 9:37 ` [ECOS] " John Dallaway 0 siblings, 2 replies; 9+ messages in thread From: Rib Rdb @ 2003-11-10 20:28 UTC (permalink / raw) To: ecos-discuss Since the configuration tool won't build on OS X, would it work to configure and build eCos on a windows machine, then copy the libraries and headers to a Mac OS X machine and do the development there with the appropriate cross compilers? Also, would the version of gcc, etc used on the Mac have to be the same as on the Windows computer? -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ECOS] Building from OS X 2003-11-10 20:28 [ECOS] Building from OS X Rib Rdb @ 2003-11-10 20:34 ` Gary Thomas 2003-11-10 22:00 ` [ECOS] Deciphering ISO C (Chap 6.3.2.3 - Pointers) Philip Soeberg ` (2 more replies) 2003-11-13 9:37 ` [ECOS] " John Dallaway 1 sibling, 3 replies; 9+ messages in thread From: Gary Thomas @ 2003-11-10 20:34 UTC (permalink / raw) To: Rib Rdb; +Cc: ecos-discuss On Mon, 2003-11-10 at 13:28, Rib Rdb wrote: > Since the configuration tool won't build on OS X, would it work to > configure and build eCos on a windows machine, then copy the libraries > and headers to a Mac OS X machine and do the development there with the > appropriate cross compilers? Also, would the version of gcc, etc used > on the Mac have to be the same as on the Windows computer? Or, just use 'ecosconfig' on your Mac! which surely will build. There's no reason you absolutely have to use the Config Tool. -- Gary Thomas <gary@chez-thomas.org> -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
* [ECOS] Deciphering ISO C (Chap 6.3.2.3 - Pointers) 2003-11-10 20:34 ` Gary Thomas @ 2003-11-10 22:00 ` Philip Soeberg [not found] ` <E1AJK5Y-0004tk-00@londo.lunn.ch> 2003-11-11 0:27 ` [ECOS] Building from OS X Rib Rdb 2 siblings, 0 replies; 9+ messages in thread From: Philip Soeberg @ 2003-11-10 22:00 UTC (permalink / raw) To: ecos-discuss Hi, I'm having weird difficulties with the flash_am29xxxxx.inl file, whereas I have created this cut-down version of what appears to be my problem: ------------- The code-example further down was created from analyzing line 216-217 in file flash_am29xxxxx.inl: ROM = (flash_data_t*) CYGNUM_FLASH_BASE; f_s1 = FLASH_P2V(ROM+FLASH_Setup_Addr1); Resulting output after preprocessing is: ROM = (flash_data_t*) (0x00000000u); f_s1 = ((volatile flash_data_t *) \ ((CYG_ADDRWORD)((CYG_ADDRESS)ROM+(0x555)))); The value in f_s1 must be 0x555 for the AMD chip to work in word mode (as far as I have read) ... but "diag_printf("%x", f_s1)" yields 0xAAA :( ------------- I can't seem to find the logic in why this example doesnt work: cyg_uint16* res_16; cyg_uint16* p_16; cyg_uint16 u_16; p_16 = 0x0u; u_16 = 0x0u; res_16 = (p_16 + 0x555u); The above code yields res_16 == 0xaaa I was sort of hoping for 0x555 instead... Altering the addition line to this: res_16 = (cyg_uint16*)(u_16 + 0x555); corrects the problem... why? The platform is a 32bit. Trying to decipher the first addition, I get: 32bit_u = (32bit_u + 32bit_u) assuming that the pointer cyg_uint16 * is 32bit... ------------- I hope one of you can shed some light to this problem of mine :) Regards, -=[ Philip Soeberg ]=- -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <E1AJK5Y-0004tk-00@londo.lunn.ch>]
* Re: [ECOS] Deciphering ISO C (Chap 6.3.2.3 - Pointers) [not found] ` <E1AJK5Y-0004tk-00@londo.lunn.ch> @ 2003-11-10 22:16 ` Andrew Lunn 0 siblings, 0 replies; 9+ messages in thread From: Andrew Lunn @ 2003-11-10 22:16 UTC (permalink / raw) To: Philip Soeberg; +Cc: ecos-discuss > cyg_uint16* res_16; > cyg_uint16* p_16; > cyg_uint16 u_16; > > p_16 = 0x0u; > u_16 = 0x0u;' > res_16 = (p_16 + 0x555u); > > The above code yields res_16 == 0xaaa > I was sort of hoping for 0x555 instead... > > Altering the addition line to this: > res_16 = (cyg_uint16*)(u_16 + 0x555); > corrects the problem... > > why? Pointer arithmetic. Take the following example bits of code....(which probably has many syntax errors etc) char foo[4]="bar"; char foo1[4]; int a[]={0,1,2,3}; int a1[3]; for (i = 0; i < 3; i++) { char * pfoo = &foo; char * pa = & foo1; *(pfoo+i) = pfoo[i]; *(pa+i) = a[i]; } Its a contrived way of copying foo into foo1 and a into a1. You want *(pfoo+i) to be byte by byte since you are copying characters, but you want *(pa+i) to be word by word since its copying ints. In res_16 = (p_16 + 0x555u); p_16 is of type cyg_uint16 *, so you are adding 0x555 16bit words, ie 0xaaa. With res_16 = (cyg_uint16*)(u_16 + 0x555); u_16 is a plain cyg_uint16, so its not pointer arithmetic, its normal arithmetic which you then cast to a pointer afterwards. Andrew -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ECOS] Building from OS X 2003-11-10 20:34 ` Gary Thomas 2003-11-10 22:00 ` [ECOS] Deciphering ISO C (Chap 6.3.2.3 - Pointers) Philip Soeberg [not found] ` <E1AJK5Y-0004tk-00@londo.lunn.ch> @ 2003-11-11 0:27 ` Rib Rdb 2003-11-11 0:37 ` Gary Thomas 2 siblings, 1 reply; 9+ messages in thread From: Rib Rdb @ 2003-11-11 0:27 UTC (permalink / raw) To: Gary Thomas; +Cc: ecos-discuss What would be the proper way to build it. Configure complains about an unknown host type unless I lie and say --host=powerpc-apple-linux instead of powerpc-apple-darwin. Should I just configure as linux and then edit the generated makefiles? On Monday, November 10, 2003, at 12:34 PM, Gary Thomas wrote: > On Mon, 2003-11-10 at 13:28, Rib Rdb wrote: >> Since the configuration tool won't build on OS X, would it work to >> configure and build eCos on a windows machine, then copy the libraries >> and headers to a Mac OS X machine and do the development there with >> the >> appropriate cross compilers? Also, would the version of gcc, etc used >> on the Mac have to be the same as on the Windows computer? > > Or, just use 'ecosconfig' on your Mac! which surely will build. > > There's no reason you absolutely have to use the Config Tool. > > -- > Gary Thomas <gary@chez-thomas.org> > -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ECOS] Building from OS X 2003-11-11 0:27 ` [ECOS] Building from OS X Rib Rdb @ 2003-11-11 0:37 ` Gary Thomas 2003-11-11 0:49 ` Rib Rdb 0 siblings, 1 reply; 9+ messages in thread From: Gary Thomas @ 2003-11-11 0:37 UTC (permalink / raw) To: Rib Rdb; +Cc: ecos-discuss On Mon, 2003-11-10 at 17:26, Rib Rdb wrote: > What would be the proper way to build it. Configure complains about an > unknown host type unless I lie and say --host=powerpc-apple-linux > instead of powerpc-apple-darwin. > Should I just configure as linux and then edit the generated makefiles? > Do you even need to tell it the host? What happens if you just "configure"? > > On Monday, November 10, 2003, at 12:34 PM, Gary Thomas wrote: > > > On Mon, 2003-11-10 at 13:28, Rib Rdb wrote: > >> Since the configuration tool won't build on OS X, would it work to > >> configure and build eCos on a windows machine, then copy the libraries > >> and headers to a Mac OS X machine and do the development there with > >> the > >> appropriate cross compilers? Also, would the version of gcc, etc used > >> on the Mac have to be the same as on the Windows computer? > > > > Or, just use 'ecosconfig' on your Mac! which surely will build. > > > > There's no reason you absolutely have to use the Config Tool. -- Gary Thomas <gary@mlbassoc.com> MLB Associates -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ECOS] Building from OS X 2003-11-11 0:37 ` Gary Thomas @ 2003-11-11 0:49 ` Rib Rdb 2003-11-11 1:18 ` Rib Rdb 0 siblings, 1 reply; 9+ messages in thread From: Rib Rdb @ 2003-11-11 0:49 UTC (permalink / raw) To: Gary Thomas; +Cc: ecos-discuss If I don't specify one it says: checking host system type... configure: error: can not guess host type; you must specify one On Monday, November 10, 2003, at 04:37 PM, Gary Thomas wrote: > On Mon, 2003-11-10 at 17:26, Rib Rdb wrote: >> What would be the proper way to build it. Configure complains about >> an >> unknown host type unless I lie and say --host=powerpc-apple-linux >> instead of powerpc-apple-darwin. >> Should I just configure as linux and then edit the generated >> makefiles? >> > > Do you even need to tell it the host? What happens if you just > "configure"? > >> >> On Monday, November 10, 2003, at 12:34 PM, Gary Thomas wrote: >> >>> On Mon, 2003-11-10 at 13:28, Rib Rdb wrote: >>>> Since the configuration tool won't build on OS X, would it work to >>>> configure and build eCos on a windows machine, then copy the >>>> libraries >>>> and headers to a Mac OS X machine and do the development there with >>>> the >>>> appropriate cross compilers? Also, would the version of gcc, etc >>>> used >>>> on the Mac have to be the same as on the Windows computer? >>> >>> Or, just use 'ecosconfig' on your Mac! which surely will build. >>> >>> There's no reason you absolutely have to use the Config Tool. > > -- > Gary Thomas <gary@mlbassoc.com> > MLB Associates > -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [ECOS] Building from OS X 2003-11-11 0:49 ` Rib Rdb @ 2003-11-11 1:18 ` Rib Rdb 0 siblings, 0 replies; 9+ messages in thread From: Rib Rdb @ 2003-11-11 1:18 UTC (permalink / raw) To: ecos-discuss On Monday, November 10, 2003, at 04:49 PM, Rib Rdb wrote: > If I don't specify one it says: > checking host system type... configure: error: can not guess host > type; you must specify one I guess it helps to check out the host package. Now it seems to work despite the fact that configure doesn't recognize the system type. > > On Monday, November 10, 2003, at 04:37 PM, Gary Thomas wrote: > >> On Mon, 2003-11-10 at 17:26, Rib Rdb wrote: >>> What would be the proper way to build it. Configure complains about >>> an >>> unknown host type unless I lie and say --host=powerpc-apple-linux >>> instead of powerpc-apple-darwin. >>> Should I just configure as linux and then edit the generated >>> makefiles? >>> >> >> Do you even need to tell it the host? What happens if you just >> "configure"? >> >>> >>> On Monday, November 10, 2003, at 12:34 PM, Gary Thomas wrote: >>> >>>> On Mon, 2003-11-10 at 13:28, Rib Rdb wrote: >>>>> Since the configuration tool won't build on OS X, would it work to >>>>> configure and build eCos on a windows machine, then copy the >>>>> libraries >>>>> and headers to a Mac OS X machine and do the development there with >>>>> the >>>>> appropriate cross compilers? Also, would the version of gcc, etc >>>>> used >>>>> on the Mac have to be the same as on the Windows computer? >>>> >>>> Or, just use 'ecosconfig' on your Mac! which surely will build. >>>> >>>> There's no reason you absolutely have to use the Config Tool. >> >> -- >> Gary Thomas <gary@mlbassoc.com> >> MLB Associates >> > -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
* [ECOS] Re: Building from OS X 2003-11-10 20:28 [ECOS] Building from OS X Rib Rdb 2003-11-10 20:34 ` Gary Thomas @ 2003-11-13 9:37 ` John Dallaway 1 sibling, 0 replies; 9+ messages in thread From: John Dallaway @ 2003-11-13 9:37 UTC (permalink / raw) To: Rib Rdb; +Cc: ecos-discuss Rib Rdb wrote: > Since the configuration tool won't build on OS X, would it work to > configure and build eCos on a windows machine, then copy the libraries > and headers to a Mac OS X machine and do the development there with the > appropriate cross compilers? Also, would the version of gcc, etc used > on the Mac have to be the same as on the Windows computer? Although wxWindows is a cross-platform toolkit, it is very unlikely that the eCos Configuration Tool would "just work" on an OS X box. There are a number of places in the source code where this tool needs to accommodate OS features apart from the user interface. John Dallaway eCosCentric Limited -- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-11-13 9:37 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-11-10 20:28 [ECOS] Building from OS X Rib Rdb 2003-11-10 20:34 ` Gary Thomas 2003-11-10 22:00 ` [ECOS] Deciphering ISO C (Chap 6.3.2.3 - Pointers) Philip Soeberg [not found] ` <E1AJK5Y-0004tk-00@londo.lunn.ch> 2003-11-10 22:16 ` Andrew Lunn 2003-11-11 0:27 ` [ECOS] Building from OS X Rib Rdb 2003-11-11 0:37 ` Gary Thomas 2003-11-11 0:49 ` Rib Rdb 2003-11-11 1:18 ` Rib Rdb 2003-11-13 9:37 ` [ECOS] " John Dallaway
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).