Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/10/02 22:06
Read: times


 
#24238 - RE: Keil -> IAR
To the purists, the IAR approach is the "correct" one: it is not the Compiler's place to allocate addresses - that's the Linker's job (strictly, the Locator's job, but most toolchains have a combined Linker-Locator these days).

The alternative is to do it in Assembler.

Placing a variable at a specific hardware address is a very common requirement in embedded programming, but Keil is the first Compiler I've come across which provides a 'C' language extension to do it. (yes, there are others - but Keil is the 1st which I came across!)

The trouble with Keil's _at_ keyword is that it can't be used with an initialiser and, despite the fact that this is clearly stated in the manual, one of the commonest questions on the Keil forum is people who do try to use it with an initialiser!

So, in this case, you still end up having to use Assembler or the Linker even in Keil!

http://www.keil.com/support/docs/937.htm

List of 5 messages in thread
TopicAuthorDate
Keil -> IAR            01/01/70 00:00      
RE: Keil -> IAR            01/01/70 00:00      
RE: Keil -> IAR            01/01/70 00:00      
RE: Keil -> IAR            01/01/70 00:00      
RE: Keil -> IAR            01/01/70 00:00      

Back to Subject List