EASy68K  
It is currently Sat Aug 24, 2019 7:54 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Apr 09, 2019 5:54 pm 
Offline

Joined: Tue Mar 06, 2018 6:39 am
Posts: 4
Last year I built a simple 68k single board computer with a serial interface and wrote a simple monitor program for it using assembly in Easy68k. It has 512k each of RAM and ROM.

I'd like to be able to compile C for it, so I've been doing some reading online and I was able to build GCC as a cross-compiler for m68k-elf.

So, theoretically I can now compile C for the 68k, but I'll probably need to use some of my assembly routines for things like serial I/O and initializing the UART, right? stdio.h is going to be useless here. What's the best way to go about this?

I thought I could take some of the assembly I wrote in Easy68k and use the GNU assembler to produce object code that I'd be able to link alongside C-generated object files, but the GNU assembler has some major issues with my code. Any of the EQU lines at the start it takes issue with. Any instruction that has a label is considered invalid. And most of my inline comments cause problems, too.

Is it probably just a syntax issue, or would it be better for me approach this differently? I looks like maybe it's also possible to issue assembly instructions directly from inside a C program; is that a better idea? I've also read a little online about "newlib" which seems like it might be helpful, but I just thought I'd ask here to see if anyone could point me in the right direction.

Thanks for any insight you are able to share.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 96 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:  
cron
Powered by phpBB® Forum Software © phpBB Group