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.
Can anyone please tell me if there is any way to configure Keil so that i can relocate blocks of my program to any given location. In assebly we simply write ORG followed by the absolute memory location. Is this also possible in C. any help will be highly apprecated.
hi, In assebly we simply write ORG followed by the absolute memory location That isn't exactly right. ORG statement is related to SEGMENT one. ORG statement alters the location counter for the current segment and sets a new origin for subsequent statements. Well, in an absolute segment, the location counter is assigned the absolute address value specified. But in a relocatable segment, the location counter is assigned the offset of the specified expression, so is not set to absolute address. More info: http://www.keil.com/support/man/docs/a51/a51_st_org.htm and http://www.keil.com/support/man/docs/a51/a51_st_segment.htm Regards, Oleg
can anyone please tell me why we, almost daily, see posts about absolute location of code segments. I am trying to visualize one such and, while I can see it for shared data memory or some such thing, I can not see any application for absolute location of code. Erik
hi, can anyone please tell me why we, almost daily, see posts about absolute location of code segments. Is one of reason that some people forget words "Label" and "public/extern"? Another issue is interrupts' vectors. Last one I see is that some parts of code may be placed into external program memory. But this is not about ORG, there is absolute SEGMENT statement and segments' sequence placement to locate then. Some more may be come in mind later... Regards, Oleg
can anyone please tell me why we, almost daily, see posts about absolute location of code segments.<p> Bootloaders with firmware upgrade functionality, for example.
A corrective addition my post should have been: can anyone please tell me why we, almost daily, see posts about absolute location of code segments using C. Is one of reason that some people forget words "Label" and "public/extern"? That one I'll believe Another issue is interrupts' vectors. invalidated by the above addition "using C". Bootloaders with firmware upgrade functionality, for example. That seems not to be the reason the 'daily' question is asked. Besides, that would not be functions/segments but complete programs located. Erik