avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] use of specifin RAM location


From: Gary Douglas
Subject: Re: [avr-gcc-list] use of specifin RAM location
Date: Thu, 01 Dec 2005 16:38:05 -0700
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

Here's how I set a memory mapped latch programmed into a CPLD:

//location in external memory - hard set by address lines:
#define PLD_LATCH 0x80c0

void set_pld(uint8_t data)
{
        uint8_t *pld;
        pld = (uint8_t*)PLD_LATCH;
        *pld = data;
}

Pretty simple, no linker tricks, and it just works! Probably not so elegant, but functional.

Hope it helps.

<G>

varsha wrote:
Hello all,
I'm working on avr-gcc (GCC) 3.4.3 compiler and target MCU is Atmega 16
i want to declare some variables, such that hey will take specific ram locations...
for ex:
as we do in assembly code as, org (ramend-4) date: .byte 1
month:   .byte 1
how to achieve this in c? Thank you,

regards,
varsha
!DSPAM:438abcc9265471899919260!
--

***********************Confidentiality Notice***************************
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain confidential or privileged information. If you are not
the intended recipient, please notify the sender at Divinet or
address@hidden immediately and destroy all copies of this
message and any attachments.

************************************************************************


------------------------------------------------------------------------

_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


!DSPAM:438abcc9265471899919260!

--
Gary Douglas
Manager - Network Products

Pathway Connectivity Inc.
Unit 103, 1439 - 17 Avenue SE
Calgary, Alberta
Canada. T2G 1J9
+1.403.243-8110 x43
www.pathwayconnect.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]