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

learn more… | top users | synonyms

1
vote
0answers
40 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
28 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 ...
7
votes
5answers
1k 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, ...
1
vote
0answers
32 views

PrimeTime PX toolflow

I need to create a cycle-accurate VCD trace of my component, so after various searches on Google I found PrimeTime PX (I don't know if there are better tools, if you know another, can you suggest ...
3
votes
1answer
42 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: ...
0
votes
0answers
22 views

How to compile .qsys file in modelsim?

My project contains both .qsys and .vhd files. I want to simulate my project using modelsim before programing to FPGA. For ModelSim to simulate first all files should be compiled. From what I know ...
14
votes
12answers
4k 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
96 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 ...
0
votes
0answers
20 views

Zigduino Serial Communication works when programmed from Ubuntu but not Mac

So I have a zigduino which I am programming with TinyOS. I have tried programming TinyOS locally on Mac (10.10 Yosemite) and Ubuntu (14.10). It makes and programs fine using the command (on Mac): ...
2
votes
3answers
78 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 ...
2
votes
3answers
495 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
72 views
7
votes
1answer
557 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 ...
1
vote
1answer
629 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
80 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
305 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
201 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
784 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
90 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?
1
vote
0answers
574 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. ...
1
vote
1answer
363 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
410 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
325 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
240 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 ...
2
votes
2answers
6k 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
237 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: ...
1
vote
2answers
791 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 ...
1
vote
4answers
949 views

PIC microcontroller memory limitations

I am trying to program a PIC10f202 using the XC8 compiler to compare the value of a timer to a variable which will be a function of a look-up table. Here is a sample code : ...
4
votes
3answers
2k views

Why IAR Compiler?

I just saw an Application Note from Atmel about how to compile some code in IAR and I wonder, why would anyone use an external compiler if Atmel already provides the Atmel Studio, with a Visual Studio ...
1
vote
1answer
125 views

How to change PORTx register in other place of program?(Codevision & AVR-GCC)

I have a question related to AVR microcontrollers using AVR-GCC and CodeVision: Normally we set the port related registers inside the main function using DDRx/PORTx registers, for example like this: ...
3
votes
2answers
1k views

Memory management problems with ATTiny85

The setup is as follows: I have a little program to drive single color 8x8 led matrix using 595 shift registers that are supplied with data by ATTiny85 through USI as SPI Master. I upload program to ...
1
vote
1answer
867 views

AVR-GCC: Ports Undeclared when compiling

My Setup I'm running Ubuntu 12.10, and I want to be able to use gcc and avrdude to compile and program my ATmega328. I followed this Ladyada tutorial: Ladyada AVR Tutorial Everything installed ...
1
vote
2answers
738 views

STM32 ARM header files for use with Eclipse and GCC

I'm a mechatronics (mechanical and electrical) engineering student and want to learn how to program ARM microprocessors. I've used Atmel ATMegas previously. I'm using a mac and being a student I ...
1
vote
1answer
131 views

Get bytes from a short long in C18

I'm using the C18 compiler and need to get the three bytes of a short long from MSB to LSB. I'd say I could use this: ...
3
votes
1answer
154 views

Integers >9999 in PIC C18

In this answer, I made a function to convert an integer to an ASCII string: ...
6
votes
5answers
3k views

Integer to ASCII in C18

I'm writing code for a PIC18F46K22 using the C18 compiler. I want to write the value of an integer \$n\$ in ASCII over the USART to my PC. For \$n<10\$, it's easy: ...
6
votes
3answers
4k views

How to discover memory overflow errors in the Arduino C code?

Several times I had some suspicious outputs on the Serial Monitor after uploading code to the Arduino: like eternal output of whitespaces or suddenly cut of strings or scrambled strings. Because ...
2
votes
2answers
140 views

VHDL code not compiling

I'm new to VHDL and I cannot seem to get my code to compile. I've looked over the code to the best of my ability, but I do not see anything wrong with it from my current basic understanding of how it ...
8
votes
3answers
2k views

Absolute address of a function in Microchip XC16

Device: dsPIC33FJ128GP802 I have some *.s files as follows ...
3
votes
3answers
932 views

Can I pass a bit register as a function argument in Hi-Tech C compiler for PIC16?

Is there a way to pass a bit from a PIC's register as a function parameter? Taking, for example, the PIC16F887, its registers (SFRs) and individual bits are defined as fallows in the corresponding ...
4
votes
2answers
943 views

If YOU were starting out now, what PIC16F-compatible IDE and compiler would you choose, and why?

This is going to be a bit long as I wanted to cover all the obvious questions before they arise, give a rationale to some of my thinking, and prove I've done my groundwork! If time is short, skip down ...
-1
votes
1answer
60 views

Adding a global int corrupts compiled code

I have a strange issue. I want to either increment a value every time the loop function is called or us a random value each time. Whether I use a global int for incrementing or set a local int to a ...
5
votes
3answers
438 views

ARM Programming interface and tool chain

I have acquired a RM48L952 that is an ARM Cortex R4F from TI and I would like to start learning ARM development with this chip. My question is can I use any JTAG programmer to program it? Something ...
2
votes
1answer
262 views

Compiling MSP430 files linking problems

I'm trying to compile a simple C file to later upload to my MSP430 uC but when I try to compile I get something that looks like a linking problem: ...
1
vote
2answers
588 views

Where can I start to program a S5PV210?

At the university I learn only the Microchip microcontroller, but I would like to improve my knowledge. I ordered a development board based on Samsung S5PV210. The manufacturer also provided a Linux ...
3
votes
1answer
346 views

Easiest way to get rid of __clz_tab in winavr compiled code?

I've ported a program from the arduino environment to a makefile build using winavr, which, in turn, is based on avr-gcc (just like arduino). However, my program started crashing, and after some ...
0
votes
1answer
296 views
2
votes
1answer
2k views

How does the Arduino IDE/build system work?

How does the Arduino IDE/build system work? I noticed that they use the avr-gcc in the background, but what do they do on top? They seem to have their own "kind of C" language that transforms into ...
7
votes
2answers
8k views

Programming for the Arduino without the Arduino IDE.. but with the provided libraries?

I recently started a new project using my Arduino that's been collecting dust for a while. Along with the physical board collecting dust, so has my copy of avr-gcc and the Arduino libraries. I can ...
8
votes
3answers
726 views

What does #if 0 do

Today I started to use MPLAB X to program my PICs, and found a code template, with multiple files and spots to fill in code. Before I have had a single file with my code in it. In this template, where ...