FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [January 2009 Threads] typedef causes unrecognized opcodePosted by Ralf Anders on January 18, 2009 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
RE: typedef causes unrecognized opcodePosted by MEdwards on January 18, 2009 >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.
RE: typedef causes unrecognized opcodePosted by Ralf Anders on January 18, 2009 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...
RE: typedef causes unrecognized opcodePosted by MEdwards on January 18, 2009 >But this causes a curious error: unrecognized opcode `typedef unsigned char TBYTE'
Do you get a file name and line number for this error?
RE: typedef causes unrecognized opcodePosted by Ralf Anders on January 18, 2009 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:\Programme\Microchip\MPLAB C32\bin\pic32-gcc.exe" -mprocessor=32MX460F512L -c -MMD -MF"out\port_asm.d" -I"." -I"." -I"..\common\include" -I"..\..\source\portable\mplab\pic32mx" -I"..\..\source\include" -D__DEBUG "..\..\Source\portable\MPLAB\PIC32MX\port_asm.S" -o"out\port_asm.o" -I"..\..\Source\portable\MPLAB\PIC32MX" -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
RE: typedef causes unrecognized opcodePosted by MEdwards on January 18, 2009 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 Source\portable\MPLAB\PIC32MX\portmacro.h
RE: typedef causes unrecognized opcodePosted by Ralf Anders on January 18, 2009 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
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|