Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

NIOS II Gen2 linker script problem?

I tried to make a NIOS II Gen2 with a single on-chip ram

My flow is

qsys-edit

qsys-generate nios2g2.qsys --synthesis=verilog --simulation=verilog --output-directory=nios2g2

nios2-bsp HAL hal_bsp nios2g2.sopcinfo

nios2-app-generate-makefile --bsp-dir ./hal_bsp --src-files nios2_test.c

make

but I get the following message at the last make:

/altera/quartus/v14.0_web/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin/../lib/gcc/nios2-elf/4.7.3/../../../../../H-x86_64-pc-linux-gnu/nios2-elf/bin/ld: address 0x85d8 of nios2_test.elf section `.bss' is not within region `ram'

I first tried to put code into rom and data in ram, but ran into a similar problem, and went with a single ram since I would assume it was simpler.

The ram should be big enough:

grep memorySize nios2g2.qsys

<parameter name="memorySize" value="32768" />

Any idea's?

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks! That was indeed the problem. The program I used was tiny, but I only used default values for the bsp generation so I did not get any of the small libc stuff etc. I increased the size and it's working now.