Skip to content

The relationship between linker rom/ram size and VHDL IMEM/DMEM size #991

Answered by NikLeberg
Sam-Vervaeck asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Sam-Vervaeck !

However, for both compile styles the output is the same:

Memory utilization:
   text	   data	    bss	    dec	    hex	filename
   5444	      0	    116	   5560	   15b8	main.elf

On first glance it may appear like that. The size of the executables (or in fact the different sections of it) are the same, yes. But what is different is where the linker puts stuff at runtime.

If you check the output of the make asm task for each setting and compare the produced assembly, then you will notice that the only difference is __crt0_stack_end. I.e. the start of the stack.

diff --git a/sw/example/hello_world/main.asm b/sw/example/hello_world/main.asm
index 12815883..4dbbb6fd 100644
-…

Replies: 3 comments 17 replies

Comment options

You must be logged in to vote
15 replies
@NikLeberg
Comment options

@Sam-Vervaeck
Comment options

@Sam-Vervaeck
Comment options

@NikLeberg
Comment options

@Sam-Vervaeck
Comment options

Comment options

You must be logged in to vote
2 replies
@Sam-Vervaeck
Comment options

@NikLeberg
Comment options

Answer selected by Sam-Vervaeck
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants