C-RUN - Non-checked code (bounds checking)

Technical Note 93670



10/14/2015 3:45 PM


Sometimes you cannot enable bounds checking in the entire application, for example if some part of the application is an externally built library, or is written in assembler. This leads to error(s) from C-RUN.


The "#pragma default_no_bounds" can be used for applying #pragma no_bounds to a whole set of functions, for example around a header file declaring the interface to unchecked code. It can look like:

#pragma default_no_bounds=on
#include "XXXX_RTOS.h" /* no pointer bounds are passed to functions declared for the XXXX_RTOS */
#pragma default_no_bounds=off

Alternative solution for CMSIS

It is possible to write source that is a layer between instrumented and non-instrumented code. The IAR Embedded Workbench for ARM installation holds the file


This file needs to be included in a CMSIS-project. The file needs to be compiled with --runtime_checking bounds, that is, "Instrumentation > Track pointer bounds > Check accesses" must be selected (for at least the file cmsis_dsplib.as.c).

 All product names are trademarks or registered trademarks of their respective owners.

Related Tech Notes

© IAR Systems 1995-2017 - All rights reserved.