1 // Copyright 2020 Espressif Systems (Shanghai) PTE LTD
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #include <stdint.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #define SUPPORT_BTDM            1
24 #define SUPPORT_WIFI            1
25 
26 /* Structure and functions for returning ROM global layout
27  *
28  * This is for address symbols defined in the linker script, which may change during ECOs.
29  */
30 typedef struct {
31     void *dram0_stack_shared_mem_start;
32     void *dram0_rtos_reserved_start;
33     void *stack_sentry;
34     void *stack;
35     void *stack_sentry_app;
36     void *stack_app;
37 
38     /* BTDM data */
39     void *data_start_btdm;
40     void *data_end_btdm;
41     void *bss_start_btdm;
42     void *bss_end_btdm;
43     void *data_start_btdm_rom;
44     void *data_end_btdm_rom;
45     void *data_start_interface_btdm;
46     void *data_end_interface_btdm;
47     void *bss_start_interface_btdm;
48     void *bss_end_interface_btdm;
49 
50     /* Other DRAM ranges */
51 #if SUPPORT_BTDM || SUPPORT_WIFI
52     void *dram_start_phyrom;
53     void *dram_end_phyrom;
54 #endif
55 #if SUPPORT_WIFI
56     void *dram_start_coexist;
57     void *dram_end_coexist;
58     void *dram_start_net80211;
59     void *dram_end_net80211;
60     void *dram_start_pp;
61     void *dram_end_pp;
62     void *data_start_interface_coexist;
63     void *data_end_interface_coexist;
64     void *bss_start_interface_coexist;
65     void *bss_end_interface_coexist;
66     void *data_start_interface_net80211;
67     void *data_end_interface_net80211;
68     void *bss_start_interface_net80211;
69     void *bss_end_interface_net80211;
70     void *data_start_interface_pp;
71     void *data_end_interface_pp;
72     void *bss_start_interface_pp;
73     void *bss_end_interface_pp;
74 #endif
75     void *dram_start_usbdev_rom;
76     void *dram_end_usbdev_rom;
77     void *dram_start_uart_rom;
78     void *dram_end_uart_rom;
79 
80 } ets_rom_layout_t;
81 
82 extern const ets_rom_layout_t * const ets_rom_layout_p;
83 
84 #ifdef __cplusplus
85 }
86 #endif
87