Forum Discussion
Altera_Forum
Honored Contributor
8 years agoHi,
--- Quote Start --- In entry.h, it seems normal#ifdef CONFIG_MMU
rdctl r24,estatus I wonder if there could be something wrong with my toolchain? I use the pre-built toolchain and I first didn't include `nios2-linux/toolchain-mmu/x86-linux2/bin` If I do include the aforementioned path then I get a different error. I installed the pre-built toolchain in `opt/nios2/bin` in entry.h the wrctl instruction is just wrctl estatus,r24 Any idea what I could do to make it build cleanly? My PATH is
echo $PATH
/usr/bin:/home/developer/eclipse/java-neon/eclipse:/home/developer/altera/nios2-linux/toolchain-mmu/x86-linux2/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/developer/Downloads/NuSMV-2.6.0-Linux/bin:/snap/bin:/opt/nios2/bin
I also installed gcc 4.2 with the multilib for 4.2. I think I did everything right, still it won't build. --- Quote End --- 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