2014-04-03 01:11 AM
Hi
I'm using STM32f4 i was trying this code:int
main()
{
signed
long
sArg;
double
dArg;
sArg = (
signed
long
) dArg;
}
the build is ok , but when tryin to program the target i got ''no source available for 0x0''.
is there a problem casting double to long ?
also using atof() :
unsigned char buf[10];
dArg = atof(buf);
give the same problem.
with this code i was able to run:
int
main()
{
signed
long
sArg;
double
dArg;
float
fArg;
fArg = (
float
) dArg;
sArg = (
signed
long
)fArg
}
any explanations?
thanks,
Ari.
2014-04-03 02:06 AM
but when tryin to program the target i got ''no source available for 0x0''.
is there a problem casting double to long ?
No surely not. It seems to be a problem of your toolchain. BTW, you could have mentioned which one. Do you use Windows, and have your project in the ''C:\Program Files\'' path ?
2014-04-03 03:01 AM
I'm using Atollic TrueStudio for ARM , (windows).
my project is not in ''C:\Program Files\''.But i checked on the STM3240G Evaluation board . and same elf file runs perfect.Only when i'm trying to run it on our new board i get this problem...Thogh, as you see the i don't do any HW configurations in main()..so, what can it be ? where this kind of problem should point me ?thanks,Ari2014-04-03 03:34 AM
I am not an Atollic user - about two years ago I evaluated it, having several troubles with building, flashing and debugging when projects were located in the system path.
Is your debug configuration correct ? Can you confirm your code had actually been flashed to the target ? That message suggests to me that either the executable had not been flashed, or the IDE lost track between source code and machine instructions. I would additionally consult the IDE documentation and an Atollic forum.2014-04-03 04:27 AM
Optimization? That main() exits and the code does nothing permanent?
A while(1); would stop the exiting issue.2014-04-03 05:04 AM
thanks fm, i'll give a look.
clive,my compiler optimization is None.i've tried the while(1) , but still stuck..any suggestions ?thanks ,Ari2014-04-03 06:08 AM
As I understood your first post, you can't even download your program.
Perhaps some project setting issue ? I'd try to setup a new project from scratch, possibly copying the main routine.2014-04-03 06:17 AM
that's right, it's not even downloading.
Perhaps some project setting issue ?I'd try to setup a new project from scratch, possibly copying the main routine.but the same workspace, same project , same build, works fine on the evaluation board !!i only change the target connected to my Segger j-link..i wonder , what it got to do with different boards ?thanksAri
2014-04-03 06:28 AM
AFAIK, you need to change the Eclipse debug configuration if you change the debug adapter.
But as said, I'm no Eclipse/Atollic user, and moving on thin ice here ...