Forum Discussion
Altera_Forum
Honored Contributor
8 years agoHi,
--- Quote Start --- It's use of the rdctl register. 138:rdctl r5,exception 546: rdctl r6,badaddr The whole file is pasted at http://stackoverflow.com/questions/42778812/error-unknown-register-when-building-uclinux --- Quote End --- Please try to preprocess the 'entry.S' with -E switch instead of -c, like
nios2-linux-uclibc-gcc -E -D __ASSEMBLY__ -D __KERNEL__ -I/home/developer/altera/nios2-linux/linux-2.6/include -I/home/developer/altera/nios2-linux/linux-2.6/arch/nios2/include -I/home/developer/altera/nios2-linux/uClinux-dist/linux-2.6.x/include /home/developer/altera/nios2-linux/linux-2.6/arch/nios2/kernel/entry.S > entry.txt
and check the output file by your editor whether the code 'rdctl r5,exception' and 'rdctl r6,badaddr' are transferd invariantly. Note that with the -E switch, the compiler uses the standard output for its output. If the preprocessing is normal, then make a test file like
// test.S
rdctl r5,exception
rdctl r6,badaddr
and compile it.
nios2-linux-uclibc-gcc -c test.S
Does it genarate errors? Kazu