On 02/15/2013 04:53 PM, Gál Zsolt wrote:
> Hello Erlo,
>
> As I know that area is used by STKxx regs as a STACK and context
> saving for interrupt routine. So I think, you cant put any variable on
> that area.
>
> Zsolt
>


That is correct, but the stack size can be adjusted, making room for 
other data

Erlo


> 2013/2/15 Erlo Haugen <erlo.hau...@gmail.com>:
>> 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
>
>
>


------------------------------------------------------------------------------
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