I have been further developing my eCos based compact flash card application on the stratix dev board and thought I had achieved stable code both for debugging (run from Ram) and run from flash operation.
Along the way I found that CF cards can behave in different ways, for example when debugging (optimisation -O0) only one of my CF cards will mount (the el-cheapo Samsung one). When running from flash with -O3, all my cards will mount. Might be a timming issue, as I guess the -O0 code executes slower. Also, as Stefan Levie has pointed out in this forum, do not attempt to access hardware directly, use the HAL IO macros such as IOWR and IORD.
However, I still get strange behaviour from one stratix dev board that on occassion will not boot eCos while another board will. One time I found when eCos would not boot on the bad board, after waiting a while and loading the same code again, and it ran just fine. I think I may have a intermittently bad board - time to order another one.
Peter