AnsweredAssumed Answered

P2020DS assembly error

Question asked by Pierre-Antoine Minichetti on Feb 6, 2014
Latest reply on Feb 20, 2014 by Pierre-Antoine Minichetti

Hi,

 

In my P2020 project i'm using assembly code the same way I was using it on a P5020 board.

The problem is that i'm getting these kind of errors.

 

"expected a inline assembler directive"

 

for this exemple in a .c file:

 

__asm__ __volatile__( "instruction ;"

                                   : [outputs]

                                   : [inputs]

                                   : [clobered list] };

 

and

 

"Instructions must occur within code section"

 

for this exemple in a .asm file :

 

.global myFunction

myFunction:

 

    lis 3, 0x0001

    ori 3, 3, 0x0001

    mtspr 1010, 3

 

    blr

 

If any one can help resolving these errors, it would be very nice.

 

Thanks.

Outcomes