Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unknown Opcode '.pword'

Tags:

c

gcc

arm

opcode

pic

When I compile my code I am getting a unknown Opcode '.pword' error. The only line of code in my project that has .pword is:

do {
    __asm__ volatile (" .pword 0xDA4000");
    Nop();
} while(0)

Commenting the line out does nothing.

I searched .pword 0xDA4000 and know it is supported by the IDE MPLab for PICs.

In my case the IDE I am using is CrossStudio for a STMf32f2xx chip.

I have the updated CrossStudio which comes with binutils 2.21 and gcc 4.6.0

I initially had a problem with compiling unnamed structs and unions but adding -fms-extensions into additional C compiler options fixed it.

I dont know if I need to do something similar to fix Opcode '.pword' error.

could it just be that .pword is only a PIC opcode?

like image 946
microb Avatar asked Jul 19 '26 03:07

microb


1 Answers

In MPLAB ASM30 assembler the .pword declare 24 bit constant in code memory. It can be also any MPLAB ASM30 instruction.

Check: MPLAB ASM30 assembler

like image 194
GJ. Avatar answered Jul 21 '26 22:07

GJ.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!