Quality RTOS & Embedded Software

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




Loading

Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by nathanwiebe on August 31, 2015

Now that the PIC32MZ EF family micros and dev boards are readily available, does anyone have any idea when a FreeRTOS port and demo project might be available for them?

I've been trying to use the existing PIC32MZ port (for the EC family), which works great, except that any operation that uses a float type inside a FreeRTOS thread throws an exception.


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by rtel on August 31, 2015

EF support is on the way! Sorry I don't have a time estimate yet.


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by bigbillclark on April 19, 2016

Where is vPortTaskUsesFPU()

I'm using a PIC32MZ2048EFG100 compiler xc32 v1.40 with MPLABX 3.05 I had to upgrade because to v8.2.3 because older FreeRTOS versions die at the general_exception with 0x0B

I cannot compile FreeRTOS v8.2.3 because vPortTaskUsesFPU() is missing, also I cannot find where __mips_hard_float is defined, see error msg from compiler:

build/default/debug/_ext/843873356/port.o: In function vPortTaskUsesFPU': c:/projects/svn_i3c/trunk/firmware/src/freertos/source/portable/mplab/pic32mz/port.c:393: undefined reference to vPortInitialiseFPSCR

I've searched both v8.2.3 and v9.0.0rc2 for that function but cannot find it. I also used ctags+cscope to do the search. mplabx can't find it. I'm stuck :(

Should this function part of the released code or should I be looking else where? - thanks,


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by bowerymarc on April 19, 2016

I’ve been trying to take the PIC18F port from the most current FreeRTOS release (V8.2.3) and import it to the latest microchip tool chain - MPLABX. Tried both the XC8 and C18 compilers, neither give me properly running code (XC8 won’t even compile). I’m wondering if this is just hopeless...


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by bowerymarc on April 19, 2016

apologies for hijacking the thread I thought I was creating a new one. please ignore


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by edward-su on April 19, 2016

Hi Bill,

I am having the same problem with v8.2.1 using PIC32MZ512EFE64. Then, the problem seems solved by upgrade to MPLAB Harmony V1.07.01. The FreeRTOS V8.2.3 is integrated with new MPLAB Harmony. FYI, vPortTaskUsesFPU() is in port.c Hope this help.

Regards,


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by bigbillclark on April 19, 2016

I'm sorry I mistipped

I meant to say where is vPortInitialiseFPSCR() ? I see this being called in port.c but the xc32 v1.40 compiler cannot find the function and neither can I.

Bad news if FreeRTOS is moving to harmony :-(


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by edward-su on April 19, 2016

vPortInitialiseFPSCR() is at port_asm.S , the sam file directory where port.c located.


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by bigbillclark on April 19, 2016

Thanks for that pointer to port_asm.S

Now My problem is back to square one where the compiler xc32 v1.40 still cannot link vPortInitialiseFPSCR() and if I simply // that line away it will compile but then I get the portRESTORECONTEXT generalexception again.

Does any one know how to expand a macro so I can single step portRESTORE_CONTEXT ??? this may be of no use since I believe the problem in not being able to link in vPortInitialiseFPSCR(). Linker file ???


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by bigbillclark on April 20, 2016

I hope someone knows the answer to this FreeRTOS/xc32 linker problem with a PIC32MZ EF

I'm not a MIPS assembler guru so can't understand why this released stable code does not link. It compiles ok except if I take away the C extern then the compiler cannot find the asm .global

There's an assembler function vPortInitialiseFPSCR called by a C function vPortTaskUsesFPU() that does not link. Apparently calling an assembler label .global is not enough for the linker to find it.

~~~~

assembler file port_asm.S ++++++++++++++++++++++++++++ .global vPortInitialiseFPSCR .ent vPortInitialiseFPSCR

vPortInitialiseFPSCR:

/* Initialize the floating point status register in CP1. The initial value is passed in a0. */

ctc1 a0, $f31

C file port.c +++++++++++++++++++++++

if ( _mipshardfloat == 1 ) && ( configUSETASKFPUSUPPORT == 1 )

void vPortTaskUsesFPU(void) { extern void vPortInitialiseFPSCR( uint32_t uxFPSCRInit );

portENTER_CRITICAL();

/* Initialise the floating point status register. */ vPortInitialiseFPSCR(portINITIAL_FPSCR);

/* A task is registering the fact that it needs a FPU context. Set the FPU flag (saved as part of the task context). */ ulTaskHasFPUContext = pdTRUE;

portEXIT_CRITICAL(); }

endif /* _mipshard_float == 1 */

linker output: +++++++++++++++++++++ nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed build/default/debug/ext/843873356/port.o: In function `vPortTaskUsesFPU': c:/projects/svni3c/trunk/firmware/src/freertos/source/portable/mplab/pic32mz/port.c:393:

undefined reference to `vPortInitialiseFPSCR'

~~~~

I hope you all are having way better luck than me with the PIC32MZ EF and FreeRTOS :) Thx, Bill


Eagerly anticipating the port for PIC32MZ EF Family (with hardware floating point)

Posted by rtel on April 20, 2016

Note the line in the code you pasted:

#if ( __mips_hard_float == 1 ) && ( configUSE_TASK_FPU_SUPPORT == 1 )

What is configUSETASKFPU_SUPPORT set to in your project?

The FreeRTOS download contains a configuration with configUSETASKFPUSUPPORT set to 1, and another with configUSETASKFPUSUPPORT set to 0 - I just tired building both with XC1.40 and both built successfully.


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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