cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Visitor
Visitor
3,305 Views
Registered: ‎07-28-2010

how to compile and execute xbmd.c...

Hi,

    I am new to this field. I am trying to compile and execute the xbmd.c file.

 

For eg: (Here Open function)

 

int XPCIe_Open(struct inode *inode, struct file *filp)
{
  printk(KERN_INFO"%s: Open: module opened\n",gDrvrName);
  return SUCCESS;
}

 

After compilation the message should appear on the output window. Like the ordinray compilation as gcc-o xbmd xbmd.c and execution as ./xbmd. How to acheive this?

 

Note:

           xbmd.ko file gets generated and file listed in the Makefile also.

 

Reg,

Subbu

 

 

0 Kudos
Reply
2 Replies
Xilinx Employee
Xilinx Employee
3,299 Views
Registered: ‎09-10-2008

You don't give many details here.

 

Are you trying to run this under Linux on MicroBlaze or Powerpc?

 

You need to cross compile applications as you're not running on an X86 box if so.

 

Cross compiling means using a compiler that runs on a host and compiles code for another machine, like MicroBlaze or PowerPC.

 

I'm not sure even where to guide you to yet as your a long ways from doing embedded work.  You should probably get some good embedded books for Linux 1st as it's hard to google your way from zero.

 

Thanks.

0 Kudos
Reply
Visitor
Visitor
3,283 Views
Registered: ‎07-28-2010

Thanks for your reply.

0 Kudos
Reply