Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

FreeRTOS V4.2.1 and PIC33F

Posted by Richard on April 27, 2007
[moved from private email as may be of interest to others]

I tried to compile FreeRTOSV4.2.1\Demo\dsPIC_MPLAB "out of the box" in the MPLAB IDE using the Microchip C30 Student Edition Compiler Version 3.00. The PIC33 Application has what appear to be compiler errors, ie. BUGS when generating code. FreeRTOS\Demo\PIC24_MPLAB compiles OK. Before I contact Microchip, I would like to ask if others have reported this.


Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "D:\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=33FJ256GP710 -c -x c -I"." -I"D:\FreeRTOS\Demo\Common\include" -I"D:\FreeRTOS\Demo\dsPIC_MPLAB" -I"D:\FreeRTOS\source\include" "main.c" -o"main.o" -g -Wall -DMPLAB_DSPIC_PORT -O2 -fomit-frame-pointer -fno-schedule-insns -fno-schedule-insns2 -save-temps
Microchip MPLAB C30 License Manager Version v3.00 (Build Date Feb 28 2007).
Copyright (c) 2005 Microchip Technology Inc. All rights reserved.
The MPLAB C30 license has less than 14 days remaining.
Microchip MPLAB C30 License Manager Version v3.00 (Build Date Feb 28 2007).
Copyright (c) 2005 Microchip Technology Inc. All rights reserved.
The MPLAB C30 license has less than 14 days remaining.
main.c: In function 'main':
main.c:151: warning: pointer targets in passing argument 2 of 'xTaskCreate' differ in signedness
main.c:152: warning: pointer targets in passing argument 2 of 'xTaskCreate' differ in signedness
main.c:153: warning: pointer targets in passing argument 2 of 'xTaskCreate' differ in signedness
main.s: Assembler messages:
main.s:40526: Error: symbol `ERROR_TEST1' is already defined
main.s:40529: Error: symbol `NO_ERROR1' is already defined
main.s:40722: Error: symbol `ERROR_TEST2' is already defined
main.s:40725: Error: symbol `NO_ERROR2' is already defined

[I'm just looking into the problem now]

RE: FreeRTOS V4.2.1 and PIC33F

Posted by Richard on April 27, 2007
I have just tired a clean install and build, with the following comments:

+ When moving between the PIC24 and dsPIC I had to select the processor being used from the "Configure->Select Device" menu option in MPLAB. It does not seem to store the procesor as part of the project file. Without this I got warnings about the incorrect processor being used.

+ Once the processor was correctly selected, performing a clean then rebuild resulted in no errors or warnings being output.

However, I was told by Microchip that there was a new version of the copiler out, which I have not tested yet, and maybe there is some incompatability?

Did you perform a clean, prior to the build?
Which compiler version are you using?

Mine is:
pic30-coff-gcc.exe (GCC) 3.3 (dsPIC30, Microchip v2.00) Build date: Nov 28 2005
__C30_VERSION__ == 200
Copyright (c) 2004 Free Software Foundation, Inc. All rights reserved.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Regards.

RE: FreeRTOS V4.2.1 and PIC33F

Posted by Nobody/Anonymous on April 27, 2007
then it must be a problem with the new version 3.00 c30 compiler (gcc version 4.0.3 (dsPIC30, Microchip v3.00) Build Date Feb 28 2007). I'll send the info the Microchip.

RE: FreeRTOS V4.2.1 and PIC33F

Posted by Richard on April 29, 2007
I have just upgraded my tools to the latest C30 compiler and MPLAB versions, and found that I can replicate the problem.

The symbols it is complaining about are defined within main.c, in the functions xRegisterTest1() and xRegisterTest2(). I don't know why it is complaining that the symbols are defined more than once, as they are not. However, turning the optimisation down to 0 makes the issue disappear, so this is a big clue.

There are also a couple of benign warnings generated, which can be removed or ignored.

Regards.

RE: FreeRTOS V4.2.1 and PIC33F

Posted by Richard on April 29, 2007
I have also added the following to the "Known Issues" list:

"Upgrading to the MPLAB C30 compiler V3.00

The PIC24 MCU® and dsPIC DSC® demo applications will not compile with V3.00 of the C30 compiler unless optimisation is turned off.

With optimisation on the assembler complains about multiple definitions of symbols which are defined within the test tasks xRegisterTest1() and xRegisterTest2(). These symbols are only defined once, but are defined within inline assembler, so there is a possibility of an incompatibility with the inline assembly code and the optimisation functionality.

To run the demo with optimisation on it is necessary to comment out the inline assembly from within the xRegisterTest1() and xRegisterTest2() functions in main.c.

C30 V3.00 also generates a couple of warnings, which are benign and can therefore be rectified or ignored."

Regards.

RE: FreeRTOS V4.2.1 and PIC33F

Posted by Nobody/Anonymous on May 1, 2007
I just received a reply from Microchip. Not being an Assembler-Expert, I can't tell if the reply makes sense or if they just wanted to get rid of the ticket:

This is to inform you that Microchip Engineering Support has added additional comments to your ticket # : 1-77492.

Comments:
I was able to download the source, and duplicate this issue.
I forwarded this on to Dev Tools, and they responded back.

<from Development Tools>
They shouldn't be using regular labels in inline assembly.
If they really need to use a label in inline assembly, they should be using a local label.

Basically, they are getting this error because 3.00 is more aggressive in both function inlining and loop unrolling so the code within the function is getting duplicated.
<>


RE: FreeRTOS V4.2.1 and PIC33F

Posted by Nobody/Anonymous on May 1, 2007
effectively, they have improved the optimization in verions 3 so much that it will hapilly break code that uses labels in inline assembler. the code in question in this case is only part of a test and not needed to run freertos os is not really a problem.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists