]>
Commit | Line | Data |
---|---|---|
ab7f78a4 PZ |
1 | diff -Naurp gcc/config/avr/avr-c.c gcc/config/avr/avr-c.c |
2 | --- gcc/config/avr/avr-c.c 2012-05-30 14:46:12.000000000 +0530 | |
3 | +++ gcc/config/avr/avr-c.c 2012-06-06 13:00:15.000000000 +0530 | |
4 | @@ -95,8 +95,22 @@ avr_cpu_cpp_builtins (struct cpp_reader | |
5 | } | |
6 | ||
7 | if (avr_current_arch->avrtiny) | |
8 | - { | |
9 | + { | |
10 | cpp_define (pfile, "__AVR_TINY__"); | |
11 | - } | |
12 | + | |
13 | + /* | |
14 | + Define macro "__AVR_TINY_PM_BASE_ADDRESS__" with mapped program memory | |
15 | + start address. This macro shall be referred where mapped program memory | |
16 | + is accessed. (Eg. copying data section (do_copy_data) contents to data | |
17 | + memory region. | |
18 | + NOTE: | |
19 | + Program memory of AVR_TINY devices can not be accessed directly, it has | |
20 | + been mapped to the data memory. For AVR_TINY devices (ATtiny4/ 5/ 9/ 10/ | |
21 | + 20 and 40) mapped program memory starts at 0x4000. | |
22 | + */ | |
23 | + cpp_define (pfile, "__AVR_TINY_PM_BASE_ADDRESS__=0x4000"); | |
24 | + } | |
25 | + | |
26 | + | |
27 | } | |
28 |