This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: problems with GCC-3.2.1 and new/delete operators.
- From: marco at sitek dot it
- To: Jonathan Larmour <jifl at eCosCentric dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 9 Apr 2003 12:40:28 +0200
- Subject: Re: [ECOS] problems with GCC-3.2.1 and new/delete operators.
> Looks like the memory layout files (particularly the .ldi file) for your
> platform doesn't contain all the sections it should. Compare against
> another one that's already working like the atlas HAL.
Thanks for the reply.
I've checked against the MALTA memory layout file (ram) we use with the
application. mlt_..._ram.h and mlt_..._ram.ldi are the same except for
memory size. About the linker script. I checked it against the MIPS32
target and added
#if (__GNUC__ >= 3)
GROUP(libtarget.a libgcc.a libsupc++.a)
#else
GROUP(libtarget.a libgcc.a)
#endif
Test case below. You link this fine?
#include <stdio.h>
int main()
{
unsigned int index=5, *point;
unsigned int *point_time = new unsigned int[12];
point = new unsigned int;
*point = index;
printf("*Point= %d \n",*point);
delete point;
for ( int i=0;i<12;i++) {
point_time[i]=i+1;
}
for ( int i=0;i<12;i++) {
printf("Hour %d \n", point_time[i]);
}
delete [] point_time;
}
Best regards,
Marco
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss