6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 8:08 am

All times are UTC




Post new topic Reply to topic  [ 46 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jun 06, 2023 7:40 am 
Offline

Joined: Thu Dec 26, 2002 12:29 pm
Posts: 51
Location: Occitanie, France
Hi,
It would be nice to have a 65c02 cross-compiler that didn't have to be forced to run under wine on linux machines(*). Is anybody able to liase with the SDCC dev. group to provide feedback about the "peculiarities" of the 6502/65c02 instructions and architecture?*

I'd offer to help, but I'm very *VERY* rusty at the moment - I still develop more on PIC/ATMega microcontrollers than the 6502. The SBC that I built back in the 90's was not at all reliable, and I've since lost the schematics and the board (all went with the rusty Atom to the great museum in the sky...).
I naively (spelling ? sorry if it's wrong) thought that when I retired I'd have time to play : so far it's not the case.

Could we perhaps work together, for example I could run tests and interface with the dev group, if one or two of you that are able to provide the expertise on what could be added or improved could check over the final results of the tests.

(*) after having supported a factory with 600 Windows machines for decades, I vowed never to use uSoft again. I almost manage, I have an old Win95 laptop just for my 3D architecture suite. Everything else has been on linux for over 10yrs now.
Please provide f/b. Regards, Glenn from France.


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jun 06, 2023 9:46 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 745
Location: Germany
GlennSmith wrote:
Hi,
It would be nice to have a 65c02 cross-compiler that didn't have to be forced to run under wine on linux machinesce.

What about cc65? It runs natively on linux.


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jun 06, 2023 12:47 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
Proxy wrote:
GlennSmith wrote:
Hi,
It would be nice to have a 65c02 cross-compiler that didn't have to be forced to run under wine on linux machinesce.

What about cc65? It runs natively on linux.


Seconded for cc65 and the rest of the suite - I use the assembler on a near daily basis and while I've not used the C compiler for a while I'm looking at it again for some things in the near future.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jun 06, 2023 3:41 pm 
Offline

Joined: Thu Dec 26, 2002 12:29 pm
Posts: 51
Location: Occitanie, France
[quote="Proxy"][quote="GlennSmith"]Hi,
It would be nice to have a 65c02 cross-compiler that didn't have to be forced to run under wine on linux machinesce.[/quote]
What about cc65? It runs natively on linux.[/quote]

Well, some flavours of Linux... I'm a Mint user (over an Ubuntu core) - I'll have to see if I can MAKE something from the source repository.

I do have an old Win version that works, but it's a hassle to run under wine. I'll see what I can do.
Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jun 06, 2023 4:52 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 745
Location: Germany
now i'm a bit confused why you would need to build it yourself.
i thought mint is based on ubuntu, in which case you shouldn't you be able to just do "sudo apt install cc65" in a terminal and have it work? (or even get an IDE like VScode and install the cc65 plugin for it in the UI)

for the record i did try "sudo apt install cc65" on my WSL install of ubuntu and it does actually work without having to build it manually.


Last edited by Proxy on Tue Jun 06, 2023 8:37 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jun 06, 2023 5:52 pm 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 133
Location: Texas
I was able to get it compile just fine under Ubuntu under my WSL environment.

They provide binaries for Windows, Linux and Mac OS on their daily builds if you don't want to build yourself:

https://sdcc.sourceforge.net/snap.php


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jun 06, 2023 9:25 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
GlennSmith wrote:
Hi,
It would be nice to have a 65c02 cross-compiler that didn't have to be forced to run under wine on linux machinesce.

What about cc65? It runs natively on linux.[/quote]

Well, some flavours of Linux... I'm a Mint user (over an Ubuntu core) - I'll have to see if I can MAKE something from the source repository.

I do have an old Win version that works, but it's a hassle to run under wine. I'll see what I can do.
Thanks[/quote]

It's a standard package under Debian and Devuan (which is what I mostly use now), so no reason to think it's not there for other flavours.

However I compiled it from scratch for myself as it's the only way to add a new system into it. I don't recall any issues there. It's nothing special, no GUI, no fancy networking or other stuff needed. It's just another C program...

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Wed Jun 07, 2023 7:22 am 
Offline

Joined: Thu Dec 26, 2002 12:29 pm
Posts: 51
Location: Occitanie, France
Hi,
Yes, I downloaded the sources and i compiled for Ubuntu without any problems. Thanks for the reminder about cc65.
Glenn


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Wed Jun 07, 2023 8:18 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
GlennSmith wrote:
Hi,
Yes, I downloaded the sources and i compiled for Ubuntu without any problems. Thanks for the reminder about cc65.
Glenn


Glad you're sorted.

I think it's good that there is a choice of C compilers now (and I used sdcc for a PIC project some years back too but never really thought of it for the 6502).

VBCC runs under Linux too:

http://www.compilers.de/vbcc.html

but I've not tried to use it - mostly because cc65 fits all my needs.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Sun Jan 21, 2024 8:52 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 660
Location: Potsdam, DE
I was just reminded of SDCC and had a quick look for updates: they're now up to 4.4 and include generation for both (either of) 6502 and 65C02.

I haven't played with it yet to find out whether the previous issues I noted - particularly with interrupt vectors - have been addressed, but it looks possible.

Neil


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Mon Jan 22, 2024 12:47 am 
Offline

Joined: Mon May 01, 2017 7:13 am
Posts: 82
GlennSmith wrote:
Hi,
It would be nice to have a 65c02 cross-compiler that didn't have to be forced to run under wine on linux machines(*).


Linux is a first-class host for llvm-mos, and it supports 65c02 natively.


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Mon Jan 22, 2024 8:08 am 
Offline

Joined: Thu Dec 26, 2002 12:29 pm
Posts: 51
Location: Occitanie, France
Quote:
Linux is a first-class host for llvm-mos, and it supports 65c02 natively.

Wow! (or Gosh! or somesuch) : it looks a bit frightening at first... As I haven't yet created the customization files for my setup in cc65 , I'll try and do a comparison between the two environments. The big + for cc65 is that there are many of you out there using it regularly.
Thanks, in any case.

_________________
Glenn-in-France


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Mon Jan 22, 2024 8:34 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1398
Location: Scotland
GlennSmith wrote:
Quote:
Linux is a first-class host for llvm-mos, and it supports 65c02 natively.

Wow! (or Gosh! or somesuch) : it looks a bit frightening at first... As I haven't yet created the customization files for my setup in cc65 , I'll try and do a comparison between the two environments. The big + for cc65 is that there are many of you out there using it regularly.
Thanks, in any case.


Which is a bit of a downer for the LLVM system and those who have made it happen, however unless you're already an LLVM / Clang user, then the "getting into it" may well feel somewhat daunting.

I'm sticking to cc65 for now.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jan 23, 2024 12:26 am 
Offline

Joined: Mon May 01, 2017 7:13 am
Posts: 82
drogon wrote:
GlennSmith wrote:
Quote:
Linux is a first-class host for llvm-mos, and it supports 65c02 natively.

Wow! (or Gosh! or somesuch) : it looks a bit frightening at first... As I haven't yet created the customization files for my setup in cc65 , I'll try and do a comparison between the two environments. The big + for cc65 is that there are many of you out there using it regularly.
Thanks, in any case.


Which is a bit of a downer for the LLVM system and those who have made it happen, however unless you're already an LLVM / Clang user, then the "getting into it" may well feel somewhat daunting.

I'm sticking to cc65 for now.

-Gordon


Yep, gravity is a thing. cc65 definitely has a much larger installed base. Most of the people using llvm-mos right now are either cycle counters, or people who need strict C compliance. Anyway, as the home page points out, the compiler is on Godbolt, so you can play with it without installing anything. https://godbolt.org/z/T5r1xPYG9


Top
 Profile  
Reply with quote  
 Post subject: Re: SDCC for 6502
PostPosted: Tue Jan 23, 2024 8:33 am 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 133
Location: Texas
johnwbyrd wrote:
Yep, gravity is a thing. cc65 definitely has a much larger installed base. Most of the people using llvm-mos right now are either cycle counters, or people who need strict C compliance. Anyway, as the home page points out, the compiler is on Godbolt, so you can play with it without installing anything. https://godbolt.org/z/T5r1xPYG9


Wait, there's an LLVM back end that will spit out 6502 assembly? o_O


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 35 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: