Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- Hi, The message
/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S:138: Error: expecting control register is made in the function
/* The function consume_arg takes a pointer into a string
of instruction tokens (args) and a pointer into a string
representing the expected sequence of tokens and separators.
It checks whether the first argument in argStr is of the
expected type, throwing an error if it is not, and returns
the pointer argStr. */
char *
nios2_consume_arg (char *argStr, const char *argType)
{
char *temp;
int regno = -1;
switch (*argType)
{
case 'c':
if (strncmp (argStr, "ctl", strlen ("ctl")) != 0
&& strncmp (argStr, "cpuid", strlen ("cpuid")) != 0
&& strncmp (argStr, "status", strlen ("status")) != 0
&& strncmp (argStr, "estatus", strlen ("estatus")) != 0
&& strncmp (argStr, "bstatus", strlen ("bstatus")) != 0
&& strncmp (argStr, "ienable", strlen ("ienable")) != 0
&& strncmp (argStr, "ipending", strlen ("ipending")) != 0
&& strncmp (argStr, "exception", strlen ("exception")) != 0
&& strncmp (argStr, "pteaddr", strlen ("pteaddr")) != 0
&& strncmp (argStr, "tlbacc", strlen ("tlbacc")) != 0
&& strncmp (argStr, "tlbmisc", strlen ("tlbmisc")) != 0
&& strncmp (argStr, "fstatus", strlen ("fstatus")) != 0
&& strncmp (argStr, "config", strlen ("config")) != 0
&& strncmp (argStr, "mpubase", strlen ("mpubase")) != 0
&& strncmp (argStr, "mpuacc", strlen ("mpuacc")) != 0
&& strncmp (argStr, "badaddr", strlen ("badaddr")) != 0)
{
as_bad (_("expecting control register"));
}
break;
of file "tc-nios2.c". So I think that you are calling the genuine nios2's 'gas'. Please try to compile the 'entry.S' only, by evoking the 'nios2-***-gcc' or 'nios2-***-as' directly ? Kazu --- Quote End --- This is what happens
$ nios2-linux-uclibc-gcc linux-2.6/arch/nios2/kernel/entry.S
linux-2.6/arch/nios2/kernel/entry.S:35:23: linux/sys.h: No such file or directory
linux-2.6/arch/nios2/kernel/entry.S:36:27: linux/linkage.h: No such file or directory
linux-2.6/arch/nios2/kernel/entry.S:37:29: asm/asm-offsets.h: No such file or directory
linux-2.6/arch/nios2/kernel/entry.S:38:28: asm/asm-macros.h: No such file or directory
linux-2.6/arch/nios2/kernel/entry.S:39:29: asm/thread_info.h: No such file or directory
linux-2.6/arch/nios2/kernel/entry.S:42:23: asm/entry.h: No such file or directory
linux-2.6/arch/nios2/kernel/entry.S:44:27: asm/processor.h: No such file or directory