Forum Discussion
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.