Hello everybody
Is there a way to tell the compiler to place one or more variables in 
the udata_shr segment? I am aware of linker option 
--preplace-udata-with=[kword], but that will just put everything in one 
place - or?

I could use absolute adressing, eg.  uint8_t xx __at 0x70, but this 
exactly the job for the compiler and linker...

I want to do something like this:


/*
  * Global variables
  */

/*
  * Shared segment
  */
shared udata_shr
uint8_t    mode;
uint8_t    flags;

/*
  * Non-shared segment
  */
nonshared udata
unit16_t   eventCounter;


The reason is of course efficiency - the variables in the shared area 
are accessed from the interrupt routine as well as from normal functions.



Best regards
Erlo

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to