Questions tagged [compiler]
A compiler transforms code written in a source language to a (binary) target language.
125
questions
0
votes
0
answers
41
views
How to successfully build for ARM Cortex-M0 using arm-gcc-none-eabi?
I want to debug the following source file to a cortex M0 microcontroller.
...
0
votes
1
answer
70
views
Where is this function coming from and how to get rid of it?
Last night there was an attempt to have CMake build a binary instead of the IDE. Got it to compile and spit out an .elf file, however I noticed when I was trying to compare the IDE .elf vs the CMake ....
3
votes
2
answers
121
views
Using an internally developed RTOS, is this expertise or madness? [closed]
I work for a company which is using a very efficient, but difficult to use RTOS for the embedded projects which they design bottom up, hardware included. This RTOS is 100% made from scratch internally ...
10
votes
1
answer
324
views
Why is synthesis so slow compared to compilation?
Even simple HDL designs takes hours to synthesize, while compiling the Linux kernel on the same machine completes in under 15 minutes. Please explain why with a breakdown of the tasks the synthesizer ...
-1
votes
1
answer
152
views
Net PWMA_IC3 contains Multiple Input Ports(PWMA,PWMA) [duplicate]
I have to give two different PWM Input to my two Gate driver ICs my design.
i have taken two output ports PWMA and PWMB hoping, I will make them 180° apart in phase in programming.
2)I want to give ...
1
vote
1
answer
326
views
How to suppress unused C library functions in SDCC compiler?
Previously I used the COSMIC compiler for STM8 development. In a cosmic compiler, there is an argument called 'SPLIT' which can be passed while using it on the command line. This allows the linker to ...
0
votes
1
answer
159
views
Xilinx Zynq7k 020 linux, error when compiling u-boot
I get the following errors when compiling u-boot (SoC Zynq7k 020)
What I did:
git clone https://github.com/Xilinx/u-boot-xlnx.git
...
2
votes
1
answer
164
views
How are embedded C compilers different from C compilers used for desktop applications?
I've started learning about embedded systems and wondering since the compilers used for embedded applications aren't the same as the ones used for desktop applications; whether they behave differently ...
0
votes
3
answers
340
views
Linux command-line C compilers for PIC10F200
What I have
a Raspberry Pi with Raspberry Pi OS Lite 32-bit (a port of Debian with no desktop) environment installed
PIC10F200 microcontrollers
a PICKit3-like programmer
I want to compile C and ...
0
votes
4
answers
411
views
Are Verilog and VHDL Register Transfer Languages?
I have seen the term Register Transfer Language being used as the expansion of RTL in the context of Hardware Description Languages (HDLs). Specifically over here: https://www.cl.cam.ac.uk/teaching/...
1
vote
3
answers
517
views
Why are data records in intel hex files often limited to 16 bytes, even for long contiguous blocks?
I'm not sure if this is true in general, but all intel hex files I have seen (from Atmel Studio, STM32CubeIDE and MPLAB) use data records with a length of 16 bytes. Even when the addresses written to ...
4
votes
6
answers
2k
views
Order of operations and rounding for microcontrollers
I was working on a project where I read a value from a 16-bit ADC and scaled it to obtain the reading of a sensor. For example:
...
1
vote
1
answer
221
views
C++ AVR big code size & excess unused symbols in build file
I'm developing the program for the AVR microcontroller in C++.
I have created a class that contains 8 methods(with constructors) but used only 3.
Class code:
...
2
votes
1
answer
185
views
C++ AVR microcontroller optimization problem
I'm faced with a weird problem. I'm developing a program for AVR.
Microcontroller ATtiny85.
Frequency 1 MHz.
Programmer ...
-1
votes
1
answer
120
views
Can I assume a compiler for a 32 bit microcontroller supports C99 variable-length arrays?
I'm making a C library for the embedded system community.
I was wondering: In your experiences, do most people use compilers that support C99 VLA?
0
votes
1
answer
132
views
.c to .hex file conversion without using any IDE
I am new to microcontroller programming.
I have a program written in C or assembly language which I need to convert into a .HEX file to flash into the 8051 microcontroller. I do not want to use an IDE ...
0
votes
0
answers
4k
views
Makefile error with my MPLAB X
I am working on a PIC24 project, and I went to the project folder and moved a file to another directory inside the project folder, however, I got a makefile error. I created a new project and copied ...
1
vote
0
answers
142
views
Difference in SystemVerilog-2005 HDL simulation behavior between Quartus Prime Lite (20.1) and ModelSim-Intel Starter Edition(2020.1)
A SystemVerilog module using an always@ block with a gated trigger does not compile in Quartus Prime Lite (20.1). Quartus Prime reports the following compiler error message:
Error (10170): Verilog ...
0
votes
0
answers
217
views
How to solve the compiler error of USB debugging probe of C2000 series Texas Instrument Microcontroller?
I am using Launchpad-F28027F to generate PWM for buck converter. I am currently using simple example of PWM from Resource Explorer of CCS but it's no working due to the error shown in the below ...
0
votes
1
answer
151
views
XC8 compiler: Same variable names across different C source files causes issues
I am currently working with a PIC18F25k80 device using the XC8 compiler and MPLABX.
I spent the whole of yesterday trying to debug some code I ported from a PIC32 micro project. This code did not ...
23
votes
7
answers
3k
views
What do HDLs compile/synthesize to?
I'm a software engineer. As a programmer, I have an understanding of what my compiler does for me because I've manually written a close textual representation of what it outputs (e.g. assembly). For ...
0
votes
1
answer
119
views
Compiling a project without .uvprojx in KEIL
I am learning keil. And I want to compile a project that I found in GITHUB link here. But some of them doesn't include .uvprojx file. So I decided to create an empty uvision project and coppied all ...
0
votes
1
answer
42
views
Control systems composed of several different parts just as program blocks
We're having a course on System Software this semester and we're covering the chapter on Assemblers presently. Our professor gave us some questions to think about. One of them is this:
Control ...
1
vote
2
answers
2k
views
Altium - Linking Sheet Entries/Ports with Net Labels
I am struggling to find a way to get the compiler in Altium to see a Sheet Entry/Port (tried with both) and a net label on the same sheet to link.
This redacted schematic page shows what I have (this ...
31
votes
9
answers
5k
views
What is the process of going from machine code to electrically controlling individual transistors? [closed]
For someone who writes software but doesn't have a computer engineering background, the dozens of abstraction layers have always bewildered me.
I know all source code in their most fundamental level ...
1
vote
0
answers
301
views
PIC18F4550 - Display 16X4 and menu with more than 4 items
I need to print a list of items of a menu in a 16x4 LCD using a PIC18F4550. I already did it using MPLABX and XC8 compiler and it worked fine, however, I need to migrate it to mikroC environment. But, ...
0
votes
2
answers
212
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
2
answers
5k
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
0
answers
109
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 ...
4
votes
1
answer
2k
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
1
answer
273
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
1
answer
250
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 ...
3
votes
4
answers
4k
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 ...
1
vote
1
answer
808
views
difference between CMSIS and ASF
im trying to make c++ project using atmel asf.
the compiler have:
...
1
vote
2
answers
152
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
2
answers
436
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
1
answer
1k
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
1
answer
379
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 ...
1
vote
1
answer
996
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
2
answers
820
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?
2
votes
1
answer
617
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
2
answers
3k
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
1
answer
279
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
2
answers
1k
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
0
answers
334
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
1
answer
906
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
1
answer
105
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 ...
1
vote
1
answer
274
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
1
answer
1k
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
1
answer
658
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?