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

Place segments of external static library to specific locations

My application calls some functions which are placed in an external static library. I link the external static library to my application and everything works (in this case I'm using GCC). Nevertheless, the locations (addresses) of text, .data and…
HBv6
  • 3,487
  • 4
  • 30
  • 43
7
votes
3 answers

C compiler bug or program error?

I am using the IAR C compiler to build an application for an embedded micro (specifically a Renesas uPD78F0537). In this application I am using two nested for loops to initialize some data, as shown in the following MCVE: #include #define…
Grodriguez
  • 21,501
  • 10
  • 63
  • 107
7
votes
2 answers

How to stop optimizer discard unused variables?

I would like to debug my code and can't access the internal layer in the process since this would disturb the communication with the hardware. (volatile operations are performed where the watchlist would interfere with the basic read accesses.) So…
dhein
  • 6,431
  • 4
  • 42
  • 74
7
votes
2 answers

My embedded application never finishes init to get to main() due to watchdog (IAR/MSP430)

I'm using an MSP430 chip with 10K of RAM. If I go above 5k of RAM usage, it's never capable of making it to main(). The init code calls __data20_memzero to clear out the used RAM space. It look like it increments through memory and clears bytes…
reza
  • 1,329
  • 2
  • 22
  • 37
7
votes
1 answer

Advice for running IAR Embedded Workbench for Arm with Dongle in Linux

I am running Ubuntu 10.04 and Wine 1.2. I was able to install the IAR software but it is unable to locate the dongle license. Is there anyway to use a dongle license in Wine with Ubuntu or do I have to use a PC license? Thanks in advance..
Cameron Peterson
  • 71
  • 1
  • 1
  • 3
6
votes
2 answers

How to reference segment beginning and size from C code

I am porting a program for an ARM chip from a IAR compiler to gcc. In the original code, IAR specific operators such as __segment_begin and __segment_size are used to obtain the beginning and size respectively of certain memory segments. Is there…
tomsgd
  • 1,080
  • 1
  • 11
  • 24
6
votes
4 answers

How to configure Visual Studio Code to build a project with IAR compiler?

I want to use Visual Studio Code as my main IDE, but I want to compile my code with IAR's compiler. How could I configure VSCode ? I found this extension but the documentation is too poor.
Nymau
  • 134
  • 1
  • 9
6
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
  • 339
  • 1
  • 5
  • 12
6
votes
2 answers

How resolve a warning in IAR 'Reset_Handler'

I'm using IAR ARM 7.10 and getting a warning: Warning[25]: Label 'Reset_Handler' is defined pubweak in a section implicitly declared root... It is cause the system reset sometimes. How do I resolve this warning?
user3428151
  • 449
  • 6
  • 23
6
votes
2 answers

IAR Embedded workbench create library

I want to create a simple library (C/ANSI) in IAR Embedded Workbench and then use the library in another project. I found some documentation on their website. Although I do not understand it entirely, I managed to make myself a .r90 file and from…
Teo
  • 3,394
  • 11
  • 43
  • 73
5
votes
1 answer

How to tell CMake to pass no duplicate libraries in the link command

I have a circular dependency between the two static libraries libA and libB: add_library(LibA STATIC a.c) add_library(LibB STATIC b.c) # Circular dependency: LibA <-> LibB target_link_libraries(LibA PRIVATE LibB) target_link_libraries(LibB PRIVATE…
5
votes
1 answer

UNION-type-punning error in IAR CSTAT Analyse

I have a this type structure in example.h file like this: typedef union{ uint16_t valNum; struct{ uint8_t valNumH; uint8_t valNumL; }; } valueExp; And I am using this structure in example.c file: uint16_t myFunction(uint16_t tempData){ uint8_t…
hobik
  • 439
  • 4
  • 15
5
votes
1 answer

How to convert IAR .ewp to LSP compile_commands.json database

I am on the quest of creating a compile_commands.json database from my IAR .ewp project. This would allow me to use intelligent LSP autocompletion (ccls) and proper semantic highlighting (vim-lsp-cxx-highlight) from my vim setup. I understand that I…
davidanderle
  • 638
  • 6
  • 12
5
votes
1 answer

How to apply the `__ramfunc` instrinsic to a constructor?

I need to put all my code in ram (I'm writing the flash). I'm using IAR 7.80 and everything works fine with the __ramfunc intrinsic on every function but not for the C++ constructors. For example I have the following class: class Os_Timer { …
Ramon La Pietra
  • 609
  • 7
  • 13
5
votes
2 answers

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
  • 53
  • 1
  • 6
1
2
3
42 43