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

Large heap, dsPIC33, 'far' attribute?

Posted by apullin2 on October 29, 2014

Hi there,

I'm starting to get my application to actually run on my chip. I'm beaming with excitement. The one trick is that I'm using heap_4.c, since the platform does a lot of allocations and frees, since there's a radio chip that sends variable length payloads all the time.

The issue that I'm running in to is that on the dsPIC33 chip I have, which has 16K of RAM, only the lower 8K of it is available via 'near' addressing.

I want to allocate a large heap, most of what is not used in regular task tasks, to facilitate large queues for communications stacks.

Can you foresee any problems with changing the declaration of ucHeap to have __attribute__ ((far)) ?

Relevant chip-specific information is here, page 37, section 4.2.4 : http://ww1.microchip.com/downloads/en/DeviceDoc/70594d.pdf

It looks like points aren't any extra words in length, and the compiler has to issue an extra move instruction for any pointer deref? Getting a bit out of my depth there.


Large heap, dsPIC33, 'far' attribute?

Posted by rtel on October 29, 2014

Hmm. I'm not sure to be honest, but suspect if you make the heap memory far then the pointers that access memory allocated from the heap may also have to be declared far (task, queue, semaphore, etc. handles are effectively pointers). If possible I would just set the default to far in the compiler options.

Regards.


[ 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