DSPRelated.com

Why can't we use MEM_alloc in SWI?

Started by vuongtuyettien in TMS320c6x19 years ago

Hi all, I mistakenly used MEM_alloc in a PRD function (which is considered SWI). What happen was MEM_free later called in another TSK...

Hi all, I mistakenly used MEM_alloc in a PRD function (which is considered SWI). What happen was MEM_free later called in another TSK blocked the caller forever. I used a semaphore to force the sequence alloc/free and I am sure that MEM_alloc was always called before MEM_free, I also debuged to see MEM_alloc returned successfuly and MEM_free had right


Example on MEM_alloc OR MEM_calloc OR MEM_valloc

Started by norr...@yahoo.co.uk in TMS320c6x18 years ago 1 reply

Hi guys, Really appreciate this forum since the first time I join this forum :) We always found in this forum about the issue of allocating...

Hi guys, Really appreciate this forum since the first time I join this forum :) We always found in this forum about the issue of allocating memory dynamically. Can anyone give some examples on using MEM_alloc or MEM_calloc or MEM_valloc. Below is one example that I took from other discussion from this forum. while(1) { p1 = (char*)MEM_alloc(heap1, 100, 8); p2 = (char*)MEM_alloc(heap2, 10...


Mem_Alloc and tsk 62x

Started by sophyan in TMS320c6x17 years ago

Thanks for your help Jeff, I've created a 5sec timer that "simulates" the interrupt that you suggested. In the timer function I am able to...

Thanks for your help Jeff, I've created a 5sec timer that "simulates" the interrupt that you suggested. In the timer function I am able to call the Mem_alloc and Mem_free with no trouble. And I was able to Signal the task semaphore. And again, the _tsk function fails to Mem_alloc. From this exercise we proved that it's probably not the HWI that is choking up. On 4/23/07, Jeff Brower


Mem_Alloc and tsk 62x

Started by sophisblu in TMS320c6x17 years ago 2 replies

What is the problem? I'm trying to allocate external SDRAM memory in a TSK function defined in a Configuration CDB file. However Mem_alloc...

What is the problem? I'm trying to allocate external SDRAM memory in a TSK function defined in a Configuration CDB file. However Mem_alloc in TSK function fails. To test Mem_alloc, I was able to allocate in the during the initialization of the System and see memory allocated in Kernal Object viewer. So the problem must be in the system level. I read up on Mem_allocs and found out that dynam...


MEM_alloc

Started by Alexandre Freire da Silva Osorio in TMS320c6x21 years ago 5 replies

Hi, My application allocates large buffers dinamycally so it should be placed in off-chip memory. In CCS help I read about...

Hi, My application allocates large buffers dinamycally so it should be placed in off-chip memory. In CCS help I read about MEM_alloc and MEM_free and I used it in my code, but the linker doesn't recognizes these functions. Please, what is the lib that I must link to my


MEM_alloc arbitration

Started by pablo fraile in TMS320c6x22 years ago 2 replies

Hi all, I'm developing an app with a few tasks; one of them initializes some buffers in IDRAM and SDRAM using MEM_alloc during...

Hi all, I'm developing an app with a few tasks; one of them initializes some buffers in IDRAM and SDRAM using MEM_alloc during task initialisation, and then uses them for the whole application time. The problem is that another task tries to allocate a pointer but it seems that the me


memory allocastions in DSP/BIOS

Started by alon...@rafael.co.il in TMS320c6x18 years ago 4 replies

Hi all, Using the DSP/BIOS operatinf system, I have hard times with the memory allocations. I want to use 'MEM_alloc' / 'MEM_free'...

Hi all, Using the DSP/BIOS operatinf system, I have hard times with the memory allocations. I want to use 'MEM_alloc' / 'MEM_free' instead of using 'new' and 'delete' (I work on C++). The reson is : using MEM_alloc I can define the memory section to be allocated in. The problem is that in order to use MEM_Free, I need to know the size to free, and this is too mu


how to use MEM_alloc without opening a DSP/BISO Config !

Started by shia_son in TMS320c6x20 years ago 3 replies

MEM_alloc(SEG0, BUFSIZE, 0); i dont want to open DSP/BISO Config to specify the SEG0 is there any other way !! ...

MEM_alloc(SEG0, BUFSIZE, 0); i dont want to open DSP/BISO Config to specify the SEG0 is there any other way !!


MEM_alloc( ) - unidentified item

Started by ".dorian" in TMS320c6x16 years ago 3 replies

hi everybody, in the DSP/BIOS settings I defined a heap in the ISRAM memory (right click > properties) and gave it a label (_intHeap). I...

hi everybody, in the DSP/BIOS settings I defined a heap in the ISRAM memory (right click > properties) and gave it a label (_intHeap). I try to allocate some memory on that heap using MEM_alloc(_intHeap, sizeof(struct bla), 8); but the compiler can't find the _intHeap label. Does somebody know what I am missing ? thanks ! dorian PS: Dm642 board, CSS 3.1


MEM_alloc + pci.h

Started by cesa714 in TMS320c6x21 years ago 1 reply

I've attempted to use DSP/BIOS since i need to use MEM_alloc my problem is that when i try to use pci.h from communcation, pci ...

I've attempted to use DSP/BIOS since i need to use MEM_alloc my problem is that when i try to use pci.h from communcation, pci transfers don't work. When i don't use DSP/BIOS all my pci.h communcations work fine. I think i read somewhere that DSP/BIOS uses pipes to communcate.


Memory allocation in C6711

Started by motti_ch1 in TMS320c6x20 years ago

Hello. How do I allocate memory in the SDRAM? Is this example correct: extern far Int SDRAM; void main(void) { ...

Hello. How do I allocate memory in the SDRAM? Is this example correct: extern far Int SDRAM; void main(void) { float *p1,*p2; p1=(float *) MEM_alloc(SDRAM,10000*sizeof(float)); p2=(float *) MEM_alloc(SDRAM,20000*sizeof(float)); }


MEM_alloc problems

Started by kbre...@mail.utexas.edu in TMS320c6x16 years ago

Here is my code: #include #include #include "shared.h" #include #include #include #include #include #define...

Here is my code: #include #include #include "shared.h" #include #include #include #include #include #define SDRAM 0x80000000 interrupt void tx_isr(void); /* prototype the ISR */ int segid_sdram; float *x; void labmain() { segid_sdram =MEM_define((void *)SDRAM,0x01000000,NULL); x =(void *)MEM_alloc(segid_sdram,0


Initializing memory

Started by Bushnaq in TMS320c6x16 years ago 3 replies

Hello, I am working on a project that compares the performance of FPGA's to DSP kits. I am implementing a 2D 5/3 DWT using both kits. I...

Hello, I am working on a project that compares the performance of FPGA's to DSP kits. I am implementing a 2D 5/3 DWT using both kits. I am using TMS320C6416 DSK and CCS 2.20.04 I have a limited background when it comes to either using the DSK or CCS so please bear with me. I am using mem_alloc in DSP/BIOS to allocate space for the pixels of an image. My program seems to be worki...


Dynamic memory allocation - help!

Started by motti_ch1 in TMS320c6x20 years ago 1 reply

Hi there! How do I allocate memory in DSK C6711? I've to allocate a large amount of memory (about 100-500 thousands of KB).. ...

Hi there! How do I allocate memory in DSK C6711? I've to allocate a large amount of memory (about 100-500 thousands of KB).. Do I have to use the mem_alloc instruction? and if I do..how do i use it? (what is "Int segid" in its syntax?) Thank you !


memory alloc from HWI or SWI

Started by tino...@yahoo.it in TMS320c6x17 years ago

Hi all, I read that MEM_alloc can't be used from HWI or SWI... and also BUF_create can't be used from HWI or SWI. So I'm searching info about...

Hi all, I read that MEM_alloc can't be used from HWI or SWI... and also BUF_create can't be used from HWI or SWI. So I'm searching info about allocating memory from HWI or SWI. How can I do? Thanks in advance Tino


MEM_calloc and it's return value

Started by NOR RIZUAN MAT NOOR in TMS320c6x18 years ago

Hi everybody! I have a few questions about MEM_alloc (again!). :D I have write one simple program to allocate memory to store pixel...

Hi everybody! I have a few questions about MEM_alloc (again!). :D I have write one simple program to allocate memory to store pixel coordinate in memory. I used DSP/BIOS, and my heap size is 0x00080000 in SDRAM with heap identifier label SEG0. I have used MEM_calloc as below : struct pixel * create_pixel(int m, int n) { struct pixel * temp = (struct pixel*)MEM_calloc(SEG0, 1*sizeo...