Keil Logo Arm Logo

Discussion Forum

compiler problem....somebody plz solve

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
deepak sarwade
Posted
23-Mar-2007 12:58 GMT
Toolset
ARM
New! compiler problem....somebody plz solve

i'm working on ARM7TDMI-S cored LPC2138 for which i'm using keil compiler. while programming i came to a strange situation which is as follows. i wrote many programes in keil cross-compiler they worked well and thanx to keil for giving nice software. but for few cases i got SWI inturrupt automatically even programme can't get out of startup instructions while i debug the programme and my programme couldn't go further. Later by changing the programme i solved the problem but i couldn't point out the reason for that problem.... Now again i'm facing the same problem can anyone explain me why the problem comes??

Read-Only
Author
Sven Butler
Posted
26-Mar-2007 10:29 GMT
Toolset
ARM
New! RE: SWI

Yes, i have had similar problems when i switched from CARM to Realview. Could'nt solve them, so i use CARM again. I don't have time spending days and days and week's on this. Maybe you will find a solution, i really hope you will post it, so everybody can share it :-)

Seems a library problem that some basic functions like printf or scanf use librarys which are not especially for your target-CPU. There is a RETARGET.C file, maybe it must be adapted for your target-CPU

I wish you succes!

Read-Only
Author
Reinhard Keil
Posted
26-Mar-2007 11:00 GMT
Toolset
ARM
New! RE: SWI

This looks like a problem with retargeting. Are you using some file I/O functions or printf/scanf? Are you using a file with the name retraget.c in the RealView project?

Read-Only
Author
deepak sarwade
Posted
26-Mar-2007 15:11 GMT
Toolset
ARM
New! RE: SWI

i hope this code will help u for u'standing my problem.

#include<stdio.h>
#include<stdlib.h>
main()
{ float *a;
int i;
float j=1.2;
a=(float *)malloc(10*sizeof(*a));
for(i=0;i<10;i++)
{ *(a+i)=j;
j+=0.2;
} }

Read-Only
Author
Franc Urbanc
Posted
27-Mar-2007 06:20 GMT
Toolset
ARM
New! RE: SWI

Do you have a swi disable pragma in your retarget.c?
#pragma import(__use_no_semihosting_swi)

Have you setup the heap in the startup file? Default heap size is 0, so memory allocation functions would fail. Try with 4 K bytes for a start.

Read-Only
Author
Sven Butler
Posted
27-Mar-2007 11:25 GMT
Toolset
ARM
New! RE: SWI

Thanks for your concerned reply.
It is now some months ago that i stopped to try to get started with REALVIEW.
To answer your question i think i've used printf, it's ideal for debugging, but i'm not so sure this time.

I've just opened a new E-Mail-adress my_test_test_123@web.de especially for this purpose, as i hope someone will send me some helpful Files to help me getting Realview started.

My CPU is a ADuC7026.
I'm not sure which startup.s, which retaget.c i should have used.

To tell the truth i have no idea what this files do, or what a heap is...

Cincerly yours

Next Thread | Thread List | Previous Thread Start a Thread | Settings

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.