FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2005 Threads] malloc for a pointer.Posted by Nobody/Anonymous on December 10, 2005 Hello, 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 : mem_to_send[0]=0xC0; 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; Emeric
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
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|