Update compiler.h to support IAR compiler

This commit is contained in:
Aleksandr Vyhovanec 2016-04-02 06:24:36 -06:00 committed by Gregory Nutt
parent a6fff34ec6
commit 3770b69572
2 changed files with 41 additions and 2 deletions

2
arch

@ -1 +1 @@
Subproject commit d4b38f65ddc36f3086aee529b3418a3abbae3c96
Subproject commit f0c71ad73547a2c5305af5cd91dab496fd5ae54f

View File

@ -1,7 +1,7 @@
/****************************************************************************
* include/nuttx/compiler.h
*
* Copyright (C) 2007-2009, 2012-2013, 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2009, 2012-2013, 2015-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -472,6 +472,45 @@
# define CONFIG_CAN_PASS_STRUCTS 1
/* ICCARM-specific definitions ***********************************************/
#elif defined(__ICCARM__)
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
# define CONFIG_HAVE_FILENAME 1 /* Has __FILE__ */
# define CONFIG_HAVE_FLOAT 1
/* Indicate that a local variable is not used */
# define UNUSED(a) ((void)(a))
# define weak_alias(name, aliasname)
# define weak_function __weak
# define weak_const_function
# define noreturn_function
# define farcall_function
# define packed_struct
# define reentrant_function
# define naked_function
# define inline_function
# define noinline_function
# define FAR
# define NEAR
# define DSEG
# define CODE
# define IPTR
# define __asm__ asm
# define __volatile__ volatile
/* For operatots __sfb() and __sfe() */
# pragma section = ".bss"
# pragma section = ".data"
# pragma section = ".data_init"
# pragma section = ".text"
/* Unknown compiler *********************************************************/
#else