Welcome, Guest. Please login or register.

Author Topic: Best C compiler for Amiga?  (Read 20159 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline neofreeTopic starter

  • Sr. Member
  • ****
  • Join Date: Dec 2002
  • Posts: 467
    • Show only replies by neofree
Re: Best C compiler for Amiga?
« Reply #29 from previous page: August 20, 2010, 01:22:55 AM »
Thanks for all your comments!  

I want to try a lower end compiler first..  Coding on the A500 might be counterproductive but I want to try it first.  If I feel the need to use WinUAE or Windows I'll look at some better options.

Does anyone know where I can get Lattice or SAS/C cheap? Or is it freeware now?

Thanks,

Neofree
 

Offline NovaCoder

Re: Best C compiler for Amiga?
« Reply #30 on: August 20, 2010, 02:19:13 AM »
SAS/C is freeware....you can get it over from the EAB file server (I think).

- note I just got Eclipse CDT working with gcc and Cygwin (only took me 3 days), now where's that cross compiler ;)
Life begins at 100 MIPS!


Nice Ports on AmiNet!
 

Offline ferrellsl

Re: Best C compiler for Amiga?
« Reply #31 on: August 20, 2010, 03:26:57 AM »
You can get SAS version 6 here:  http://www.pictureinthesky.net/appinfo.php?id=65

You can get all the updates and patches here:  http://aminet.net/search?f=2&path=biz/patch&start=200
 

Offline Steady

Re: Best C compiler for Amiga?
« Reply #32 on: August 20, 2010, 03:29:20 AM »
I use SAS/C 6.5x under CubicIDE on AmigaOS 4.1 for compiling classic stuff and find SAS/C the best of what's available. I also set up a 3.1 debug environment on eUAE for the debugging part if various printf()'s aren't enough. I have the complete SAS package plus books, so that helps. The IDE with SAS is OK but really dated now in my opinion. It is fine if you actually develop on the classic too, though.

If you are using the classic hardware to compile, you are much better off with a hard drive at least. It is a nightmare otherwise and SLOWWWWW.
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Best C compiler for Amiga?
« Reply #33 on: August 20, 2010, 04:17:09 AM »
Quote from: Steady;575454
If you are using the classic hardware to compile, you are much better off with a hard drive at least. It is a nightmare otherwise and SLOWWWWW.
I agree.  A bare minimum of 4 MB Fast ram + a Hard drive is needed else the compile process goes 10x to 100x slower than it could.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline slayer

  • Full Member
  • ***
  • Join Date: May 2009
  • Posts: 188
    • Show only replies by slayer
Re: Best C compiler for Amiga?
« Reply #34 on: August 20, 2010, 05:50:17 AM »
I created a Harddrive installation of SASC v6.58 many moons ago because so many people at the time seemed to have a lot of trouble installing the patches.

I attached the necessary assignments to the end of one of the readme files in the root directory

So cut and paste that into your user-startup OR attach it to a Project Icon via IconX or what have you OR create a file could IWANTC place it in the C: directory protect it with the s flag and open a shell and type IWANTC prior to using SASC

Just remember, whatever you do, the assigns will need to be altered to paths logical with your set up...

Where to get it? I think there is a copy of it on one of the EAB servers or similair... I uploaded it as a lzx but it was converted to a zip file... HOW TYPICAL LOL
~Yes I am a Kiwi, No, I did not appear as an extra in \'Lord of the Rings\'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
 

Offline Heinz

  • Full Member
  • ***
  • Join Date: Nov 2005
  • Posts: 154
    • Show only replies by Heinz
    • http://amidevcpp.amiga-world.de
Re: Best C compiler for Amiga?
« Reply #35 on: August 20, 2010, 08:16:20 AM »
Quote from: NovaCoder;575374
[ You must login or register to view this Off-Topic! ]


I tried Eclipse and realised that I am not compatible to the way it works, So no I really dont wont to use that. I thought about Code:Blocks.
 

Offline Golem!dk

  • Sr. Member
  • ****
  • Join Date: Dec 2002
  • Posts: 414
    • Show only replies by Golem!dk
    • http://www.google.com/
Re: Best C compiler for Amiga?
« Reply #36 on: August 20, 2010, 10:46:42 AM »
Quote from: NovaCoder;575448
SAS/C is freeware.


Since when?
~
 

Offline nicholas.jj.taylor

  • Newbie
  • *
  • Join Date: Dec 2010
  • Posts: 4
    • Show only replies by nicholas.jj.taylor
Re: Best C compiler for Amiga?
« Reply #37 on: November 02, 2013, 11:00:08 AM »
Quote from: Heinz;575360
I often see people posting that AmiDevCpp is buggy, but I dont get much bug reports from the people that are actually using it (DaveAE / AudioEvolution, Jahc / WookieChat etc.)

So would you please post proper bug reports or stop calling it buggy ?

It's fair enough to discuss any issues that you have with a program, but no need for rudeness.

When choosing an IDE, I would probably go for HiSoft C, because I have such a fondness for DevPac's IDE. I imagine that they're similar

I recently purchased the Amiga OS3.5 Developer CD V2.1 which contains Haage&Partner's Storm C.

I'm looking forward to trying that out.
« Last Edit: November 02, 2013, 11:03:39 AM by nicholas.jj.taylor »
 

Offline Ezrec

  • Jr. Member
  • **
  • Join Date: Aug 2010
  • Posts: 58
    • Show only replies by Ezrec
    • http://www.evillabs.net
Re: Best C compiler for Amiga?
« Reply #38 on: November 02, 2013, 12:58:41 PM »
.. and just to complete this thread, I do all my Amiga 3.x development using the AROS cross-compilation SDK under Linux, using a GDB stub + serial port combination to debug my apps/drivers on both real hardware and E-UAE.

(I'm heavily mentally invested in the bash+vi+make+gdb development model..)
 

Offline EDanaII

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show only replies by EDanaII
    • http://www.EdwardGDanaII.info
Re: Best C compiler for Amiga?
« Reply #39 on: November 02, 2013, 02:03:13 PM »
Ezerec?

Can you write up how you (or point somewhere that describes how to) use GDB to debug? I'd love to give it a try. I use Eclipse's CDT which uses GCC, so, in theory I should be able to use GDB similarly...

Just a request. :)
Ed.
 

Offline Ezrec

  • Jr. Member
  • **
  • Join Date: Aug 2010
  • Posts: 58
    • Show only replies by Ezrec
    • http://www.evillabs.net
Re: Best C compiler for Amiga?
« Reply #40 on: November 02, 2013, 04:05:05 PM »
Quote from: EDanaII;751667
Ezerec?

Can you write up how you (or point somewhere that describes how to) use GDB to debug? I'd love to give it a try. I use Eclipse's CDT which uses GCC, so, in theory I should be able to use GDB similarly...

Just a request. :)


Well, the two key parts are C:GDBStub (sources in AROS/arch/m68k-amiga/c/gdbstub.c), which causes a serial port based GDB stub to activate on a trap, and the m68k-aros-gdb from the AROS m68k SDK on Linux.

To debug, I compile a driver/app first as an ELF binary, then use the AROS elf2hunk utility to convert it to AmigaOS 3.1 compatible hunk style.

Also, I modify my driver/app to have a 'asm volatile ("trap #1")' as the first thing to do in my main() (or equivalent).

I copy the HUNK version to AmigaOS 3.1, then RUN C:GDBStub before running my driver/app.

On the Linux side, I use:

$ m68k-aros-nm myapp.elf | grep main
-- this gets me the address of the main routine --
$ m68k-aros-objdump -h myapp.elf
-- this gets me the segment names and their HUNK load order.
$ m68k-aros-gdb
> target /dev/ttyS0 115200
> x /i $pc
-- This gets me the address of the 'trap #1', and allows me to figure out the offset 'text_offset' that the AmigaOS decided to load main() at)
> add-symbol-file myapp.elf 'text_offset'
-- Now I have the text of my program. If I don't need any .data or .bss debugging, I'm done here.
-- For app debugging, I do something like:
> set $segarray=((struct Process *)((*((struct ExecBase **)4))->ThisTask))->pr_SegList)<<2;
-- That's the address of my app's seglist array
> set $seglist=(($segarray+5*4)<<2)
-- And that's the seglist.
-- You can walk the seglist as per usual to discover the additional segment offsets, using the HUNK load order from 'objdump'
> add-symbol-file myapp.elf 'text_offset' -s .data 'data_offset' -s .rodata 'rodata_offset' ...


Of course, you could use SegTracker, or some other thing, to assist in this process.
 

Offline Leffmann

  • Full Member
  • ***
  • Join Date: Feb 2011
  • Posts: 119
    • Show only replies by Leffmann
Re: Best C compiler for Amiga?
« Reply #41 on: November 04, 2013, 01:06:29 AM »
Ezrec, can I ask what C and C++ standard libraries you are using?

I've built GCC 4.8.2 and the binutils for m68k-elf cross target, but from what I gather there was never an m68k-amigaos port of glibc, and I can't seem to find the last version of libstdc++ that still targeted m68k-amigaos, making my 4.8.2 build less useful. Any pointers?
 

Offline EDanaII

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show only replies by EDanaII
    • http://www.EdwardGDanaII.info
Re: Best C compiler for Amiga?
« Reply #42 on: November 07, 2013, 02:52:00 AM »
Thanks, Ezrec, I'll give it a shot if I can find the time. :)
Ed.
 

Offline alfredone

  • Newbie
  • *
  • Join Date: Jun 2016
  • Posts: 4
  • Country: it
  • Gender: Male
  • Only amigans make it possible!
    • Show only replies by alfredone
    • Project4A
Re: Best C compiler for Amiga?
« Reply #43 on: January 08, 2017, 08:12:41 AM »
Quote from: NovaCoder;575332
I couldn't really get on with AmiDev (too buggy), I'm currently trying to setup Eclipse CDT with gcc (cross-compiler), looking good (so far).!


You can try CodeBlock on Linux / Windows.

It's really easy to set a toolchain with CodeBlock.

This is my solution on Windows:
1) install AmiDev ( just to have amiga cross compilers installed on Windows)
2) configure CodeBlock in order to use the amiga cross compilers provided by AmiDev
 

Offline nicholas

Re: Best C compiler for Amiga?
« Reply #44 on: January 08, 2017, 02:09:33 PM »
The Atari guys have ported GCC 6.2 to 68k. :)

http://d-bug.mooo.com/beyondbrown/post/gcc-6/
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini