mirror of https://github.com/ARMmbed/mbed-os.git
Correct compiler switching in Nordic code
parent
cd4fd86f1f
commit
4da4c1f5ce
|
|
@ -63,7 +63,7 @@
|
|||
*
|
||||
* @param[in] section_name Name of the section to register.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
// Not required by this compiler.
|
||||
#define NRF_SECTION_VARS_REGISTER_SECTION(section_name)
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
*
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_START_SYMBOL(section_name) section_name ## $$Base
|
||||
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
*
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_END_SYMBOL(section_name) section_name ## $$Limit
|
||||
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
*
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_LENGTH(section_name) \
|
||||
((uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) - (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name))
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
*
|
||||
* param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name)
|
||||
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
*
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name)
|
||||
|
||||
|
|
@ -193,7 +193,7 @@
|
|||
* @param[in] type_name Name of the type stored in the section.
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_REGISTER_SYMBOLS(type_name, section_name) \
|
||||
extern type_name * NRF_SECTION_VARS_START_SYMBOL(section_name); \
|
||||
|
|
@ -229,7 +229,7 @@
|
|||
* @param[in] section_name Name of the section.
|
||||
* @param[in] type_def Datatype of the variable to place in the given section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_ADD(section_name, type_def) \
|
||||
static type_def __attribute__ ((section(#section_name))) __attribute__((used))
|
||||
|
|
@ -259,7 +259,7 @@
|
|||
* @param[in] type_name Type name of item in section.
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_GET(i, type_name, section_name) \
|
||||
(type_name*)(NRF_SECTION_VARS_START_ADDR(section_name) + i * sizeof(type_name))
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ static inline uint32_t ram_end_address_get(void)
|
|||
uint32_t sd_check_ram_start(uint32_t sd_req_ram_start)
|
||||
{
|
||||
#if (defined(S130) || defined(S132) || defined(S332))
|
||||
#if defined ( __CC_ARM )
|
||||
#if defined ( __CC_ARM ) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$RW_IRAM1$$Base;
|
||||
const volatile uint32_t ram_start = (uint32_t) &Image$$RW_IRAM1$$Base;
|
||||
#elif defined ( __ICCARM__ )
|
||||
|
|
@ -474,7 +474,7 @@ uint32_t softdevice_enable(ble_enable_params_t * p_ble_enable_params)
|
|||
uint32_t err_code;
|
||||
uint32_t app_ram_base;
|
||||
|
||||
#if defined ( __CC_ARM )
|
||||
#if defined ( __CC_ARM ) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$RW_IRAM1$$Base;
|
||||
const volatile uint32_t ram_start = (uint32_t) &Image$$RW_IRAM1$$Base;
|
||||
#elif defined ( __ICCARM__ )
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ extern "C" {
|
|||
*
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_START_SYMBOL(section_name) section_name ## $$Base
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ extern "C" {
|
|||
*
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_END_SYMBOL(section_name) section_name ## $$Limit
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ extern "C" {
|
|||
*
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_LENGTH(section_name) \
|
||||
((uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name) - (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name))
|
||||
|
|
@ -137,7 +137,7 @@ extern "C" {
|
|||
*
|
||||
* param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_START_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_START_SYMBOL(section_name)
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ extern "C" {
|
|||
*
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_END_ADDR(section_name) (uint32_t)&NRF_SECTION_VARS_END_SYMBOL(section_name)
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ extern "C" {
|
|||
*
|
||||
* @warning The data type must be word aligned to prevent padding.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_CREATE_SECTION(section_name, data_type) \
|
||||
extern data_type * NRF_SECTION_VARS_START_SYMBOL(section_name); \
|
||||
|
|
@ -216,7 +216,7 @@ extern "C" {
|
|||
* @param[in] section_name Name of the section.
|
||||
* @param[in] section_var The variable to register in the given section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_REGISTER_VAR(section_name, section_var) \
|
||||
static section_var __attribute__ ((section(#section_name))) __attribute__((used))
|
||||
|
|
@ -246,7 +246,7 @@ extern "C" {
|
|||
* @param[in] data_type Data type of the variable.
|
||||
* @param[in] section_name Name of the section.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
|
||||
#define NRF_SECTION_VARS_GET(i, data_type, section_name) \
|
||||
(data_type*)(NRF_SECTION_VARS_START_ADDR(section_name) + i * sizeof(data_type))
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ uint32_t softdevice_enable(ble_enable_params_t * p_ble_enable_params)
|
|||
uint32_t err_code;
|
||||
uint32_t app_ram_base;
|
||||
|
||||
#if defined ( __CC_ARM )
|
||||
#if defined ( __CC_ARM ) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
|
||||
extern uint32_t Image$$RW_IRAM1$$Base;
|
||||
const volatile uint32_t ram_start = (uint32_t) &Image$$RW_IRAM1$$Base;
|
||||
#elif defined ( __ICCARM__ )
|
||||
|
|
|
|||
Loading…
Reference in New Issue