Hello All, Can I malloc 40k memory of 5 buffers in C55x and how will I allocate these buffers from different memory sections Lets say one malloc operation in DARAM and others in SDRAM. I tried doing malloc keeping .sysmem at DARAM | SDRAM in .cmd file but malloc fails to allocate. One possible fix could be using MEM_alloc where we can specify segment Id when using DSP/BIOS. Since Im not using DSP/BIOS in my project, I want to defer this idea. Thanks and regards -Lakshman __________________________________ |
|
malloc in different sections without DSP/BIOS
Started by ●September 13, 2004
Reply by ●September 14, 20042004-09-14
Hi Lakshman, The "DARAM | SARAM" syntax is not going to allocate a heap in each DARAM and SARAM. The syntax just indicates to the linker to span a input section in two memory sections in case it doesn't fit into the first. You surely can't split the heap and choose which memory to use if you use the rts.lib malloc function. Since you don't want to use the BIOS, the only options left are, either to use static allocation, or implement a small heap manager of your own. For the former, you can use #DATA_SECTION pragmas to place the data in user defined sections and then choose to put them in either SARAM or DARAM. The latter is essentially equivalant to implementing some part of BIOS functionality on your own. Hope it helps. Regards Piyush --- Lakshman <> wrote: > > Hello All, > > Can I malloc 40k memory of 5 buffers in C55x and how > will I allocate these buffers from different memory > sections Lets say one malloc operation in DARAM and > others in SDRAM. I tried doing malloc keeping > .sysmem > at DARAM | SDRAM in .cmd file but malloc fails to > allocate. One possible fix could be using MEM_alloc > where we can specify segment Id when using DSP/BIOS. > Since Im not using DSP/BIOS in my project, I want > to > defer this idea. > > Thanks and regards > -Lakshman > __________________________________ > > ------------------------ Yahoo! Groups Sponsor > --------------------~--> > $9.95 domain names from Yahoo!. Register anything. > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/9rHolB/TM > --------------------------------~-> > > > _____________________________________ > Note: If you do a simple "reply" with your email > client, only the author of this message will receive > your answer. You need to do a "reply all" if you > want your answer to be distributed to the entire > group. > > _____________________________________ > About this discussion group: > > To Join: Send an email to > To Post: Send an email to > > To Leave: Send an email to > Archives: http://www.yahoogroups.com/group/c55x > > Other Groups: http://www.dsprelated.com > > Yahoo! Groups Links > ===== ************************************** And---"A blind Understanding!" Heav'n replied. Piyush Kaul http://www.geocities.com/piyushkaul __________________________________ |
|
Reply by ●September 22, 20042004-09-22
Hello All, How to allocate more than one page(64Kb) memory on C5510 and wht additional code must be added to prevent pointer wrapping once it crosses a page boundry. I read TRM of C5510 silicon revision 3 where this bug is fixed, Is there any patch available from TI for fixing the above problem.. Thanks and regards -Lakshman --- piyush kaul <> wrote: > Hi Lakshman, > > The "DARAM | SARAM" syntax is not going to allocate > a > heap in each DARAM and SARAM. The syntax just > indicates to the linker to span a input section in > two > memory sections in case it doesn't fit into the > first. > You surely can't split the heap and choose which > memory to use if you use the rts.lib malloc > function. > Since you don't want to use the BIOS, the only > options > left are, either to use static allocation, or > implement a small heap manager of your own. For the > former, you can use #DATA_SECTION pragmas to place > the > data in user defined sections and then choose to put > them in either SARAM or DARAM. The latter is > essentially equivalant to implementing some part of > BIOS functionality on your own. > > Hope it helps. > > Regards > Piyush > > --- Lakshman <> wrote: > > > > > Hello All, > > > > Can I malloc 40k memory of 5 buffers in C55x and > how > > will I allocate these buffers from different > memory > > sections Lets say one malloc operation in DARAM > and > > others in SDRAM. I tried doing malloc keeping > > .sysmem > > at DARAM | SDRAM in .cmd file but malloc fails to > > allocate. One possible fix could be using > MEM_alloc > > where we can specify segment Id when using > DSP/BIOS. > > Since Im not using DSP/BIOS in my project, I want > > to > > defer this idea. > > > > Thanks and regards > > -Lakshman > > > > > > > > > > > > __________________________________ > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > > --------------------~--> > > $9.95 domain names from Yahoo!. Register anything. > > > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/9rHolB/TM > > > --------------------------------~-> > > > > > > _____________________________________ > > Note: If you do a simple "reply" with your email > > client, only the author of this message will > receive > > your answer. You need to do a "reply all" if you > > want your answer to be distributed to the entire > > group. > > > > _____________________________________ > > About this discussion group: > > > > To Join: Send an email to > > > > > > To Post: Send an email to > > > > To Leave: Send an email to > > > > > > Archives: http://www.yahoogroups.com/group/c55x > > > > Other Groups: http://www.dsprelated.com > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > ===== > ************************************** > And---"A blind Understanding!" Heav'n replied. > > Piyush Kaul > http://www.geocities.com/piyushkaul > > __________________________________ > _______________________________ |
|
Reply by ●September 23, 20042004-09-23
Hi Lakshman, The revision 2.x of c55x CPU used 16 bit addressing, hence it will wrap up to address 0 in same page when you increment at page boundary. The latest 3.0 revision of c55x uses 23 bit addressing, hence it will move to next page. It is the way hardware designed and CPU behaves at page boundary. Let me stress that it is not bug. There won't be concept of patch (which is mostly valid for software) for this. Hope this clarifies behavior of revision 3. The compiler takes care for all C/C++ code. You have careful of this fact only when you write code in assembly. As far as I know, during allocation more then one page, you have manually allocated integer number of pages and remainder via malloc() or MEM_alloc() functions. Regards, Mihir Mody, Multimedia codecs group, Texas Instruments India, Ltd, Email : Phone : +91-80-25099307 -----Original Message----- From: Lakshman [mailto:] Sent: Wednesday, September 22, 2004 8:20 PM To: piyush kaul; Subject: Re: [c55x] malloc in different sections without DSP/BIOS Hello All, How to allocate more than one page(64Kb) memory on C5510 and wht additional code must be added to prevent pointer wrapping once it crosses a page boundry. I read TRM of C5510 silicon revision 3 where this bug is fixed, Is there any patch available from TI for fixing the above problem.. Thanks and regards -Lakshman --- piyush kaul <> wrote: > Hi Lakshman, > > The "DARAM | SARAM" syntax is not going to allocate > a > heap in each DARAM and SARAM. The syntax just > indicates to the linker to span a input section in > two > memory sections in case it doesn't fit into the > first. > You surely can't split the heap and choose which > memory to use if you use the rts.lib malloc > function. > Since you don't want to use the BIOS, the only > options > left are, either to use static allocation, or > implement a small heap manager of your own. For the > former, you can use #DATA_SECTION pragmas to place > the > data in user defined sections and then choose to put > them in either SARAM or DARAM. The latter is > essentially equivalant to implementing some part of > BIOS functionality on your own. > > Hope it helps. > > Regards > Piyush > > --- Lakshman <> wrote: > > > > > Hello All, > > > > Can I malloc 40k memory of 5 buffers in C55x and > how > > will I allocate these buffers from different > memory > > sections Lets say one malloc operation in DARAM > and > > others in SDRAM. I tried doing malloc keeping > > .sysmem > > at DARAM | SDRAM in .cmd file but malloc fails to > > allocate. One possible fix could be using > MEM_alloc > > where we can specify segment Id when using > DSP/BIOS. > > Since I'm not using DSP/BIOS in my project, I want > > to > > defer this idea.... > > > > Thanks and regards > > -Lakshman > > > > > > > > > > > > __________________________________ > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > > --------------------~--> > > $9.95 domain names from Yahoo!. Register anything. > > > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/9rHolB/TM > > > --------------------------------~-> > > > > > > _____________________________________ > > Note: If you do a simple "reply" with your email > > client, only the author of this message will > receive > > your answer. You need to do a "reply all" if you > > want your answer to be distributed to the entire > > group. > > > > _____________________________________ > > About this discussion group: > > > > To Join: Send an email to > > > > > > To Post: Send an email to > > > > To Leave: Send an email to > > > > > > Archives: http://www.yahoogroups.com/group/c55x > > > > Other Groups: http://www.dsprelated.com > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > ===== > ************************************** > And---"A blind Understanding!" Heav'n replied. > > Piyush Kaul > http://www.geocities.com/piyushkaul > > __________________________________ > _______________________________ _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: Send an email to To Post: Send an email to To Leave: Send an email to Archives: http://www.yahoogroups.com/group/c55x Other Groups: http://www.dsprelated.com Yahoo! Groups Links |
Reply by ●October 8, 20042004-10-08
I never declare anything which might cross a 64 k boundary as a pointer.Call it Uint32. Just cast it at the last moment when it really has to address something. Paul Pignon, CTO Borthwick Pignon Solutions http://bps.co.ee Tartu Science Park Riia 185 51014 Tartu Estonia Office +372 7 302641 Mob +372 53 463942 > -----Original Message----- > From: Lakshman [mailto:] > Sent: 22 September 2004 17:50 > To: piyush kaul; > Subject: Re: [c55x] malloc in different sections without DSP/BIOS > Hello All, > > How to allocate more than one page(64Kb) memory on > C5510 and wht additional code must be added to prevent > pointer wrapping once it crosses a page boundry. > I read TRM of C5510 silicon revision 3 where this bug > is fixed, Is there any patch available from TI for > fixing the above problem.. > > Thanks and regards > -Lakshman > > > --- piyush kaul <> wrote: > > > Hi Lakshman, > > > > The "DARAM | SARAM" syntax is not going to allocate > > a > > heap in each DARAM and SARAM. The syntax just > > indicates to the linker to span a input section in > > two > > memory sections in case it doesn't fit into the > > first. > > > > > > You surely can't split the heap and choose which > > memory to use if you use the rts.lib malloc > > function. > > Since you don't want to use the BIOS, the only > > options > > left are, either to use static allocation, or > > implement a small heap manager of your own. For the > > former, you can use #DATA_SECTION pragmas to place > > the > > data in user defined sections and then choose to put > > them in either SARAM or DARAM. The latter is > > essentially equivalant to implementing some part of > > BIOS functionality on your own. > > > > Hope it helps. > > > > Regards > > Piyush > > > > --- Lakshman <> wrote: > > > > > > > > Hello All, > > > > > > Can I malloc 40k memory of 5 buffers in C55x and > > how > > > will I allocate these buffers from different > > memory > > > sections Lets say one malloc operation in DARAM > > and > > > others in SDRAM. I tried doing malloc keeping > > > .sysmem > > > at DARAM | SDRAM in .cmd file but malloc fails to > > > allocate. One possible fix could be using > > MEM_alloc > > > where we can specify segment Id when using > > DSP/BIOS. > > > Since I'm not using DSP/BIOS in my project, I want > > > to > > > defer this idea.. > > > > > > Thanks and regards > > > -Lakshman > > > > > > > > > > > > > > > > > > __________________________________ > > > > > > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > > > --------------------~--> $9.95 domain names from Yahoo!. Register > > > anything. > > > > > > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/9rHolB/TM > > > > > > -------------------------- > ------~-> > > > > > > > > > _____________________________________ > > > Note: If you do a simple "reply" with your email > > > client, only the author of this message will > > receive > > > your answer. You need to do a "reply all" if you > > > want your answer to be distributed to the entire > > > group. > > > > > > _____________________________________ > > > About this discussion group: > > > > > > To Join: Send an email to > > > > > > > > > To Post: Send an email to > > > > > > To Leave: Send an email to > > > > > > > > > Archives: http://www.yahoogroups.com/group/c55x > > > > > > Other Groups: http://www.dsprelated.com > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ===== > > ************************************** > > And---"A blind Understanding!" Heav'n replied. > > > > Piyush Kaul > > http://www.geocities.com/piyushkaul > > > > > > > > __________________________________ > > > > _______________________________ > _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: Send an email to To Post: Send an email to To Leave: Send an email to Archives: http://www.yahoogroups.com/group/c55x Other Groups: http://www.dsprelated.com Yahoo! Groups Links |