6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 5:19 pm

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Jul 30, 2016 11:29 am 
Offline

Joined: Wed Mar 02, 2016 12:00 pm
Posts: 343
I found the source code repositry here, but there was no link to it under the "compilers and languages section". Is anyone here using it?


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 31, 2016 3:19 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
It does seem to be in active development, or at least maintenance - if anyone can say that it's in a working condition I think it would be good to include it in the reference section here.

Edit: note repo is now here:
https://github.com/itszor/gcc-6502
https://github.com/itszor/gcc-6502-bits
Maybe you need this branch
https://github.com/itszor/gcc-6502/tree/m65x-gcc8
or maybe this older one
https://github.com/itszor/gcc-6502/tree/m65x-gcc6-virt

Edit: see also previously
viewtopic.php?f=2&t=2937


Last edited by BigEd on Thu Jun 04, 2020 6:31 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 01, 2016 12:01 pm 
Offline

Joined: Wed Mar 02, 2016 12:00 pm
Posts: 343
I found install instructions here, so it looks like its working.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 01, 2016 3:13 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
I think that's just a mirror... but I do see there's a small 6502 simulator inside the project, which makes it even more interesting!


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 01, 2016 4:59 pm 
Offline

Joined: Wed Oct 06, 2010 9:05 am
Posts: 95
Location: Palma, Spain
The CRTC demo group use it in their BBC demos, e.g. this one.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 01, 2016 5:16 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Ah, thanks, that's the vote of confidence we need! Added the link to Compilers and Languages.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 02, 2016 11:36 am 
Offline

Joined: Sat Mar 27, 2010 7:50 pm
Posts: 149
Location: Chexbres, VD, Switzerland
Wh wh wh .... WHAAAAT ?!?

I tough GCC was not portable to 8-bit systems for technical reasons. I will have to check this out, even if it is in a buggy/alpha stage. On which version of GCC is is based on ? They changed from 4.9 in last year to 6.something this year, and a lot of major changes were made to the project, but I didn't find time to investigate them yet.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 02, 2016 11:45 am 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Seems to be 6.0.0 (which is a pleasant surprise - I might have thought it would be ancient)


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 02, 2016 3:38 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
A bit of a struggle, but I've managed to build it!
Quote:
6502-gcc (GCC) 6.0.0 20150516 (experimental)

That's on ubuntu 14.04, 64bit version for x86.

And helloworld.c
Code:
/* Hello World program */
/* from http://groups.engin.umd.umich.edu/CIS/course.des/cis400/c/hworld.html */

#include<stdio.h>

main()
{
    printf("Hello World\n");
}
runs as advertised:
Code:
$ semi65x/semi65x -l 0x200 /tmp/helloworld
Hello World


(Edit: extra steps needed were as follows
- installing flex and cc65
- putting cc65 on the path and also editing the path in a wrapper script
- changing the build script to note ar65's location
- changing the build script to allow multiple builds without a clean start, as I needed to run multiple makes for some reason
)


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 03, 2016 7:32 pm 
Offline

Joined: Sat Mar 27, 2010 7:50 pm
Posts: 149
Location: Chexbres, VD, Switzerland
Ok, so I'm downloading it right now, but it's HUUGE (1gb). Also I am worried by the complete lack of any instructions or doccumentaiton whatsoever, and I do not recognize the traditional gcc folders. Where are binutils, cpp, etc... ? Or maybe it just changed a lot since gcc 4.8, last time I compiled it myself.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 03, 2016 7:36 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Be sure to get the auxiliary project too. I got this one as a git clone, but gave up with git cloning the main project, as it was quicker to get the zip file.
https://github.com/puppeh/gcc-6502-bits
https://github.com/puppeh/gcc-6502

The instructions are in the auxiliary project.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 03, 2016 11:37 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
What clib is the GCC tool chain linking too?


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 04, 2016 5:09 am 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
I think this one, in the auxiliary project:
https://github.com/puppeh/gcc-6502-bits ... r/libtinyc


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 04, 2016 12:49 pm 
Offline

Joined: Sat Mar 27, 2010 7:50 pm
Posts: 149
Location: Chexbres, VD, Switzerland
So, you are required to have CC65 in order to compile it. How does this make any sense at all ?


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 04, 2016 3:56 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
I don't know exactly what cc65 is used for in the build, but I don't think it's too unexpected. It might be that with some juggling the newly built gcc could be used for whatever it is, but I can vaguely imagine there might be some chicken and egg difficulty. It's already a two-stage bootstrap.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: