2013-06-26 05:58 PM
if I have #include <stdio.h> then build and debug the debugger just kind of hangs and is always in the breakpoint state, I hit run but then it just stops instantly. Using Keil. If I remove that include and all references to printf it works fine.
Any ideas @clive, you dont have to answer my question but I was reading a really old ''ASMTUT00.TXT'' file I had printed out that explains assembly ( I read it years ago ) in it the author made references to a ''Clive'' in a section about flags, that was not you right ?2013-06-26 06:21 PM
With Keil you'll have to see how the output is hosted, by default it's going to generate an SWI to implement some output/os functions, which will either trap the debugger, or Hard Fault. Watch also MicroLIB.
You'd want to fish around the retarget.c/serial.c implementations under the arm\boards directories.#include <
stdio.h
>
#include <
rt_misc.h
>
#pragma import(__use_no_semihosting_swi)
I guess it could be me, would need to have more context, I've been coding in assembler since the early 1980's and have quite a history with 6502 and x86, my brother had Atari's (68K) and Archimedes (Acorn ARM)
2013-06-26 07:14 PM
2013-06-26 07:44 PM
No, not me.
2013-06-26 08:05 PM
so we are not mysteriously linked through space, time and archaic asm tutorials, darn.
Oh well i'll stop being creepy. About the stdio I added the lines in you recommended and got another err about system_exit defined or something. Oh well I dont want to have extra wrenches in my works, printf is overrated. I wasnt even using it for anything, and I know that issue has plagued me for a long time and I never knew what it was. But if your in keil and you hit debug then it seems to hit a bp instantly and you can never run and it never gets to main, look to your includes of things like stdio. Thanks for the help