Quality RTOS & Embedded Software

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


malloc for a pointer.

Posted by Nobody/Anonymous on December 10, 2005
I am debugging an application who run on FreeRTOS ported on ADuC7026, using Heap_2 as memory management.(Using KEIL Debugger)
I allocate memory for a pointer:
uint8 *mem_to_send = PanicNull(prvPortMalloc(sizeof(uint8)));
So the allocated memory will be on the Heap.

My Problem is that the debugger signalize a Address violation error:
*** error 65: access violation at 0x00000000 : no 'write' permission
when he execute the instruction :
so that it seam like my pointer is not initialized
Please can you explain me what is going on ? Generally, how to allocate memory to someting other than a task.
Best regards;

RE: malloc for a pointer.

Posted by Nobody/Anonymous on December 10, 2005
I presume PanicNull() will tell you if the pointer is NULL.

Check that portBYTE_ALIGNMENT is set correctly in your port (ADu is not official port?).

You say you are allocating memory for a pointer, but use sizeof( uint8), which is presumably 8bits. Most likely a pointer is 32bits. Should this be (uint8*).

RE: malloc for a pointer.

Posted by Nobody/Anonymous on December 11, 2005
portBYTE_ALIGNMENT is set to 4. I thing this is normal. You are wrigth, i have to use (uint8*).
I ported Aduc using LPC2106 as starting point. The only thing i have changed are the timers and interrupt service routine which are specific to ADUC.

I donĀ“t really know where my problem com from.

Any ideas?
best regards

[ 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.


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


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