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++
12597 Discussions

A problem about configuring the sys lib

Altera_Forum
Honored Contributor II
938 Views

Hi everyone, 

 

Whe I try to run my design on a dev board based on NiosII(NiosII 5.0), 

 

I configured the System Library properties as: 

 

Program memory(.text) sdram 

 

Readonly data memory(.rodata) flash 

 

Read/write data memory(.rwdata) sram 

 

heap memory sdram 

 

stack memory sdram 

 

 

 

But after succeessful building,when I ran it as NiosII hardware, 

 

some err info came out on the console like this: 

 

 

Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 

Pausing target processor: OK 

Reading System ID at address 0x002200C8: verified 

 

Downloading 00000000 ( 0%) 

Downloading 00200020 ( 2%) 

Downloading 00800000 (15%) 

Downloaded 56KB in 1.4s (40.0KB/s) 

 

Verifying 00000000 ( 0%) 

Verify failed  

Leaving target processor paused 

 

 

Could anyone give me some hints about that?And please tell me  

 

how to configure those things? 

 

By the way,I noticed when I configured them all as "sram",everything was pretty ok! 

 

So I can not figure out where the rub is... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
253 Views

The problem is: 

 

Readonly data memory(.rodata) flash 

 

This means you&#39;ll have to program the flash in order to get the data there (the download/run process only works to volatile memory), and you&#39;ll have to do it anytime your statically declared data changes, as well.... NOT good for test/development! 

 

I&#39;d advocate testing your code with rodata, in volatile memory, and then, if you need to locate it in flash, to conserve space, do it only when you&#39;re closer to release. You&#39;ve also got to be aware that your performance will be less, when reading from the flash, as well. 

 

Cheers, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
253 Views

Thank slacker! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

Now I change the configuration of the sys lib properties to all "sram", 

 

and the design runs all right! 

 

But could you please give some tips in how to configure other choices of memory 

 

except (.rodata) as a volatile memory?I mean,is there some "conventional" configuration of those things? 

 

e.g what is the normal selection for heap memory and what for stack memory and the like?
0 Kudos
Reply