Forum Discussion

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

A problem about configuring the sys lib

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

2 Replies

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

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?