Questions tagged [compiler]

A compiler transforms code written in a source language to a (binary) target language.

Filter by
Sorted by
Tagged with
0
votes
2answers
106 views

Prevent compiler optimization for memory access in reflashable memory area

I am working with an embedded software in which part of the software(some CONST config values) are reflashable, without modifying the application software. Consider the following code: ...
3
votes
2answers
76 views

How to solve Keil compiler 'Error: L6218E: Undefined symbol' on STM32

I am trying to run a simple tutorial (external interrupt example) on my NUCLEO-F746ZG board. I use STM32CubeMx software version 5.2.0 and Keil software version 5.28.0.0 as compiler. I get the ...
1
vote
0answers
58 views

How to specify in the project or firmware of the application, where to start writing the code?

I have a bootloader to PIC18F4550 that was written using Mikro C for PIC and I have two firmware applications, one was written using Mikro C for PIC and the other using MPLAB X with XC8 compiler. With ...
2
votes
1answer
42 views

How to include paths for the C compiler in atmel studio?

I have a folder project and it consists of multiple folder and .c and .h files what is the best way to include them all without including the individual folders?
0
votes
1answer
62 views

Application and bootloader written in different tools can not be compatible?

I have a bootloader to PIC18F4550 that was written using Mikro C for PIC and I have two firmware applications, one was written using Mikro C for PIC and the other using MPLAB X with XC8 compiler. ...
4
votes
1answer
199 views

Moving brute-force search to FPGA

I am currently working on a scientific hobby project about computing the error detection capabilities of CRCs. Unfortunately the C++ code used for such computations has up to years of run time on ...
2
votes
4answers
154 views

How can we determine memory usage of a microcontroller

How can we determine how much memory is being used, or will be used by firmware in a microcontroller? What tools can support this? Generally we don't use dynamic memory in embedded systems, but how ...
0
votes
0answers
71 views

Elaborating a VHDL design with Generics

So this query is related to DC synthesis compiler for digital design. I have a hierarchical VHDL design, with each entity having "Generics". When elaborating the design, should I add the -parameters ...
0
votes
1answer
92 views

difference between CMSIS and ASF

im trying to make c++ project using atmel asf. the compiler have: ...
1
vote
2answers
82 views

What comes after you have programmed a Bluetooth Low Energy chip with Nordic SDK and are ready for deployment?

I am working on this project with bluetooth low energy and it seems I will have to order the Nordic Semi DK kit for one of their nRF51 series chips. I am just curious (and an amateur at this), once ...
1
vote
2answers
60 views

Memory allocation of constants and statics in structure?

I am working on IIR Filter implementation where I am initializing filter coefficients and memory (form-2 w) memory as follows. ...
-1
votes
1answer
199 views

Using compiler directives and macros in verilog, how to use multiple macros conditionally in verilog?

I have 2 macros in verilog used them as below. ...
0
votes
1answer
42 views

Altium compiler gives error on old designator

Whenever I change a designator in the schematics, the old designator will be placed in grey between parenthesis behind the new one. For some sort of reason Altium decided to give errors on the old ...
0
votes
1answer
284 views

Renesas Compiler: KPIT vs GCC-Renesas (CyberThor)

When looking around at Renesas (RL78) compilers, I noticed GCC mentioned a decent amount, but the links are different. Many of the older (<= 2015) URLs point to an India company, KPIT, and is ...
1
vote
2answers
165 views

What is the difference between the different types of PIC compilers?

What is the difference between the different types of pic compilers such XC, Hi Tech etc?
0
votes
0answers
139 views

Using C++ objects within FreeRTOS Tasks

I'd like to make use of object-oriented practises inside a FreeRTOS application. Is this as simple renaming files with task functions as .CPP, and instantiating objects, etc. inside the function, ...
12
votes
2answers
2k views

What is 'unsigned char near'?

I read a datasheet and I found variable defined as unsigned char near Sample_X. What is this, and how does this differ from ...
2
votes
1answer
105 views

How does the ARM Compiler (Version 5) handle double-precision floats in devices whose floating-point unit hardware only supports single precision?

After reading ARM Compiler version 5's manual, it says that for devices without a floating point unit, floats are dealt with through software implementations, which is likely going to be slower than ...
0
votes
2answers
405 views

STM32 Simple Timer in Eclipse

EDIT: Edited in response to question in comment (1) I'm trying to work through some examples from Carmine Noviello's book, Mastering STM32. In the chapter introducing timers, I adapted his very ...
1
vote
0answers
193 views

Syntax error(10500) when compiling VHDL code: near text “when”, expecting “:”

I want to compile my code but I get multiple errors surrounding a statement which is repeated several times in the architecture. The error message (Error 10500) says a ":" is missing near "when" but ...
1
vote
1answer
548 views

Assembler basic question : translation to machine code

How does a assembler (at very basic level) work in translation of Assembly language to machine code ? [What my understanding is that when a Programme is written it is written in text and then ...
-5
votes
1answer
100 views

The interface between the abstract assembly instructions and the physical electrical logic in the processor [closed]

I just learned that there is an interface between the abstract assembly instructions and the physical electrical logic in the processor. Can someone please explain that interface to me ?(I Hope I ...
2
votes
1answer
126 views

Synopsys Synthesis with underlying modules as gate libraries

I am trying to synthesize my Verilog modules into 1 top module which contains all the modules extracted into 1 top module. With setting -hierarchy option in write_file, I get all the modules ...
3
votes
1answer
782 views

Execution time problem of Memset() function in C

I have a typedef struct that stores my cumulative ADC parameters. When I clear my ADC_Sum struct it takes less than 300 ns to achieve the clearing process between size 1-8. But when size is ...
1
vote
1answer
441 views

What ISA is used by Cortex-M/R/A and what compilers are available? [closed]

What ISA is used by Cortex-M/R/A? What is the difference between arm-none-eabi and arm-elf-gcc? Are there any other compilers for ARM devices worth mentioning?
0
votes
1answer
852 views

Divide 32-bit by 16-bit number on a dsPIC

I'm working with a dsPIC33EP64GS506, and here you can find its datasheet: link. In the dsPIC datasheet (page 294) it says that it supports 4 divide instructions: <...
2
votes
1answer
220 views

XC32 optimizes vaiable used for register reading

I am facing a problem with XC32 compiler's optimization. Whenever I write a function to read something from register, XC32 optimizes (read: Removes) the variable which holds the return value. I have ...
0
votes
3answers
443 views

Purpose of linker files in placing code in internal flash [closed]

How linker file has to be programmed to place a code in internal flash?how linker filer files are different for different compilers?
4
votes
1answer
1k views

Using XC8 compiler instead CCS [closed]

I'm programming PIC with CCS. It's quite simple and functional. It's libraries are the best. Recently, I look for XC8 compiler, from Microchip. What are the advantages of using XC8 instead CCS?
3
votes
2answers
2k views

Makefile for STM32

I want to write code in just a text editor (not an IDE) and then build it with a simple Makefile. I've got: small STM32F103 board ST-Link/V2 SWD programmer gcc-arm-none-eabi toolchain stlink ...
2
votes
0answers
166 views

Operator synthesis VHDL, numeric_std.vhd

if i include the library numeric_std.vhd (the implementation is here https://standards.ieee.org/downloads/1076/1076.2-1996/numeric_std-body.vhdl) you can see that the operator *,+ (as instance are ...
1
vote
0answers
62 views

Using different compilers in same vhdl project

I am currently working on a mips microprocessor for one of my class using modelsim's tools. I want to be able to work on the same projet whether I'm at home on my windows pc or on the go with my ...
1
vote
1answer
2k views

DATA_ALIGN Pragma - Tiva

What is the purpose of a pragma Data_Align in TI emb. compiler. The datasheet explanation: http://www.ti.com/lit/ug/spnu151j/spnu151j.pdf "The DATA_ALIGN pragma aligns the symbol in C, or the next ...
8
votes
5answers
6k views

What do I need to put my code onto a microcontroller?

I learned about coding a controller, but never actually put the code on the physical device. I am trying to figure out what I need to order to start developing a basic embedded system. For example, ...
3
votes
1answer
172 views

AVR bit manipulation compilation in GCC: can not get SEI instead of read-modify-write

I'm trying to set bit 2 in TIMSK register and using the following C code: TIMSK |= (1<<2); Compiler makes the following code: ...
16
votes
12answers
6k views

Could you program a microcontroller without a computer?

Let's say you had a rather simple and small microcontroller and had no interfacing, no computer, no debugger, compiler, or assembler. Could you write your code in assembly, convert it (manually) to ...
1
vote
2answers
2k views

Why does MPLAB IDE has so many compilers?

I have learnt that the MPLAB IDE has different compilers like C18, XC8 and HI-Tech. I want to know the following things: Why are there different compilers when one can do the job? Are certain ...
2
votes
3answers
155 views

Courses about deploying Linux on embedded systems

I am a new grad student in EE and am trying to take full advantage of my time here at the uni. I have always wanted to understand how to get Linux running on embedded platforms, but from the outside ...
6
votes
4answers
11k views

Toolchains for STM32CubeMX IDE: what to choose from?

I just installed the STM32CubeMX (original ST Microelectronics's ARM IDE if I understand right). Once installed I tried to open a new project for a DISCOVERY kit I have (STM32F0DISCOVERY). Howether ...
-4
votes
1answer
391 views
8
votes
1answer
3k views

How does the call stack operated during an interrupt on AVR?

(Specific to the Arduino Uno...) What happens to the stack when an interrupt occurs on an AVR microcontroller and I call a function? Does the compiler inline the code? Does it cache the stack ...
2
votes
1answer
14k views

'undefined reference to' errors trying to compile with Make

I had a working Makefile that successfully compiled and built a basic program to toggle and LED on my stm32-h103 board. I have since attempted to add and use FreeRTOS in my program. I have added in ...
1
vote
1answer
116 views

Compilers for STM32F303x [closed]

Does anyone have any suggestions for C/C++ compiler/debugger for this chip, initially via ST-LINK on a Discovery board? I am currently using IAR EWARM but am not particularly happy with it.
2
votes
2answers
854 views

How can I bind a local variable to AVR's rXX register?

I need to have programmable pause with precision as high as possible. To accomplish this I have the following GCC code: ...
3
votes
3answers
641 views

Frequently used functions, performance improvements using static variables?

Does defining variables (large arrays) as static inside a function have any performance improvements if the function is to be called repeatedly say in the order of seconds?
1
vote
1answer
2k views

Regarding Microchip XC8 compiler's registers and bits definitions

I'm going to take a random 8-bit Microchip microcontroller: PIC16F887. Let's have a look at how the XC8 compiler (and the HI-TECH PICC, for that matter) is defining a register (SFR) and its ...
0
votes
1answer
330 views

The MDK-5 (Keil-5) cannot build my project!

I'm trying to build my project but the MDK-5 give me this error: And also as you can see, in target you just can see Xtal. What happened? What's the problem?
2
votes
1answer
3k views

How can I stop MPLAB X from hanging between build and program?

I've been using MPLAB X and XC16 to build and program projects for a dsPIC 33EP128MC506 for about a year now. For the last two months, I've seen some new and unusual behavior on two separate machines. ...
2
votes
1answer
1k views

Purpose of ARM Linker Files

I would like to know what is the purpose of ARM scatter file and ARM Linker address MAP file ? How do they help in compilation and eventually during loading of the executable ?
2
votes
2answers
987 views

Using the arduino toolchain as a convenent way to get GCC - Can you disable the code-munging?

I've been using the Arduino toolchain as a extremely convenient way to get a complete GCC toolchain and build-system with basically zero effort a lot recently. However, I'm currently working on some ...