Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [compiler]

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

4
votes
1answer
184 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
116 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
56 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
63 views

difference between CMSIS and ASF

im trying to make c++ project using atmel asf. the compiler have: ...
1
vote
2answers
77 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
57 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
131 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
37 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
226 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
134 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
93 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
92 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
358 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
181 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
524 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
99 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
115 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
727 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
385 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
792 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
211 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
435 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
1k 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
161 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
61 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
1k 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
166 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
153 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
10k 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
370 views
7
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
13k 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
834 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
623 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
314 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
970 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 ...
2
votes
1answer
1k views

IAR EWARM gives error on everything in startup_stm32

I'm trying to compile a project for school, which all my fellow classmates have no trouble compiling. This assignment is nothing more than dragging already written source code and compiling an, ...
3
votes
3answers
809 views

Exact recreation of Xilinx FPGA binaries from source control

I'm software developer in a small shop where there's only been one EE guy responsible for a series of FPGA designs spanning a decade, almost all of which target the Spartan line, specifically the ...
7
votes
2answers
16k views

How different is the Arduino language than Atmel Studio language? [closed]

I see that on the official Arduino website, the reference page contains the functions and vales you would use specified to the Arduino compiler. http://arduino.cc/en/Reference/HomePage What would ...
2
votes
0answers
450 views

dsPIC30F: Link assembler project with XC16 in command line mode

I have an assembler project that compiles and links fine with MPLABX. Now I am trying to build it from the command line. Attempt to use the command line from MPLABX fails. When I am calling: C:\...
1
vote
2answers
2k views

How does a specific pin in a port change its state (PIC Microcontroller)? Software vs Hardware

How does, for instance PortB.B0 = 1; command change the state of a specific pin in a microcontroller. Microcontroller usually has a 8 bit data line, meaning it will write and read from the entire ...