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
3
votes
7 answers

STM32 printf and RTC

* UPDATE * Here is what I found. Whenever I had that function in there it wouldn't actually make the code lock up. It would actually make the read RTC I²C function very slow to execute, but the code would still run properly, but I had to wait a…
jramirez
  • 8,537
  • 7
  • 33
  • 46
3
votes
2 answers

pointers in the IAR compiler

Long story short I have this in C using the IAR EWARM compiler. uint8_t packet[2048]; uint32_t* src = (uint32_t*)&packet[9]; uint32_t var = *src++; That last line causes a bus fault. uint8_t packet[2048]; uint32_t* src =…
lusher00
  • 678
  • 1
  • 7
  • 18
3
votes
2 answers

Importing source files and folders into IAR Workbench

I have a cup of source files in a certain folder structure in my file system. I want to use this structure for a project in the IAR Workbench. Thinking of Eclipse, that could be so easy! But in the IAR Workbench, the folders will become to "Groups",…
momjovi89
  • 89
  • 1
  • 1
  • 6
3
votes
1 answer

How to compile Google Test using IAR compiler for ARM

I am trying to compile Google Test Framework using IAR compiler for ARM, but I face difficulties related to the lack of system libraries such as pthread. Has anybody been able to compile Google Framework using IAR compiler for ARM?
Irr
  • 656
  • 1
  • 9
  • 19
3
votes
4 answers

IAR project variable like $PROJ_DIR$

Is there any possibility in IAR to add additional project variable like $PROJ_DIR$ to specify my project environment? I like to keep my project portable and adaptable.
rideyourstyle
  • 39
  • 1
  • 1
  • 8
3
votes
2 answers

Defining integer in C resolves to unsigned char, or produces unexpected behavior in case of math operations

I am working on a micro-controller and I want to implement a simple average filter on the resulted values to filter out noise (or to be honest to not let values dance on LCD!). The ADC result is inserted into memory by DMA. I have (just for sake of…
Dumbo
  • 13,555
  • 54
  • 184
  • 288
3
votes
3 answers

Declaration is incompatible

I was working with IAR Embedded Workbench, using C language. I had some trouble while dividing my project into the usual main/.h/.c form. For example, if i create an example.h #ifndef EXAMPLE_H #define EXAMPLE_H void function(int [],…
EagleOne
  • 541
  • 1
  • 10
  • 28
3
votes
1 answer

How to insert a memory barrier using IAR?

How does one insert a compiler level memory barrier using IAR embedded workbench for ARM? The equivalent in GCC would be asm volatile ("" : : : "memory") The words barrier and fence are absent from the User Guide.
LogicG8
  • 1,767
  • 16
  • 26
3
votes
1 answer

STM32F1 timer share for PWM and interrupt

i'm implementing a project using stm32f101cb microcontroller. I understand that this control have 3 timer in it. TIM2 and TIM4 had been set to encoder mode to capture 2 rotary encoder. I'm now left me the only timer TIM3, I would to ask is there…
chris chiang
  • 31
  • 1
  • 4
3
votes
2 answers

Bitwise operation with (signed) enum value

I am using enumerator values for flags: typedef enum { a = 0x00, b = 0x01u, // the u has no influence, as expected c = 0x02u, // the u has no influence, as expected ... } enum_name; volatile unsigned char* reg = SomeAddress; *reg |=…
lkanab
  • 924
  • 1
  • 7
  • 20
3
votes
4 answers

Batch build using IAR tools

I am trying to do a batch build of a project using IAR tools. The processor is a CC2530, and it builds fine in the IDE. I have followed the documentation for batch build (Project/Batch Build) and created a .cspy file that is suppose to be my batch…
Jim Tshr
  • 357
  • 1
  • 3
  • 10
3
votes
1 answer

How to suppress warning (converted from error) in IAR EWARM 5.4

I had a macro for logging that accepts a variable number of arguments. This macro will be processed by GCC in a non-embedded context, and expands to valid C code. Despite this, IAR EWARM gives the error "[Pe054]: too few arguments in macro…
user3738848
3
votes
2 answers

Can the IAR command line tool "iarbuild" do a build all?

From the IAR command line, it's easy to build a particular configuration, and obviously, if I want to mimic the "build all" behavior I just run my own batch file with the configs I want. How do I handle the case where I want to build all configs,…
Kris
  • 33
  • 1
  • 5
3
votes
3 answers

Writing IAR output to ARM chips without IAR

We currently hold a full license for the IAR EWARM IDE but we need to upload firmware to units being made meaning only one person can do the uploading as the application is way over the kickstart size. I'm wondering if there is an alternative method…
TuxFan
  • 33
  • 3
3
votes
1 answer

"Inline assembler instruction does not have a unique size" ARM Thumb-2 IAR

I am having a problem with inline assembly with the IAR compiler for ARM, Cortex-M4. Here is a simple example of my problem; put the following code in a file, say, named test.c void irqrestore(int flags) { asm volatile( "tst %0, #1\n" …
Bob
  • 587
  • 8
  • 17