Questions tagged [iar]

IAR is a company that specialize in creating development tools for embedded systems. This tag focuses on the IAR C/C++ compiler, IDE and runtime analysis tools.

IAR, 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 debugger tool suite for applications based on 8-, 16-, and 32-bit MCUs
  • C-RUN: Runtime analysis tool for detecting data type casting, integer overflow and memory management errors
  • C-STAT: Static analysis tool with support for MISRA-C, CWE and CERT rules
  • IAR visualState: tools for designing, testing and implementing embedded applications based on state machines.
565 questions
4
votes
3 answers

MISRA C:2004, error with bit shifting

I'm using IAR Workbench compiler with MISRA C:2004 checking on. The fragment is: #define UNS_32 unsigned int UNS_32 arg = 3U; UNS_32 converted_arg = (UNS_32) arg; /* Error line --> */ UNS_32 irq_source = (UNS_32)(1U << converted_arg); The MISRA…
Thomas Matthews
  • 52,985
  • 12
  • 85
  • 144
4
votes
1 answer

Change DWARF elf format in IAR ARM V8 compiler

In our development, we switched from IAR ARM V7.40 to IAR ARM V8.40 We are using the python package pyelftools for postprocessing of the debug information. Unfortunately, this seems to be broken now, as the V8-compiler seems to use DWARF4 syntax,…
meddle0106
  • 1,232
  • 1
  • 11
  • 20
4
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
  • 41
  • 2
4
votes
1 answer

Error[Pe020]: identifier "FILE" is undefined in IAR Workbench

// Preprocessor directive mention in <> formate : #include "stdio.h" #include "stdlib.h" #include "math.h" #include "string.h" #include "limits.h" #include "stddef.h" #include "stdint.h" ... int main() { FILE *fin, *fout; //Error[Pe020]:…
Pratik
  • 43
  • 1
  • 5
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
  • 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
  • 2
  • 13
4
votes
2 answers

How can I configure Ceedling for an IAR Embedded Workbench project?

I'm trying to develop a new feature for an embedded application and I'd like to do so using a test-driven approach. The project is written in pure C and is being developed using IAR Embedded Workbench 6.60.1.5104. I'm targeting an LPC1788, which is…
Tagc
  • 7,701
  • 6
  • 47
  • 99
4
votes
2 answers

Typical gitignore files for IAR project

I am working on IAR project, and my problem is which file in an IAR project can be ignored by git repository. All the project setting files and source files mixed together in git log is veeery boring and is not good for version control, could anyone…
roMoon
  • 199
  • 1
  • 4
  • 12
4
votes
0 answers

IAR window layout

Is there a way to save your IAR window layout? Every time I start a debug session it fills my screen 9 different windows. I would be happy with 3 and a few tabs but I have to rearrange things every time. I don't see an obvious way to save them and…
lusher00
  • 648
  • 1
  • 6
  • 17
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
  • 365
  • 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,133
  • 1
  • 12
  • 30
4
votes
1 answer

STM32 IAR no ITM trace output unless printf is included in the code

I have a small project that I added my own custom debug functions to so I could have some extra functionality. They have been working great, and use the following method to send the data: while(*bp) ITM_SendChar(*bp++); I finally got around to…
RobC
  • 432
  • 3
  • 14
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
  • 52,985
  • 12
  • 85
  • 144
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
3 answers

Embedded C: Registers Access

Suppose we want to write at address say 0xc000, we can define a macro in C as: #define LCDCW1_ADDR 0xc000 #define READ_LCDCW1() (*(volatile uint32_t *)LCDCW1_ADDR) #define WRITE_LCDCW1(val) ((*(volatile uint32_t *)LCDCW1_ADDR) = (val)) My…
Gaurav K
  • 2,698
  • 6
  • 33
  • 60
1 2
3
37 38