typedef causes unrecognized opcode

Hi, I would prefere to define some individual types in <myproject>FreeRTOSConfig.h, like #define BYTE unsigned char   // works but I’d prefere typedef unsigned char TBYTE; But this causes a curious error: unrecognized opcode `typedef unsigned char TBYTE’ Any suggestions? ralf

typedef causes unrecognized opcode

>Any suggestions? Without knowing which compiler or target you are using – no.  Although at a guess I would say TBYTE was already defined to something else.

typedef causes unrecognized opcode

I use  gcc version 3.4.4   Microchip MPLAB C Compiler for PIC32 MCUs v1.04-20080908 "TBYTE" is always the second choice, "BYTE" was the first choice. I just did a third try with :  typedef unsigned char  T_MY_BYTE; same error… Somewhere in the www I found a connection to assembler (.S) files. not satisfying…

typedef causes unrecognized opcode

>But this causes a curious error: unrecognized opcode `typedef unsigned char TBYTE’ Do you get a file name and line number for this error?

typedef causes unrecognized opcode

I just took the the original v.5.0.3-demo (just used for my other problem) and inserted the line in FreeRTOSConfig.h … #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H #include <p32xxxx.h> typedef unsigned char BYTE; //…. compiling …. -> Executing: "C:ProgrammeMicrochipMPLAB C32binpic32-gcc.exe" -mprocessor=32MX460F512L -c -MMD -MF"outport_asm.d" -I"." -I"." -I"..commoninclude" -I"..\..sourceportablemplabpic32mx" -I"..\..sourceinclude" -D__DEBUG "..\..SourceportableMPLABPIC32MXport_asm.S" -o"outport_asm.o" -I"..\..SourceportableMPLABPIC32MX" -I"." -Wa,–defsym=__DEBUG=1,–keep-locals,–gdwarf-2 ./FreeRTOSConfig.h: Assembler messages: ./FreeRTOSConfig.h:55: Error: unrecognized opcode `typedef unsigned char BYTE’ Halting build on first failure as requested. - --> Assembler messages ??? !!! Yeah, the FreeRTOSConfig.h seems to be lastly included in port_asm.S and there the typedef construction can not be resolved. Any suggestions for a good place to place projects more or less individual typedef’s ? ralf

typedef causes unrecognized opcode

Oh yea, I see configMAX_SYSCALL_INTERRUPT_PRIORITY is used in the asm file.  That would explain it then. You could change the asm file so it does not need the header, or alternatively you could add your definitions to SourceportableMPLABPIC32MXportmacro.h

typedef causes unrecognized opcode

I do not like to modify files in the source folder. Future trouble (version conflicts) is preassigned. So I thought, FreeRTOSConfig.h (in the projects main folder) is the best place :/ But I’m so free and make my own general header. But thanks for the communication. Lately we found the cause, that I was looking for. ralf