2008-07-15 07:58:22     assembler messages

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-07-15 07:58:22     assembler messages

Pranay Upadhyay (INDIA)

Message: 58847   

 

Hello sir,

 

  For generating the elf file for audio codec IN BF 561 I am using the assembly functiooon  which control the ISR. But after compiling the code I am getting error that..

 

    [root@PranayU audiocodec]# make

    bfin-elf-gcc -c -mcpu=bf561 -g codec.c -o codec.o

/tmp/ccLCJh2G.s: Assembler messages:

/tmp/ccLCJh2G.s:194: Error: parse error. Input text was LO.

/tmp/ccLCJh2G.s:194: Error:

/tmp/ccLCJh2G.s:194: Error: parse error. Input text was HI.

/tmp/ccLCJh2G.s:194: Error:

make: *** [codec.o] Error 1

 

Actually I have read about all these thing from search document I am not gettting any help.Please reply.

 

-Thanks&Regards

 

Pranay

 

QuoteReplyEditDelete

 

 

2008-07-15 10:26:15     Re: assembler messages

Mike Frysinger (UNITED STATES)

Message: 58852   

 

your inline assembly code is not valid Blackfin assembler

 

most likely you're attempting to use the HI/LO macros inside of inline assembly which clearly wont work ... the inline assembly is pasted directly into the .s file and thus not preprocessed on its own.

QuoteReplyEditDelete

 

 

2008-07-16 00:02:42     Re: assembler messages

Pranay Upadhyay (INDIA)

Message: 58895   

 

Hello sir,

 

  Can you send me the document  that explain how can we use the blackfin register in linux code for generating the elf file.For    compiling I am using the "bfin-elf-gcc -c -mcpu=bf561 -g codec.c -o codec.o".I have read the some document and I am using the following code in inline function.

 

asm( " 0.l(EVT9) = %P0.L "

         " 0.h(EVT9)=  %P0.H "

         " _Sport0_RX_ISR = 0.l "

        " _Sport0_RX_ISR =%0.h "

        "( %P0 ) = 0.l");

 

And the actual assembly code is ..

 

/ Remap the vector table pointer from the default __I9HANDLER

    // to the new _SPORT0_RX_ISR interrupt service routine

    P0.L = LO(EVT9);

    P0.H = HI(EVT9);

    R0.l = _SPORT0_RX_ISR;

    R0.h = _SPORT0_RX_ISR;

    [ P0 ] = R0;

 

-Regards

 

Pranay

 

QuoteReplyEditDelete

 

 

2008-07-16 00:11:27     Re: assembler messages

Mike Frysinger (UNITED STATES)

Message: 58896   

 

why are you writing that in inline assembly ?  just write it in C.

QuoteReplyEditDelete

 

 

2008-07-16 03:15:37     Re: assembler messages

Pranay Upadhyay (INDIA)

Message: 58902   

 

Hello sir,

 

  For writting in C I use the one function "register_handler (ik_ivg9, Sport0_RX_ISR);" for giving the interrupt for Sport0_RX_ISR function through the ivg9 .From Sport0_RX_ISR function i am just checking the DMA status and transferring the data from recieve buffer to the transmit buffer.I am getting error that   undefined reference to the register_handler.Please give me some idea regarding this.For generating elf how can we handle the interrupt?

 

-Regards

 

Pranay

QuoteReplyEditDelete

 

 

2008-07-16 04:12:35     Re: assembler messages

Mike Frysinger (UNITED STATES)

Message: 58904   

 

then implement the register_handler() function.  if you want to use assembly, write it in assembly.  the code you wrote though looks like you could trivially write it in C.

 

QuoteReplyEditDelete

 

 

2008-07-16 05:16:45     Re: assembler messages

Pranay Upadhyay (INDIA)

Message: 58932   

 

Hello sir,

 

  I have not written the assembly code for the linux.So I am getting the problem.Can you send me some document for this.

 

  Please tell how can convert the this asm cod efor linux.

 

// Remap the vector table pointer from the default __I9HANDLER

    // to the new _SPORT0_RX_ISR interrupt service routine

    P0.L = LO(EVT9);

    P0.H = HI(EVT9);

    R0.l = _SPORT0_RX_ISR;

    R0.h = _SPORT0_RX_ISR;

    [ P0 ] = R0;

 

-Regards

 

Pranay

QuoteReplyEditDelete

 

 

2008-07-16 06:58:57     Re: assembler messages

Mike Frysinger (UNITED STATES)

Message: 58940   

 

the wiki contains documents for transitioning VDSP code to GCC:

http://docs.blackfin.uclinux.org/doku.php?id=visualdsp:faq

 

it doesnt go over converting assembly code to C though ...

QuoteReplyEditDelete

 

 

2008-07-16 10:26:54     Re: assembler messages

Pranay Upadhyay (INDIA)

Message: 58957   

 

Hello sir,

 

  Thanks for giving support. In that document not saying that how can we use the interrupt for the generrating elf file in linux.How can we use the interrupt for generating elf file? The code is written in C. Can we use the interrupt handler which is use in the  wait.h and interrupt.h file.

 

-Thanks & Regards

 

Pranay

QuoteReplyEditDelete

 

 

2008-07-16 21:35:07     Re: assembler messages

Mike Frysinger (UNITED STATES)

Message: 58981   

 

if you want to know how to write an interrupt handler to work in kernel space, read a kernel book

 

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:interrupts

Attachments

    Outcomes