cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
5,117 Views
Registered: ‎02-18-2014

Launch elf not from DDR3

Jump to solution

Hi guys,

 

I'm using a microblaze with BRAM(automatically generated and set at 256KB), DDR3(64MB), DMA, axi extern slave connector and UART on ISE 14.7.

 

Everything's great on my embedded system but it doesn't work like I want... I explain, I want to have and use the DDR3 memory for my needs but It seems that the .elf file (when I launch my C code) is in the DDR3 memory because when I write data in it that freezes and CPU RESET doesn't work, I have to re-run the SDK C project. So I wonder if it's possible to write the .elf file and launch it somewhere else ? I've tried to write it in the BRAM but when I launch it, the UART doesn't diplay anything...

 

If you have some idea let me know !

 

Regards,

 

J.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
9,707 Views
Registered: ‎02-18-2014

Re: Launch elf not from DDR3

Jump to solution

Hi @Anonymous,

 

Thanks for your reply,

 

I'm programming the board with the SDK "program FPGA" tool then I use "run on hardware" to launch my C application. What I want is to use the DDR3 like a GPIO Led or Switch and read or write it everywhere but If I write in the DDR3 at the begening adresses my application doesn't work anymore but don't stop... It's not a code problem but a program run location problem so I would like to run my program elsewhere.

 

Edit : Ok, I've found. That was the linker script in my source files which was set on the ddr3 sdram instead of the bram controler so now that works really how I want.

Thank you for your help,

 

Regards,

 

J.

View solution in original post

0 Kudos
2 Replies
Highlighted
Anonymous
Not applicable
5,104 Views

Re: Launch elf not from DDR3

Jump to solution

Is there virtual memory involved or are you just writing a baremetal?

 

Are you download the ELF over a debugger or is some on-target software parsing the ELF and handing off to it (this would be a bootloader)?

 

I don't understand what it means to write the ELF in BRAM. ELFs contain the program location in the ELF itself so you shouln't have to provide any adress information, ELF will do everything for you.

 

To confirm your theory, the GNU readelf and objdump tools give you information about where the various parts of program live in the address space. objdump needs to come from your toolchain wheras any-old readelf will be helpful.

 

If you are using the SDK GUI, I vaguely remember double-clicking built elf fails (as if you are trying to open them) brings up the objdump output for you. I suggest flicking through this to see the addresses of instructions etc.

 

If it is linking at the wrong location you need to generate yourself a linker script and move all the sections to BRAM. With such a small BRAM you probably need to adjust stack and heap size.

0 Kudos
Highlighted
Contributor
Contributor
9,708 Views
Registered: ‎02-18-2014

Re: Launch elf not from DDR3

Jump to solution

Hi @Anonymous,

 

Thanks for your reply,

 

I'm programming the board with the SDK "program FPGA" tool then I use "run on hardware" to launch my C application. What I want is to use the DDR3 like a GPIO Led or Switch and read or write it everywhere but If I write in the DDR3 at the begening adresses my application doesn't work anymore but don't stop... It's not a code problem but a program run location problem so I would like to run my program elsewhere.

 

Edit : Ok, I've found. That was the linker script in my source files which was set on the ddr3 sdram instead of the bram controler so now that works really how I want.

Thank you for your help,

 

Regards,

 

J.

View solution in original post

0 Kudos