Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

typedef causes unrecognized opcode

Posted 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 opcode

Posted 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 opcode

Posted 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 opcode

Posted 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 opcode

Posted 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 opcode

Posted 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 opcode

Posted 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


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner