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

learn more… | top users | synonyms

1
vote
1answer
81 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
34 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
45 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
81 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
190 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
102 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
143 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
2k 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
117 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
406 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
534 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 : ...
3
votes
3answers
696 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
106 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: ...
2
votes
2answers
465 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
224 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
431 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
100 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
132 views

Integers >9999 in PIC C18

In this answer, I made a function to convert an integer to an ASCII string: ...
6
votes
5answers
1k 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
1k 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
131 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
1k views

Absolute address of a function in Microchip XC16

Device: dsPIC33FJ128GP802 I have some *.s files as follows ...
3
votes
3answers
496 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
570 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
55 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
369 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
185 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
468 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
274 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
234 views
2
votes
1answer
1k 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
6k 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
537 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 ...
12
votes
2answers
1k views

Compiling code to run from external RAM

I am considering designs for a minimalist game system based on a PIC18F85J5. Part of my design is that games can be loaded from an SD card without reprogramming the chip or flashing the program ...
4
votes
1answer
445 views

Texas Instruments Compiler

I am working with TI's CC2533 SoC Low Power RF I bought a few chips and assembled a few PCBs.. Using TI's debugger I confirmed that I can send and receive packets using the basic RF using the ...
7
votes
5answers
2k views

Editable PIC Serial Number in HEX File

Currently I have a serial number hard-coded in my firmware for a design I'm working with. The firmware can read and report back the serial number. That works fine for what I need. The trouble is ...
9
votes
2answers
4k views

Is Code Sourcery G++ Lite still a viable project?

When I tried to download a newer version of Code Sourcery G++ Lite for ARM, I noticed that I was redirected to another company and it is really hard to find anything on that site about Sourcery G++ ...
1
vote
1answer
207 views

Breakout Boards and C-Compilers

I'm new to embedded programming and looking for advise on a couple things: I'm developing two "projects." One is based on Microchip's dsPIC33 series of micros and the 2nd project involves Freescale ...
0
votes
1answer
311 views

Developing a compiler and linker for embedded systems

Does anyone know some good resources (textbooks, papers, tools, etc) for developing a custom compiler and linker for a specific microcontroller?
1
vote
1answer
905 views

Compiler / Assembler (Toolchain) for PIC micro's using Ubuntu 11.04

I used to use Hi-Tide from Hi-Tech before they were purchased by MPLab. In my opinion it was great. I wrote the C code, selected the processor and out popped a hex file. I've now migrated to Ubuntu ...
3
votes
2answers
1k views

Watchdog reset using C32 v2.00 compiler

Compiling an existing PIC32 project using the v2.00 C compiler produces a continual watchdog reset. This problem does not appear using the previous v1.12 compiler. Changing the watchdog postscaler ...
7
votes
2answers
2k views

How can I use a build server with Keil uVision4 (MDK-ARM), script a build, use a makefile?

I would like run daily builds, or check-in/commit triggered builds of Keil MDK-ARM based projects. So far I've gotten things going with the batch file feature of the IDE. This does require you to ...
0
votes
1answer
769 views

avr-gcc(4.4.2)/avr-libc linker issues

So this seems to be a generic issue. "libc.a" is associate with some sort of incompatibility with floating point math and/or the correct library used. I've added the "-lm" as suggested on the forums, ...
0
votes
1answer
218 views

Mac based AVR development issue

Ok, so I reinstalled my development enviroment on the mac using the latest build of avr-gcc (4.4.2), avr-libc and avrdude from the Fink project. Problem is when compiling I keep on getting a linker ...
1
vote
4answers
3k views

How to choose between little endian or big endian for the processor settings?

We have just selected a new processor for our application, and one of the project options available to me is to select the Endian mode: Little endian or Big endian (under Big endian two more choices, ...
4
votes
3answers
1k views

Usage of the #pragma pack(1) compiler directive on embedded applications

I have recently come across this #pragma pack(1) preprocessor directive and was wondering why it is being used? I Googled the usage, and found it has other options such as push,pop etc. Has anyone ...
5
votes
5answers
716 views

Is there a development system for the MSP430F series microcontrollers?

I'm hoping for an IDE of some kind, but I'll take any compiler or assembler! Can't seem to find anything by googling.
4
votes
4answers
1k views

What PIC24 C compilers are out there, and what is your opinion or review on them?

Specifically, the PIC24 series. I tried out microchips C30 compiler, but it seems to be a bit too complicated for me, and I couldn't find any libraries with it. Then I tried CCS, and it seems far ...
9
votes
5answers
1k views

PIC 16F beginner.. difference in program-syntax when using different compilers

As I mentioned, I have just beginned programming pic16f877a. I can now work with 7 segment displays. At present I am using ccs compiler. Nothing wrong with that. But i prefer to be a compiler ...
1
vote
5answers
463 views

Help fix or ignore aliasing warning in gcc

I'm having a problem working with the TI/Stellaris EK-LM3S6965 demo board and associated software, specifically the OLED display driver. My problem is not that it doesn't work, it's that it mostly ...