Forum Discussion
Altera_Forum
Honored Contributor
20 years agoI would need to run a few experiment to be certain, however I believe that the decleration:
extern volatile int mickey __attribute__ ((section (".data"))); really is the decleration that you are looking for, i.e. it says: "access mickey as if it were in the .data section", which for Nios II just means "don't use gp addressing". If mickey was actually linked to be in the .sdata the code would still work it just wouldn't use the gp (as desired). Obviously this isn't exactly self documenting code, but I believe it does what you're asking for.