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
4
votes
1 answer

How do I plot an xml callgraph generated by IAR Embedded Workbench?

In IAR Embedded Workbench (v 8.40.1.21539), I have enabled Project => Options => Linker => Advanced => Enable stack usage analysis and have specified "callgraph.xml" as the Call graph output (XML) file. IAR has now produced a lovely (huge) xml…
fearless_fool
  • 33,645
  • 23
  • 135
  • 217
4
votes
1 answer

How do I change IAR Workbench to use a dark theme?

I want to change the theme of IAR Workbench to a dark one. Another post says it uses Windows' theme. I just changed Windows 10 to dark mode, but IAR is still light. Does anyone have any ideas on how to set IAR Workbench to a darker theme?
Findus
  • 303
  • 1
  • 4
  • 17
4
votes
2 answers

Is accessing two volatiles in one statement is legal in newer C?

I ran into an "undefined behaviour" warning with IAR compiler for RL78 (v. 1.40.6) with the following code: static volatile int x[2] = {1, 2}; int test(){ return x[0]+x[1]; } Warning[Pa082]: undefined behavior: the order of volatile accesses…
Dmitry Grigoryev
  • 3,156
  • 1
  • 25
  • 53
4
votes
1 answer

Generate IAR code coverage when running C-Spy outside of the IDE

I have a large number of projects, each with at least one automated test suite. The tests are run in IAR's C-Spy simulator. (I am using IAR Embedded Workbench for Arm v6.60.) If I run one of these test executable from the IDE, I can generate and…
Ben Hammen
  • 41
  • 1
  • 3
4
votes
1 answer

Communication with SD Card with STM32 Processor - SDIO protocol

I am using the board Nucleo F401Re based on micro-controller STM32F401RET6. I connected to the board a Micro SD slot, and interested in writing data to the SD Card and read data from it. I used the software STM32CubeX to generate code and in…
Armand Chocron
  • 149
  • 1
  • 4
  • 14
4
votes
1 answer

Is there a way for IAR to build source code with the same name in different directory?

I am working on a project on IAR. The project will integrate a third party middleware source code directory. The directory have the following data sturcture middleware | +--- tool1 | | | +--- tool_imp.c | +---…
Eric Sun
  • 777
  • 6
  • 20
4
votes
1 answer

From CLIB to DLIB: size_t is undefined

I'm trying to link DLIB to a (CLIB) project that I'm working on. It builds fine when linked to CLIB, but I get the following error when linked to DLIB: Error[Pe020]: identifier "size_t" is undefined C:\Texas…
Kar
  • 6,063
  • 7
  • 53
  • 82
4
votes
1 answer

Sublime Text as an external editor for IAR EWB

I've been using IAR EWB for ARM quite a some time now, despite its fiddly IDE features such as code completion and jump to definitions etc. Sometimes they work in IAR editor but most of the times no. GCC+Eclipse is not an option for me as I'm using…
SamR
  • 384
  • 3
  • 12
4
votes
1 answer

Working with typedef enums in structs and avoiding type mixing warnings

I am working with C99. My compiler is IAR Embedded workbench but I assume this question will be valid for some other compilers too. I have a typedef enum with a few items in it and I added an element to a struct of that new type typedef enum { …
Nick
  • 1,361
  • 1
  • 14
  • 42
4
votes
2 answers

Where is formatting buffer for printf?

I working on a constrained embedded system. Presently we use snprintf to a buffer, then with another statement, print the buffer to the serial port: char temp_buffer[256]; int bytes_written = snprintf(temp_buffer, sizeof(temp_buffer), …
Thomas Matthews
  • 56,849
  • 17
  • 98
  • 154
4
votes
1 answer

The stack pointer for stack 'CSTACK' is outside the stack range

I am trying to execute some simple code on the IAR embedded workbench using a simulator. I've complied the code with no warnings or errors but during debugging I get this warning "The stack pointer for stack 'CSTACK' (currently 0x00000000) is…
Rakesh Awanti
  • 41
  • 1
  • 1
  • 3
4
votes
1 answer

Graying out inactive preprocessor directives in IAR Embedded Workbench

Is there a way I can have IAR Embedded Workbench grey out inactive blocks of code within preprocessor conditions? E.g. #ifdef TEST some code #endif So if macro TEST is not defined the "some code" part is somehow greyed out?
dccharacter
  • 421
  • 1
  • 4
  • 14
4
votes
1 answer

Not Understanding ARM Hardware Stacks (using IAR)

I'm currently using IAR Embedded Workbench to do development for an NXP LPC2378 micro. I think I'm running into issues where my IRQ and CSTACK need to be bigger since the CPU keeps crashing and I noticed that these regions would "bleed" over into…
Seidleroni
  • 1,044
  • 3
  • 15
  • 31
4
votes
2 answers

TI MSP430 Interrupt Problems After UART Code Port

I am using the MSP430F2013 processor for an application, which doesn't have a UART. I need a UART, and so I used the TI's sample code "msp430x20x3_ta_uart2400.c" to emulate one using the Timer module. This all worked fine (compiled with IAR Embedded…
Ed King
  • 1,833
  • 1
  • 15
  • 32
4
votes
1 answer

Self-Assignment in ANSI C

I am currently working on a embedded C project and I "inherited" some old code containing statements such as: rxStruct = rxStruct; where rxStruct is a variable. What could be the use of such statements?