1 /*********************************************************************************************************************** 2 * Copyright [2015-2017] Renesas Electronics Corporation and/or its licensors. All Rights Reserved. 3 * 4 * This file is part of Renesas SynergyTM Software Package (SSP) 5 * 6 * The contents of this file (the "contents") are proprietary and confidential to Renesas Electronics Corporation 7 * and/or its licensors ("Renesas") and subject to statutory and contractual protections. 8 * 9 * This file is subject to a Renesas SSP license agreement. Unless otherwise agreed in an SSP license agreement with 10 * Renesas: 1) you may not use, copy, modify, distribute, display, or perform the contents; 2) you may not use any name 11 * or mark of Renesas for advertising or publicity purposes or in connection with your use of the contents; 3) RENESAS 12 * MAKES NO WARRANTY OR REPRESENTATIONS ABOUT THE SUITABILITY OF THE CONTENTS FOR ANY PURPOSE; THE CONTENTS ARE PROVIDED 13 * "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 14 * PARTICULAR PURPOSE, AND NON-INFRINGEMENT; AND 4) RENESAS SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, OR 15 * CONSEQUENTIAL DAMAGES, INCLUDING DAMAGES RESULTING FROM LOSS OF USE, DATA, OR PROJECTS, WHETHER IN AN ACTION OF 16 * CONTRACT OR TORT, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE CONTENTS. Third-party contents 17 * included in this file may be subject to different terms. 18 **********************************************************************************************************************/ 19 /*********************************************************************************************************************** 20 * File Name : bsp_error_checking.h 21 * Description : Contains build time error checking 22 ***********************************************************************************************************************/ 23 24 /*******************************************************************************************************************//** 25 * @ingroup BSP_MCU_COMMON 26 * @defgroup BSP_ERROR_CHECKING Error Checking 27 * 28 * This file performs build time error checking where possible. 29 * 30 * @{ 31 **********************************************************************************************************************/ 32 33 #ifndef BSP_ERROR_CHECKING_H_ 34 #define BSP_ERROR_CHECKING_H_ 35 36 /*********************************************************************************************************************** 37 Includes <System Includes> , "Project Includes" 38 ***********************************************************************************************************************/ 39 #include "bsp_cfg.h" 40 41 /*********************************************************************************************************************** 42 Macro definitions 43 ***********************************************************************************************************************/ 44 /** Stacks (and heap) must be sized and aligned to an integer multiple of this number. */ 45 #define BSP_STACK_ALIGNMENT (8) 46 47 /*********************************************************************************************************************** 48 Error checking 49 ***********************************************************************************************************************/ 50 /** Verify that stack and heap sizes are integer multiples of 8. Stacks and heaps are aligned on 8-byte boundaries so 51 if the size is an integer multiple of 8 then the start of the stack will be 8-byte aligned. This is done because 52 the ARM EABI requires an 8-byte aligned stack. */ 53 #if (BSP_CFG_STACK_MAIN_BYTES % BSP_STACK_ALIGNMENT) != 0 54 #error "Main Stack size is not integer multiple of 8. Please update BSP_CFG_STACK_MAIN_BYTES" 55 #endif 56 57 #if (BSP_CFG_STACK_PROCESS_BYTES % BSP_STACK_ALIGNMENT) > 0 58 #error "Process Stack size is not integer multiple of 8. Please update BSP_CFG_STACK_PROCESS_BYTES" 59 #endif 60 61 #if (BSP_CFG_HEAP_BYTES % BSP_STACK_ALIGNMENT) > 0 62 #error "Heap size is not integer multiple of 8. Please update BSP_CFG_HEAP_BYTES" 63 #endif 64 65 #endif /* BSP_ERROR_CHECKING_H_ */ 66 67 /** @} (end of defgroup BSP_ERROR_CHECKING) */ 68