--- Quote Start ---
originally posted by smcnutt@Nov 21 2006, 10:12 AM
the compiler puts variables, code, etc. into sections ... there's no choice in this matter other than
specifying a compiler output section ... so, if you want to do things at run time, you'll have to use a
pointer:
alt_u8 *pdummybyte = (alt_u8 *) 0x0080000;
or something similar.
regards,
--scott
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19563)
--- quote end ---
--- Quote End ---
Many embedded C compilers have the extensions like Emme has mentioned (_AT_) to not only allow usage of the memory block but make the access fast.
Using "at" lets you avoid indirect addressing in case your main memory is slow.
Let's say you want to put some data buffer for an isr in a on-chip memory to avoid using slow external ram bus - how would you do it with your method?
To resolve pointer you would still have to access it located in the external ram, so you would not save any time doint this...
It would be great if the gcc compiler implementation for Nios could be extended with some typical embedded features like "at" directive...