Questions tagged [linker]

In computing a linker is a program that takes object files generated by a compiler and performs relocation and other operations to form a final executable. Questions here should only relate to embedded platforms and not general PC programming.

Filter by
Sorted by
Tagged with
10
votes
4answers
925 views

Bare-metal start-up code for Cortex M3 .bss region initialization

I have developed inspired from here a bare metal start-up code for arm cortex M3. However, I encounter the following problem: suppose I declare an uninitialized global variable, say of type unsigned ...
0
votes
1answer
70 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. ...
2
votes
1answer
143 views

gcc __attribute__ section not working?

I'm working on a Zynq Ultrascale+ MPSoC and trying to play around with the on and off chip memories. In the following program, I'm trying to place only variable 'x' into OCM (on-chip-memory) where ...
0
votes
0answers
39 views

openocd with NUCLEO-F756ZG and linker script for compiler

I am a beginner in arm cortex m7, i bought NUCLEO-F756ZG board and when i was trying to apply this tutorial i faced two difficulties. First: i didn't find linker script for my board (NUCLEO-F756ZG) ...
2
votes
2answers
161 views

How does avr-gcc linker know to put the `.data`section at `0x800100` rather than `0x800060`?

Looking at the linker script for my part (ATMEGA168PD), the data region has an origin defined as starting at 0x800060... ...
0
votes
1answer
74 views

bootloaders “reset memory mapping”

im looking into bootloaders and how they work this picture from application note by atmel for their SAM series bootloader "AP-Note_AT04189" so Stack pointer and reset? Stack pointer is an address of ...
0
votes
1answer
151 views

STM32F407 Flash sector auto cleared after programming

I've tried to do flash logger function for my device based on STM32f407 and found some problem with flash: If I uncomment function for clear sector, after load program my dummy data on first page is ...
7
votes
4answers
1k views

Creating programmable look up table on STM32

I am trying to define a look up table that is not a constant on an STM32F103. Basically I want to have a page of flash that acts like a constant lookup table in normal operation, but every once in a ...
4
votes
3answers
296 views

What are the details about link files and startup code one needs to know to write an Operating System for a uC? [closed]

I know some people will say I don't need to write an OS because there are lots of options out there. But I'm not interested in using an OS to solve an specific problem. I want to write one by myself ...
3
votes
2answers
5k views

STM32F103 flash memory start address

I'm trying to write a linker script for my first firmware for STM32F103C8T6 microcontroller. I have an example script that works. What I'm trying to understand is why it works. The linker script I ...
0
votes
1answer
266 views

Jump to random parts of code/binary while debugging, own makefile for building

I've created a makefile: ...
1
vote
2answers
2k views

How to use a Linker File with Keil uVision5 ARM?

I am trying to follow a tutorial implementing a custom bootloader on a STM32F072 (ARM M0 Core), which requires remapping memory areas when compiling for both the 'bootload' application and the 'main-...
4
votes
1answer
462 views

How does gnu linker obtain Cortex-M stack pointer value?

GNU's linker obtains the ARM Cortex's stack pointer value from the linker script, and places that value in the first location of the interrupt vector table. I note that most of my scripts use the ...
1
vote
1answer
170 views

ESP8266 and GCC

I think this is more related to GCC rather than ESP8266. I have been trying to put in a constant variable in read only memory section of ESP. The idea is to change the value directly in the binary ...
3
votes
2answers
3k views

IAR ARM Place const symbols in flash

I have the following flash section defined in my linker file: keep { section .SomeConst }; place at address mem: 0x0003F800 { readonly section .SomeConst }; In ...
0
votes
3answers
716 views

Linker error using Atmel Studio with C++ project

I have created a simple C++ project using Studio 7.0.1006. Then using "Add Class", I added a simple class called CGPIO. To this class I added a public method called Initialize. The code compiles and ...
0
votes
2answers
314 views

Fill ROM with jump instructions

As I have heard it is a common practice to fill the unused flash memory of a microcontroller with an jump instruction to the reset function. This aids in resetting the MCU in case of the PC is corrupt,...
0
votes
1answer
101 views

Code composer 6 linker file not placing variables

I am developing firmware on MSP430F2619. I need to store configuration information having 5 sections of 200 bytes. In order to read and write them independently I am trying to allocate 5 sections of ...
-2
votes
1answer
437 views

What is a startup code how it is related to bootloader or bootloader code?

I am doing a project on building a bootloader for a kinetis E series controller (MKE02Z64VLD2). My mentor told me to have a thorough knowledge about Startup code and linker files before starting the ...
4
votes
2answers
1k views

Force xc32-ld to place all application code in kseg0_boot_mem

I have written a PIC32MX bootloader application. I would like to tell the linker to put it completely in the boot memory, so that all program space is kept for the final application. Currently, the ...
0
votes
1answer
550 views

Error while running linker am using TIVA C TM4C123G and IAR

I am trying to change and read my TM4C123G launchpad clock frequency to 80 MHZ using TIVAWARE libraries so here is my code: ...
0
votes
2answers
670 views

Merging 2 Hex files

My MSP430 program consists of serial bootloader and application hex files. While programming I load bootloader program using JTAG and then load application program using bootloader. I am looking for ...
1
vote
2answers
621 views

Starting application program at fix address in MSP430F2619

I am writing firmware for system with boot loader and application using TI MSP430F2619 micro-controller. I want to know How I can make sure my program restart at predefined address in flash let us ...
2
votes
1answer
2k views

ELF section flags not picking up flags from linker script

In my linker script for binaries on an MSP430, I have a memory section marked "rx": ...
1
vote
2answers
2k views

Microchip XC8: How to Overlap Specific Variables without Union?

I have effectively three sets of variables to put in two locations. Sets 1 and 2 are never used together, so they can occupy the same space. Set 3 needs to be unique. I know I can use a union of ...
2
votes
2answers
1k views

Microchip's XC8 Linker doesn't recognize some custom section names

Slightly related to this one: https://softwareengineering.stackexchange.com/questions/254734/microchip-xc8-how-to-pack-code-against-an-upper-limit I can relocate code just fine, but I'm having some ...
2
votes
3answers
3k views

Short String overflows.text area on ATtiny85, Arduino IDE

I'm using the Arduino IDE with arduino-tiny (https://code.google.com/p/arduino-tiny/) on an ATTIny85. My code is maxing out the RAM, or so it seems: Adding a ...
2
votes
2answers
2k views

Arduino linking assembler funtions

I would like to use (link) a function written in assembler in an Arduino project. What I want to do is: write the function in assembler using avr-gcc calling conventions declare the function as ...
4
votes
2answers
793 views

Automating linker file change

I am working on a firmware project in which i have to do a crc16 check for flash integrity. Controller: MSP430 IDE: IAR EW 5.40 (Linker Xlink) The crc is calculated using IAR Xlink linker and kept ...
8
votes
1answer
216 views

Integrating another binary

I am building a binary for ARM using GCC and Crossworks. I have a secondary binary image that needs to be loaded to another IC during start up. I like to integrate this binary to my tool-chain, in ...