FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-01-2004, 03:07 PM
Paul
Guest
 
Posts: n/a
Default OS-less first executable how to? Please help!

Hi

Someone must know how to do this. Please please help.
I'm testing a new cpu. The CPU fetches PC from 0x00000000 and SP from
0x00000004 upon reset. How to I link a small crt0.s and any ELF a.out
to test the cpu?
(It's a simple program only testing IO.)

void test_fun(int* x) {
int i;for (i=0;i<0x100000;i++) x[i]=i;
}
void main(){
int* x=0x100000;
while (1) test_fun(x);
}

I only have vauge idea that the crt0.s should look like this: (I could
be wrong.)
..section .text
..long _main
..long 0x2000 // SP

And .text needs to be at 0x00000000 (or at least , the first 8 bytes
need to be PC and SP)

How do I link and assemble files?
Please please help.

(I can write a small program for generating BRAM verilog file myself.
I will simply mapped the file starting 0x00000000.)

Can I use gcc -T ? can someone give a simple example. Please help!

Thanks
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OS-less first executable how ? Paul Verilog 0 02-01-2004 03:10 PM


All times are GMT +1. The time now is 02:51 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved