We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I have a function in my code which has its content commented. So it does nothing. When a I remove this function the system no longer works (the LED was blinking and now is turned off).
There are just two functions (inclusive the mentioned function) in the .c file (one of several .c files). Removing the empty function causes the failure. Can somebody help me?
maybe removing the function shifts the location of some memory-mapped structure you are using? you really need to give more details.
HI.
when you remove t function do u get link errors? is t function being called?
Always yo're freind.
Zeusti.
(the arm abi reader)
say, professor, how can it be that the OP reports that the program "no longer works" (=LED does not blink, but program runs), if he indeed got linker errors as you suspect? do you really believe that programs that don't link can be run?
We have seen a large number of posts where people have complained about their applications and described specific errors (such as not blinking) even when they have failed to link a binary.
Some people defines "running" as managing to (maybe) send a binary to the target. Some people things that the program is running because all I/O reverts to their reset defaults. Some people things that the program is running because the program has gone wild and manages to touch any I/O while not in control.
In this case, a good initial question might be: How do you know that the program is still running, even if you can't see any blinking LED?
Tapeer.
if link fails and is no executeble he mite have erased device. how does ne know program runs? or do U know?
i see if i can find the abi for dummys book 4 u to reed in a quiet room.
it is simply hilarious (don't forget to use a dictionary to figure out what 'hilarious' means, junior, if you know how to) to see you copy-paste (with spelling mistakes, for potato's sake...) the arguments of others, even when you totally don't understand them. you embody a combination of characteristic that I really dislike in people: stupidity, arrogance, swagger, ignorance.
Note that the original poster never says that the program runs. Just that it doesn't work anymore.
What is the name of this removed function? It may be a function that the CRTL has a default implementation of, so removing the function will result in another function with the same name being linked into the application - a function that does something not compatible with the rest of the program.
A big question here is what differences the function removal has to the information in the link map file. Will the map file show that there are no longer a function with this name, and all following functions having their start address reduced with a few bytes?
Another thing - do you have a debugger? Or have you tried to run the application in the simulator? Will it enter main()?
thank u for yo're kind words of kindness and support.
(the abi reader)
Let me guess - "abi" stands for "Abnormal Brain Inactive" ?
u have been reeding the wrong book!
i thoght u knew what it was. most arm programmers know it. abi is the application binary interface.
i have found the link for u
infocenter.arm.com/.../index.jsp
Well, the t function is not called. It is a dummy function actually. There is no error in the link. The .hex file is generated, but no functionality of the system works. Neither blinking LED, nor others like uart communication. I use RTC RAM to store some important data. But it should not interfere the system working at this point. When I simulate the code in Keil it works. However, when I load the .hex file ...
Why don't you debug the code and see where it hangs?
I can run the simulation debug, but in this way the system works normally. I can't run JTAG debug because I do not have JTAG link.
If nothing else, perhaps all this just goes to show that you should get a JTAG link!