Forum Discussion

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

what is nm__n ?

Hello,

I have tried upgrading my nios I to the nios II using the legacy support path and have ran into some bizarre results.

I'm using Quartus II v4.1 and SOPC 4.1.

When SOPC builder tries to generate the SDK, I get a lot of these warnings:

<div class='quotetop'>QUOTE </div>

--- Quote Start ---

cut and paste section:

********************************************************************# 2004.08.05 09:19:47 (*) Generating Makefile, excalibur.mk and excalibur.h for cpu

# 2004.08.05 09:19:51 (*) Making Library

# 2004.08.05.09:19:53 --- Deleting libnios.a libnios_debug.a# 2004.08.05.09:19:53 --- Compiling alt_main.c

In file included from alt_main.c:40:

../inc/excalibur.h:258:1: warning: "nm__n" redefined

../inc/excalibur.h:205:1: warning: this is the location of the previous definition# 2004.08.05.09:19:54 --- Compiling asmi.c

In file included from asmi.c:2:

../inc/excalibur.h:258:1: warning: "nm__n" redefined

../inc/excalibur.h:205:1: warning: this is the location of the previous definition# 2004.08.05.09:19:54 --- Compiling dma.c

In file included from ../inc/nios.h:13,

from dma.c:13:

../inc/excalibur.h:258:1: warning: "nm__n" redefined

../inc/excalibur.h:205:1: warning: this is the location of the previous definition# 2004.08.05.09:19:54 --- Compiling flash_AMD29LV065d.c

In file included from flash_AMD29LV065d.c:16:

../inc/excalibur.h:258:1: warning: "nm__n" redefined

../inc/excalibur.h:205:1: warning: this is the location of the previous definition# 2004.08.05.09:19:55 --- Compiling lan91c111.c

In file included from lan91c111.c:21:

../inc/excalibur.h:258:1: warning: "nm__n" redefined

../inc/excalibur.h:205:1: warning: this is the location of the previous definition# 2004.08.05.09:19:55 --- Assembling nios2_crt0.s# 2004.08.05.09:19:56 --- Compiling nios_cache.c

In file included from ../inc/nios_cache.h:21,

from nios_cache.c:17:

../inc/excalibur.h:258:1: warning: "nm__n" redefined

../inc/excalibur.h:205:1: warning: this is the location of the previous definition# 2004.08.05.09:19:56 --- Assembling nios_delay.s# 2004.08.05.09:19:56 --- Compiling nios_fprintf.c

In file included from nios_fprintf.c:12:

../inc/excalibur.h:258:1: warning: "nm__n" redefined

../inc/excalibur.h:205:1: warning: this is the location of the previous definition# 2004.08.05.09:19:56 --- Assembling nios_isr_funnel.s# 2004.08.05.09:19:56 --- Compiling nios_isr_handler.c

In file included from nios_isr_handler.c:33:

../inc/excalibur.h:258:1: warning: "nm__n" redefined

../inc/excalibur.h:205:1: warning: this is the location of the previous definition

****************************************************************[/b]

--- Quote End ---

and it goes on and on about that.

After looking at the excalibur.h file, I&#39;ve noticed this in the file:

<div class='quotetop'>QUOTE </div>

--- Quote Start ---

cut and paste section:

**************************************

// Structures and Routines For Each Peripheral

# define nm__n 0

**************************************[/b]

--- Quote End ---

then just below that a few lines it shows this:

<div class='quotetop'>QUOTE </div>

--- Quote Start ---

cut and paste section:

**************************************

// Include nios cache-control definitions and macros# include "nios_cache.h"# include "nios2.h"# define nm__n 1

**************************************[/b]

--- Quote End ---

What is the purpose of this nm__n define?

Should it be on or off? I can easily go in and make it one or the other and the warning will go away, but I don&#39;t know what it&#39;s role is.

Can anyone help me with this?

thanx in advance,

-Quan

4 Replies

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

    I seem to remember that to get some of the Nios I c code to run on nios II I had to simply comment out something, sometimes.

    Try commenting it out in the h file.

    But since it&#39;s a warning, it shouldn&#39;t hurt anything.

    I&#39;ll see if I can find someone to answer this.

    Can you send your design? no db folder please... khallbec@altera.com
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Kerri,

    I tried commenting those defines out and it did not seem to have any effect on my test codes.

    Also I&#39;ve sent you the design files.

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

    First, I get the same warnings. That&#39;s good.

    I asked around and someone said... there&#39;s a bug report on that. It has to do with custom instructions or something like that.

    So, I&#39;m searching for more information for you...
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Update:

    Kerri suggested I remove the custom instructions if I&#39;m not using them, and so I did. The warnings have dissapeared along with the nm__n defines.

    Things are looking up again.

    thanx,

    -Quan