All Questions
Tagged with linker-scripts c
143 questions
5
votes
1
answer
238
views
How to set alignment of a brand new section
in a software project of mine, on linux, I need to create a special section that needs to be populated with 40 bytes large structures. Then I would like to treat this section as an array.
For that I ...
1
vote
1
answer
146
views
Identifiers with leading underscore defined in a linker script
Per the C standard section 7.1.3 Reserved identifiers
All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces....
0
votes
0
answers
98
views
how to initialize my values in my table declare with an _attribute__((section())), of a section in my linker script
`Hello everyone,
I'm new in that domain (linker script and memory section).
I have an array that I want to declare in a section of my address space of my processor (neorv32). I do this for various ...
2
votes
1
answer
105
views
unexpected memory corruption in baremetal environment
i have a simple 32 bit kernel which gets loaded succesfully by a bootloader shown below
[org 0x7c00]
; we can also alter the data segment register (ds) accordingly:
; mov ds, 0x7c0 (it will be 0x7c00 ...
0
votes
0
answers
83
views
Generate hex file from "c" program using riscv compiler , rodata must be aligned by 4 bytes
i want to generate hex file , that contains rodata as aligned 4 bytes . But my riscv compiler generate hex file ,that contains rodata as aligned 2 bytes. i have tried many methods
1.i have already ...
1
vote
2
answers
144
views
CC2538 bare metal project compile but doesn't work
I'm new to embedded development and I'm currently trying to develop a project for a custom board based on TI's CC2538SF53 microcontroller. I've based the code on some tutorials I've seen online and on ...
0
votes
1
answer
264
views
Changing program flash memory address for S32K312 target
We had the application up and running fine on NXP S32K312 target when the program flash address was 0x00400000.
When we needed to change the program flash address to start at 0x00440000 in the linker ...
1
vote
0
answers
168
views
error due to section overlap in linker script
I am trying to compile a c program for baremetal riscv core. What I am trying to do is generate random values put them in a dynamic array and send them through ROCC instructions.
Here is the c program:...
3
votes
2
answers
529
views
Utilizing same header file for linker script and C program, is it possible?
For example I want to place a special data in 0x100000000, 0x100100000, 0x100200000, ... and for this I want to do in a header file,
#define DATA_START 0x100000000
#define DATA_GAP 0x100000
#define ...
1
vote
2
answers
332
views
Which part of Embedded toolchain generates the linker script
Which part of the Embedded toolchain is responsible for generating the linker script?
And if it is the linker, why would the linker generate a script for itself to define the memory segments? Aren't ...
1
vote
0
answers
26
views
Creating a variable under specific section
I'm using linker .ld file to create a section called SECVAR
.SECVAR : {
*(.SECVAR )
}
using the below command in my .c file to create a variable called Dummy under section:
unsigned short ...
1
vote
1
answer
62
views
How to add symbols from statically linked library to a particular section in linker script
Let's say I have a section in a linker script that describes some really fast ram:
.fastram __fastram_start : AT (__fastram_lma)
{
__fastram_start__ = ABSOLUTE(.) ;
*(.fastram....
2
votes
0
answers
585
views
Array alignment with different linkers
I'm working on a big embedded project and I'm facing an issue that I cannot explain with my limited knowledge of linkers.
I've managed to recreate the problem in a really simple program.
I have a ...
1
vote
0
answers
245
views
How can I set an "end of code" marker at the end of my binary?
I have a GNU linker script for my firmware with the following section defined:
.endc :
{
KEEP(*(.endc));
. = ALIGN(4);
_end_code_mark = .;
} >FLASH
This is the last time I'm ...
2
votes
1
answer
2k
views
Stm32 relocating vector table placement in flash
I was trying to achieve this memory structure in my mcu flash
My Linker Script declares in the following order
Bootloader firmware
Main Firmware
Main Firmware Image Info (ie. crc, version number)
...