* GCC port @ 2013-11-20 18:22 eljedi . 2013-11-20 18:25 ` Jonathan Wakely 0 siblings, 1 reply; 10+ messages in thread From: eljedi . @ 2013-11-20 18:22 UTC (permalink / raw) To: gcc-help Hello, I want to know how to port gcc to a platform (learn purpose only). I've been reading some links: http://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_16.html#SEC169 But this are for 2.95. Does it still holds? is there any updated doc? or any link recomendation? As a playground I was thinking on port gcc to snes procedor (16bits WDL w65c816). Do you think is doable? (a decent port I mean, which generates good code) Thank you very much ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-20 18:22 GCC port eljedi . @ 2013-11-20 18:25 ` Jonathan Wakely 2013-11-20 19:17 ` eljedi . 0 siblings, 1 reply; 10+ messages in thread From: Jonathan Wakely @ 2013-11-20 18:25 UTC (permalink / raw) To: eljedi .; +Cc: gcc-help On 20 November 2013 18:14, eljedi . wrote: > Hello, > > I want to know how to port gcc to a platform (learn purpose only). > I've been reading some links: > http://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_16.html#SEC169 > > But this are for 2.95. Does it still holds? is there any updated doc? If you remove the part of the URL after "gcc-2.95.2" i.e. http://gcc.gnu.org/onlinedocs/ then you'll find that links to http://gcc.gnu.org/onlinedocs/gccint/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-20 18:25 ` Jonathan Wakely @ 2013-11-20 19:17 ` eljedi . 2013-11-20 19:47 ` Oleg Endo 0 siblings, 1 reply; 10+ messages in thread From: eljedi . @ 2013-11-20 19:17 UTC (permalink / raw) To: Jonathan Wakely; +Cc: gcc-help Thank you Jonathan for the quick reply. About the CPU I mentioned, do you think it can be done? (its a 16bits, and I read gcc works fine for 32bits processors with 32bits registers, more than one). On Wed, Nov 20, 2013 at 7:22 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote: > On 20 November 2013 18:14, eljedi . wrote: >> Hello, >> >> I want to know how to port gcc to a platform (learn purpose only). >> I've been reading some links: >> http://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_16.html#SEC169 >> >> But this are for 2.95. Does it still holds? is there any updated doc? > > If you remove the part of the URL after "gcc-2.95.2" i.e. > http://gcc.gnu.org/onlinedocs/ then you'll find that links to > http://gcc.gnu.org/onlinedocs/gccint/ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-20 19:17 ` eljedi . @ 2013-11-20 19:47 ` Oleg Endo 2013-11-21 8:39 ` eljedi . 0 siblings, 1 reply; 10+ messages in thread From: Oleg Endo @ 2013-11-20 19:47 UTC (permalink / raw) To: eljedi .; +Cc: Jonathan Wakely, gcc-help On Wed, 2013-11-20 at 19:25 +0100, eljedi . wrote: > Thank you Jonathan for the quick reply. > > About the CPU I mentioned, do you think it can be done? (its a 16bits, > and I read gcc works fine for 32bits processors with 32bits registers, > more than one). Yes, it can be done. For example, AVR is also < 32 bits and it works. Cheers, Oleg ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-20 19:47 ` Oleg Endo @ 2013-11-21 8:39 ` eljedi . 2013-11-21 10:56 ` David Brown 0 siblings, 1 reply; 10+ messages in thread From: eljedi . @ 2013-11-21 8:39 UTC (permalink / raw) To: Oleg Endo; +Cc: Jonathan Wakely, gcc-help Thank you guys for the answers. Now I have a lot to read and learn. On Wed, Nov 20, 2013 at 8:17 PM, Oleg Endo <oleg.endo@t-online.de> wrote: > On Wed, 2013-11-20 at 19:25 +0100, eljedi . wrote: >> Thank you Jonathan for the quick reply. >> >> About the CPU I mentioned, do you think it can be done? (its a 16bits, >> and I read gcc works fine for 32bits processors with 32bits registers, >> more than one). > > Yes, it can be done. > For example, AVR is also < 32 bits and it works. > > Cheers, > Oleg > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-21 8:39 ` eljedi . @ 2013-11-21 10:56 ` David Brown 2013-11-21 11:41 ` Brian Drummond 0 siblings, 1 reply; 10+ messages in thread From: David Brown @ 2013-11-21 10:56 UTC (permalink / raw) To: eljedi ., Oleg Endo; +Cc: Jonathan Wakely, gcc-help On 21/11/13 09:22, eljedi . wrote: > Thank you guys for the answers. > Now I have a lot to read and learn. > > > On Wed, Nov 20, 2013 at 8:17 PM, Oleg Endo <oleg.endo@t-online.de> wrote: >> On Wed, 2013-11-20 at 19:25 +0100, eljedi . wrote: >>> Thank you Jonathan for the quick reply. >>> >>> About the CPU I mentioned, do you think it can be done? (its a 16bits, >>> and I read gcc works fine for 32bits processors with 32bits registers, >>> more than one). >> >> Yes, it can be done. >> For example, AVR is also < 32 bits and it works. >> >> Cheers, >> Oleg >> > The AVR is in fact an 8-bit cpu - I think it is the only 8-bit target that is supported by gcc mainline. For a 16-bit cpu, look at the msp430 port. It has just recently been added to mainline - previously it was developed outside the main gcc tree. But being a new port, or at least a newly cleaned up port, it should be a good example to start with. Also note that before working on a gcc port, you should check that the device is supported by binutils - if not, that's where to start. Binutils support for a processor is a lot less work than gcc support, but it is an essential step - that's what gcc uses for assembling and linking. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-21 10:56 ` David Brown @ 2013-11-21 11:41 ` Brian Drummond 2013-11-21 13:15 ` David Brown 2013-11-21 17:51 ` Jeff Law 0 siblings, 2 replies; 10+ messages in thread From: Brian Drummond @ 2013-11-21 11:41 UTC (permalink / raw) To: gcc-help On Thu, 2013-11-21 at 11:23 +0100, David Brown wrote: > On 21/11/13 09:22, eljedi . wrote: > > Thank you guys for the answers. > > Now I have a lot to read and learn. > > > > > > On Wed, Nov 20, 2013 at 8:17 PM, Oleg Endo <oleg.endo@t-online.de> wrote: > >> On Wed, 2013-11-20 at 19:25 +0100, eljedi . wrote: > >>> Thank you Jonathan for the quick reply. > The AVR is in fact an 8-bit cpu - I think it is the only 8-bit target > that is supported by gcc mainline. > > For a 16-bit cpu, look at the msp430 port. It has just recently been > added to mainline - previously it was developed outside the main gcc > tree. But being a new port, or at least a newly cleaned up port, it > should be a good example to start with. Excellent news! Which release version includes (or will include) the MSP430? I would add that out-of-tree, it works well and supports Ada very nicely. Thanks, - Brian ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-21 11:41 ` Brian Drummond @ 2013-11-21 13:15 ` David Brown 2013-11-21 17:51 ` Jeff Law 1 sibling, 0 replies; 10+ messages in thread From: David Brown @ 2013-11-21 13:15 UTC (permalink / raw) To: gcc-help On 21/11/13 11:56, Brian Drummond wrote: > On Thu, 2013-11-21 at 11:23 +0100, David Brown wrote: >> On 21/11/13 09:22, eljedi . wrote: >>> Thank you guys for the answers. >>> Now I have a lot to read and learn. >>> >>> >>> On Wed, Nov 20, 2013 at 8:17 PM, Oleg Endo <oleg.endo@t-online.de> wrote: >>>> On Wed, 2013-11-20 at 19:25 +0100, eljedi . wrote: >>>>> Thank you Jonathan for the quick reply. > >> The AVR is in fact an 8-bit cpu - I think it is the only 8-bit target >> that is supported by gcc mainline. >> >> For a 16-bit cpu, look at the msp430 port. It has just recently been >> added to mainline - previously it was developed outside the main gcc >> tree. But being a new port, or at least a newly cleaned up port, it >> should be a good example to start with. > > Excellent news! Which release version includes (or will include) the > MSP430? The last I heard on the gcc development list was that DJ Delorie and Nick Clifton (both Redhat) are officially appointed as gcc maintainers for the port, and checked in support on 12/09/2013. I guess that means it will be released with gcc 4.9 - but it should be fine as an example for the OP's use. > > I would add that out-of-tree, it works well and supports Ada very > nicely. I don't know how much of the gcc port was changed when Red Hat took it over (with TI paying the bills) and moved it in-tree. Some of it had to be changed or re-written due to copyright issues. I know that a lot of the library and support code was re-done, and I think this is based on newlib-nano. First priority is obviously for C, followed by basic C++ (typically without exceptions, RTTI, and limited library support - but that's what embedded users generally want anyway). I can't say anything concrete about the state of Ada, but my guess is that the code generation will work but the library will be limited. > > Thanks, > - Brian > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-21 11:41 ` Brian Drummond 2013-11-21 13:15 ` David Brown @ 2013-11-21 17:51 ` Jeff Law 2013-11-22 11:52 ` David Brown 1 sibling, 1 reply; 10+ messages in thread From: Jeff Law @ 2013-11-21 17:51 UTC (permalink / raw) To: brian, gcc-help On 11/21/13 03:56, Brian Drummond wrote: > On Thu, 2013-11-21 at 11:23 +0100, David Brown wrote: >> On 21/11/13 09:22, eljedi . wrote: >>> Thank you guys for the answers. >>> Now I have a lot to read and learn. >>> >>> >>> On Wed, Nov 20, 2013 at 8:17 PM, Oleg Endo <oleg.endo@t-online.de> wrote: >>>> On Wed, 2013-11-20 at 19:25 +0100, eljedi . wrote: >>>>> Thank you Jonathan for the quick reply. > >> The AVR is in fact an 8-bit cpu - I think it is the only 8-bit target >> that is supported by gcc mainline. >> >> For a 16-bit cpu, look at the msp430 port. It has just recently been >> added to mainline - previously it was developed outside the main gcc >> tree. But being a new port, or at least a newly cleaned up port, it >> should be a good example to start with. > > Excellent news! Which release version includes (or will include) the > MSP430? Good grief, no. Not the msp430 which has odd sized pointers. If you're going to do a 16 bit port, do a pure one. Anything with PSImode should be avoided as a learning experience. For someone trying to learn, I'd stick with one of the simple 32bit embeded riscy processors. v850 for example. Jeff ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: GCC port 2013-11-21 17:51 ` Jeff Law @ 2013-11-22 11:52 ` David Brown 0 siblings, 0 replies; 10+ messages in thread From: David Brown @ 2013-11-22 11:52 UTC (permalink / raw) To: Jeff Law, brian, gcc-help On 21/11/13 17:02, Jeff Law wrote: > On 11/21/13 03:56, Brian Drummond wrote: >> On Thu, 2013-11-21 at 11:23 +0100, David Brown wrote: >>> On 21/11/13 09:22, eljedi . wrote: >>>> Thank you guys for the answers. >>>> Now I have a lot to read and learn. >>>> >>>> >>>> On Wed, Nov 20, 2013 at 8:17 PM, Oleg Endo <oleg.endo@t-online.de> >>>> wrote: >>>>> On Wed, 2013-11-20 at 19:25 +0100, eljedi . wrote: >>>>>> Thank you Jonathan for the quick reply. >> >>> The AVR is in fact an 8-bit cpu - I think it is the only 8-bit target >>> that is supported by gcc mainline. >>> >>> For a 16-bit cpu, look at the msp430 port. It has just recently been >>> added to mainline - previously it was developed outside the main gcc >>> tree. But being a new port, or at least a newly cleaned up port, it >>> should be a good example to start with. >> >> Excellent news! Which release version includes (or will include) the >> MSP430? > Good grief, no. Not the msp430 which has odd sized pointers. If you're > going to do a 16 bit port, do a pure one. Anything with PSImode should > be avoided as a learning experience. > > For someone trying to learn, I'd stick with one of the simple 32bit > embeded riscy processors. v850 for example. > The 20-bit pointers are only used for some msp430 devices, and even then only in "large" memory models. I haven't looked at the port code at all, but I am sure it will be possible to gloss over the 20-bit stuff when reading the code for learning purposes. Apart from the 20-bit support, the msp430 should be a pretty nice example as it has a mostly orthogonal ISA with 16 16-bit registers. And since it was updated and contributed to mainline recently by gcc experts, I expect it to be a good, modern gcc port. I have no idea about the v850, however - it may be more appropriate, despite being 32-bit rather than 16-bit. Almost certainly, it would be useful for the OP to look at more than one architecture anyway. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-11-21 20:13 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-11-20 18:22 GCC port eljedi . 2013-11-20 18:25 ` Jonathan Wakely 2013-11-20 19:17 ` eljedi . 2013-11-20 19:47 ` Oleg Endo 2013-11-21 8:39 ` eljedi . 2013-11-21 10:56 ` David Brown 2013-11-21 11:41 ` Brian Drummond 2013-11-21 13:15 ` David Brown 2013-11-21 17:51 ` Jeff Law 2013-11-22 11:52 ` David Brown
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).