Nios2 Helloworld project Memory Overflow
Hi guys,
I'm pretty new to Intel's environment for FPGA development and I need to use the Nios2 core for one of my designs. The design is implemented on MAX10 and I'm using Quartus 21.1 Standard edition on Ubuntu 20.04.
To keep things simple, I have created a Nios 2 application & BSP from template, and used Hello World template for that. In Eclipse, I have pointed to the .sopcinfo file of my Quartus project after I generated HDL and then compiled the design in Quartus for using the template helloworld project for my Nios application. After programming the FPGA; I have first generated the BSP, then Build the BSP and then trying to get a successful build from the helloworld application in order to run it.
The problem I'm having here is an overflow on 2 different addresses of the .elf's sections. I'm using an on-chip RAM of 32K and already included that in my Platform Designer with the correct offset (Base = 0x0000_0000, End = 0x0000_7FFF). As this is the template project and I have changed absolutely nothing, I would expect this to work just out of the box, so not sure what I'm doing wrong / missing. The error messages are given below.
/home/anonimcs/intelFPGA_s21/21.1/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin/../lib/gcc/nios2-elf/10.3.1/../../../../../H-x86_64-pc-linux-gnu/nios2-elf/bin/ld: test_flash_10M25.elf section `.text' will not fit in region `onchip_RAM32k' /home/anonimcs/intelFPGA_s21/21.1/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin/../lib/gcc/nios2-elf/10.3.1/../../../../../H-x86_64-pc-linux-gnu/nios2-elf/bin/ld: address 0xa2c4 of test_flash_10M25.elf section `.rwdata' is not within region `onchip_RAM32k' /home/anonimcs/intelFPGA_s21/21.1/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin/../lib/gcc/nios2-elf/10.3.1/../../../../../H-x86_64-pc-linux-gnu/nios2-elf/bin/ld: address 0xbfe4 of test_flash_10M25.elf section `.bss' is not within region `onchip_RAM32k' /home/anonimcs/intelFPGA_s21/21.1/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin/../lib/gcc/nios2-elf/10.3.1/../../../../../H-x86_64-pc-linux-gnu/nios2-elf/bin/ld: address 0xa2c4 of test_flash_10M25.elf section `.rwdata' is not within region `onchip_RAM32k' /home/anonimcs/intelFPGA_s21/21.1/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin/../lib/gcc/nios2-elf/10.3.1/../../../../../H-x86_64-pc-linux-gnu/nios2-elf/bin/ld: address 0xbfe4 of test_flash_10M25.elf section `.bss' is not within region `onchip_RAM32k' /home/anonimcs/intelFPGA_s21/21.1/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin/../lib/gcc/nios2-elf/10.3.1/../../../../../H-x86_64-pc-linux-gnu/nios2-elf/bin/ld: region `onchip_RAM32k' overflowed by 16356 bytes
Just out of curiosity, I had a look at the file 'settings.bsp' and I have seen that the memory's sections (such as heap & stack) have set within LinkerSection blocks that's outside the Setting for the memory itself. I was wondering if this is the usual case. However, just as I mentioned above, I should not have to edit any BSP files when running a template project.
Any help would be appreciated.
Cheers!