Mistake on this page?
Report an issue in GitHub or email us
cy_wifi_fw_section.h
Go to the documentation of this file.
1 /***********************************************************************************************//**
2  * \file cy_wifi_fw_section.h
3  *
4  * \brief
5  * Determines the start and end of the region the WiFi firmware is stored in.
6  *
7  ***************************************************************************************************
8  * \copyright
9  * Copyright 2020 Cypress Semiconductor Corporation
10  * SPDX-License-Identifier: Apache-2.0
11  *
12  * Licensed under the Apache License, Version 2.0 (the "License");
13  * you may not use this file except in compliance with the License.
14  * You may obtain a copy of the License at
15  *
16  * http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing, software
19  * distributed under the License is distributed on an "AS IS" BASIS,
20  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21  * See the License for the specific language governing permissions and
22  * limitations under the License.
23  **************************************************************************************************/
24 
25 #pragma once
26 
27 #if defined(CY_STORAGE_WIFI_DATA_OUTPUT)
28 
29 #include "cy_utils.h"
30 
31 #if defined(__ARMCC_VERSION)
32 
33 #define CY_SECTION_BASE_SYMBOL_BASE(SECTION) Image$$ ## SECTION ## $$Base
34 #define CY_SECTION_BASE_SYMBOL(SECTION) CY_SECTION_BASE_SYMBOL_BASE(SECTION)
35 extern char CY_SECTION_BASE_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT);
36 #define CY_WIFI_FW_SECTION_START (&CY_SECTION_BASE_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT))
37 
38 #define CY_SECTION_LIMIT_SYMBOL_BASE(SECTION) Image$$ ## SECTION ## $$Limit
39 #define CY_SECTION_LIMIT_SYMBOL(SECTION) CY_SECTION_LIMIT_SYMBOL_BASE(SECTION)
40 extern char CY_SECTION_LIMIT_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT);
41 #define CY_WIFI_FW_SECTION_END (&CY_SECTION_LIMIT_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT))
42 
43 #elif defined(__GNUC__)
44 
45 // Must define __<Output Section Name>_start and __<Output Section Name>_end in the linker script
46 
47 #define CY_SECTION_START_SYMBOL_BASE(SECTION) __ ## SECTION ## _start
48 #define CY_SECTION_START_SYMBOL(SECTION) CY_SECTION_START_SYMBOL_BASE(SECTION)
49 extern char CY_SECTION_START_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT);
50 #define CY_WIFI_FW_SECTION_START (&CY_SECTION_START_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT))
51 
52 #define CY_SECTION_END_SYMBOL_BASE(SECTION) __ ## SECTION ## _end
53 #define CY_SECTION_END_SYMBOL(SECTION) CY_SECTION_END_SYMBOL_BASE(SECTION)
54 extern char CY_SECTION_END_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT);
55 #define CY_WIFI_FW_SECTION_END (&CY_SECTION_END_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT))
56 
57 #elif defined(__ICCARM__)
58 
59 #define CY_DECLARE_SECTION_BASE(SECTION) CY_PRAGMA(section = #SECTION)
60 #define CY_DECLARE_SECTION(SECTION) CY_DECLARE_SECTION_BASE(SECTION)
61 CY_DECLARE_SECTION(CY_STORAGE_WIFI_DATA_OUTPUT)
62 
63 #define CY_SECTION_BEGIN_SYMBOL_BASE(SECTION) __section_begin(#SECTION)
64 #define CY_SECTION_BEGIN_SYMBOL(SECTION) CY_SECTION_BEGIN_SYMBOL_BASE(SECTION)
65 #define CY_WIFI_FW_SECTION_START (CY_SECTION_BEGIN_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT))
66 
67 #define CY_SECTION_END_SYMBOL_BASE(SECTION) __section_end(#SECTION)
68 #define CY_SECTION_END_SYMBOL(SECTION) CY_SECTION_END_SYMBOL_BASE(SECTION)
69 #define CY_WIFI_FW_SECTION_END (CY_SECTION_END_SYMBOL(CY_STORAGE_WIFI_DATA_OUTPUT))
70 
71 #else // if defined(__ARMCC_VERSION)
72 #error "An unsupported toolchain"
73 #endif // defined(__ARMCC_VERSION)
74 
75 #endif // defined(CY_STORAGE_WIFI_DATA_OUTPUT)
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.