Forum Discussion
Altera_Forum
Honored Contributor
15 years agoUsing custom instruction from uCLinux user app on nios2mmu
Hello, Is it possible to use a custom instruction from an user application running on NIOS2MMU - uCLinux. I'm trying to run the CRC design example on uCLinux. When I try to compile the ...
Altera_Forum
Honored Contributor
15 years agoSince a BSP is not used, you have to write the macros for the custom instructions yourself or use the builtins, which should be defined by the cross compiler.
For example:/* Opcode for the byteswap custom instruction provided by Altera.
* This may change if other custom instructions are present. */
# define ALT_CI_BYTESWAP_N 0x00
# define ALT_CI_BYTESWAP(x) __builtin_custom_ini(ALT_CI_BYTESWAP_N, (x))