Questions tagged [iar]

IAR Systems supplies software development tools and services that make embedded systems fast, efficient and reliable for companies worldwide. This tag focuses on the IAR C/C++ Compilers, IDE and code quality analysis tools.

IAR Systems, an embedded system technology company founded in Sweden in 1983, specialize in creating development tools for embedded systems. Products include:

  • IAR Embedded Workbench: C/C++ compiler and a state-of-art debugger for developing applications targetting microcontrollers ranging from the smallest 8-bit devices up to high-performance 64-bit architectures from more than 70 silicon vendors.
  • IAR C-STAT: Static analysis add-on with support for MISRA-C, CWE and CERT rules
  • IAR C-RUN: Runtime analysis add-on for detecting data type casting, integer overflow and memory management errors
  • IAR Build Tools: All the build tools components from the Embedded Workbench for building from the command line, ideal for Continuous Integration and Modern Developent Workflows. Now also available for Linux.
  • IAR Visual State: tools for designing, testing and implementing embedded applications based on state machines.
638 questions
106
votes
8 answers

How to specify a compiler in CMake?

I would like to use the IAR compiler. I noticed CMake has already have a bunch of files about this compiler: https://github.com/jevinskie/cmake/blob/master/Modules/Compiler/IAR.cmake From what I read the common solution is to specify manually ALL…
nowox
  • 25,978
  • 39
  • 143
  • 293
66
votes
11 answers

Command Prompt Error 'C:\Program' is not recognized as an internal or external command, operable program or batch file

I am trying to run the following batch command. The command has been extracted from the IDE so is confirmed working. Getting the error mentioned below. I have tried a few variations with double quotes but they haven't worked. Even on powershell it…
Rohan Sharma
  • 1,416
  • 2
  • 14
  • 19
31
votes
3 answers

Compiler optimization of bitwise not operation

I have a simple function testing if two arrays are each others inverse. They are seemingly identical, except for a tmp variable. One works the other doesn't. I can't for the life of me figure out why the compiler would optimize this out - if it…
SupAl
  • 517
  • 3
  • 12
29
votes
3 answers

Access symbols defined in the linker script by application

In my linker script file, I have defined two symbols define symbol _region_RAM_start__ = 0xC0000000; define symbol _region_RAM_end__ = 0xC00fffff; and then I have exported them as well as shown below export symbol…
ka05
  • 594
  • 1
  • 5
  • 12
13
votes
2 answers

How to display an array range via a pointer in the IAR IDE Watch window?

In the IAR Embedded Workbench I have a pointer pointing to a buffer in memory. When watching the pointer, I can see the contents of the word it points to. How can I tell the Watch view to list a range of the buffer, from the pointer onwards, for…
ysap
  • 7,723
  • 7
  • 59
  • 122
9
votes
4 answers

Update RTC on STM32F4 when flashing the uC

Is there a way to update the RTC with computer information when the program is uploaded on the STM32F4 ? For example, the information of date and hour on the computer is: 12h40 11/09/2018, and when I flash the microcontroler with IAR/AC6, then the…
EmilG
  • 91
  • 3
9
votes
0 answers

Can IAR produce a static library that GCC can link to?

There is a vendor whose software I'd like to work with. They have a code base which they can only compile using IAR Embedded Workbench (as far as I know, their code does not compile with GCC). Unfortunately their hardware only works with their…
Venemo
  • 18,515
  • 13
  • 84
  • 125
9
votes
1 answer

Strange definition in C with @ sign

I have come across following definition in an embedded C source file: const preamble_t OAD_Preamble @ ".preamble" = { HAL_OAD_RC_MAX, // Default program length of max if not using post-processing tool. OAD_MANUFACTURER_ID, // Manufacturer…
doubleE
  • 1,027
  • 1
  • 12
  • 32
9
votes
4 answers

I am at the point I need to purchase IAR, Code Composer 4, or something else for MSP430 development

I have been using IAR so far, but it crashes sometimes and doesn't have code completion. Also, the other dev environments I use are eclipse based. Which one should I buy?
michael
  • 2,577
  • 5
  • 39
  • 62
9
votes
4 answers

Casting enum definition to unsigned int

According to this SO post: What is the size of an enum in C? enum types have signed int type. I would like to convert an enum definition from signed int to unsigned int. For example, on my platform an unsigned int is 32-bits wide. I want to…
Thomas Matthews
  • 56,849
  • 17
  • 98
  • 154
8
votes
1 answer

What does BREAK mean in real terms while using a UART?

The break and error indication glows up in real terms while communicating with RS-232. Sometimes, the CTS is also will be glowing. Due to this, the data in prints as junk for some time; later it gets corrected after a few reset of real term. This…
MVA
  • 93
  • 1
  • 1
  • 7
8
votes
1 answer

Is there any reason to declare something "volatile const" in C but only "volatile" in C++?

I was using a header file in my project that had the following define(s): #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus #define __I volatile /*!< Defines 'read only' permissions*/ #else #define __I …
SoftwareDev
  • 674
  • 1
  • 6
  • 14
8
votes
2 answers

Are static c libraries created with one compiler compatible with another?

In my case I have a library built with code sourcery gcc targeting arm cortex-m4. I am trying to then link that library into a project being compiled with IAR compiler. Is it possible to do this or does the library have to be rebuilt with the new…
Brandon Yates
  • 2,022
  • 3
  • 22
  • 33
8
votes
1 answer

Error[Pe513]: a value of type "void *" cannot be assigned to an entity of type "uint8_t *"

I am attempting to convert a C project into C++. In the C project I countered this error while compiling into c++: Error[Pe513]: a value of type "void *" cannot be assigned to an entity of type "uint8_t *" The following code gives this…
andre
  • 7,018
  • 4
  • 43
  • 75
7
votes
4 answers

Alignment of C structure in Internal FLASH memory

I have a configuration structure I would like to save on the internal flash of ARM cortex M3. According to the specifications, the data save in the internal flash, must be aligned to 32bit. Because I have lot's of boolean, and chars in my…
stdcall
  • 27,613
  • 18
  • 81
  • 125
1
2 3
42 43