Forum Discussion
Altera_Forum
Honored Contributor
15 years agoPorting PIO C-code from ARM-7 to Nios II (SE1-board) + performance issue.
Hi all, I'm having a try at the moment to port my C-code from the arm-7 mcu, LPC-P2148 to Nios II, SE1-board , Cyclon-II, EP2C20F484C7. The arm-none-eabi-gcc compiler was used for the ARM-7 ...
Altera_Forum
Honored Contributor
15 years agoCheck the compiler options - especially for -O2 or -O3.
And check that your delay loop doesn't get optimised away! An asm volatile("\n":::"memory") inside the loop should persuade gcc to generate all the code. Oh - and, in general, don't use 'short int' unless you are trying to pack data into a structure or require the compiler to generate code that explicitly wraps on the small boundary.