Altera_Forum
Honored Contributor
19 years agoNios2 eclipse IDE, objcopy data segment
I want to add a large data section into a sdram executable file.
I think objcopy is the way to do it. mydata.dat is my binary data file.nios2-elf-objcopy -I binary mydata.dat -O elf32-littlenios2 mydata.o objdump shows the contents of the file nios2-elf-objdump -s mydata.o
mydata.o: file format elf32-little
Contents of section .data:
0000 6e756c6c 20746572 6d696e61 74656420 null terminated
0010 61736369 69207465 78742064 61746120 ascii text data
0020 66696c65 file How to link mydata.o into the rest of the project, is it enough to copy it to the project folder? How to get a pointer to the .data section of the object file for the c code? I use the eclipse based nios2 ide.