Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

WARNING: Tcl error: "ERROR: 'altera_vic_driver': Linker section '.text' located in a not writeable memory device (onchip_flash_0_data). Please change it to a writeable memory device."

DPund1
Beginner
880 Views

Hi ,

 

I am booting from ON -chip flash memory using options 1a from below options given booting process manual :

"In the Nios II Processor parameter editor, set the reset vector memory and exception vector memory based on the boot options below:

Boot Option  : Reset vector memory: Exception vector memory Option 1a  Altera On-chip Flash  OCRAM/ External RAM Option 1b    Altera On-chip Flash Altera On-chip Flash Option 2  Altera On-chip Flash OCRAM/ External RAM

"

But whenever I am adding Vectored interrupt controller in my designs then i am gettting an error in NIOS BSP editor and I am not able to generate BSP and it showing me error as

WARNING: Tcl error: "ERROR: 'altera_vic_driver': Linker section '.text' located in a not writeable memory device (onchip_flash_0_data). Please change it to writeable memory device."

 

As I am putting ".text" section in ON-chip flash and loading from there , so this error is coming as mentioned in above lines. And if i am changing to ON-chip memory the code size is not fitting in ON-chip memory.The .bss and .rwdata, .rodata is getting overflowed.

I am not getting how to resolve this issue or what settings i need to do in BSP so that i can generate BSP with VIC

0 Kudos
1 Reply
Broddo
New Contributor I
738 Views

I'm sorry that this response is getting to you so late. I came across your question while searching for an answer to a similar problem that I have. You may have already solved this but I thought I'd add the solution in case someone finds this. 

The problem you have is that the VICs generated vector table must be mapped somewhere. By default, it is mapped to the .text region in the BSP. However, this memory is read-only - which is why the BSP generator complains.

You can move the vector table though! In BSP generator, select the Drivers tab, and on the left look for the altera_vic_driver. On the right hand page, you can adjust many settings of the VIC driver, including specifying which linker section it should be mapped to. You'll see that you have it mapped to .text. I've often put this in the .exceptions section as it is mapped to RAM and alt_load() copies the .exceptions section to RAM during boot. This might not be best practice so someone please correct me if there is a better option. 

0 Kudos
Reply