Take the 2-minute tour ×

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");
} 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?

share|improve this question
As you run into further pic specific issues Electronics.Stackexchange.com has quite a few questions and quite a few experts. Just an aside if we can be of help. –  Kortuk Oct 20 '11 at 21:08
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
Ok, so it sounds that .pword is a unique opcode specific to the MPLAB assembler. –  microb Oct 20 '11 at 17:35
@microb: No, .pword` isn't opcode. The meaning of .pword (it is a constant type) is 24 bit constant declaration in code memory and that constant can be opcode. –  GJ. Oct 20 '11 at 17:39
oh, like a int float word etc –  microb Oct 20 '11 at 17:42
@microb: or even function call. :) –  GJ. Oct 20 '11 at 17:43
still unsure why im getting compiler issues. I'm cant find anything other then the code above that has pword. –  microb Oct 20 '11 at 18:02
show 2 more comments

Your Answer


