Altera_Forum
Honored Contributor
20 years agoecos kernel suddenly stops booting
For months I have been successfully running ecos and testing my application, but suddenly I am no longer able to boot ecos. Things were working in the morning, but after adding a new application feature and a reboot to install Windows update, I can no longer boot ecos. I have found that if I add or remove random code in my application, sometimes it will boot but usually not. I suspect something about my application is causing an overflow or overwrite when the kernel is booting, but don't know what that could be. Full details follow...
When things stopped working, I had only updated and rebuilt my application. I did not change the SOPC builder, FPGA code, or rebuild the ecos library. I backed out the Windows update, but that didn't help. I have tried re-generating SOPC, recompiling FPGA, rebuilding the ecos library, and increasing the idle thread stack size without success. I switched my multiple stack spaces from static to dynamic allocation without success. I tried running archived applications (previously built and tested - no recompile) and found that I had to go back over a month to get one that would work. Even one from the day before did not boot. If I recompile a working archived version, it will no longer boot. I'm running Quartus Web edition 5.0 and it's associated ecos. I have not upgraded to 5.1 yet. I am using the ROMRAM option and downloading the application via NIOSII IDE. My application is a menu based system and has tons of printfs for menus and help etc. so there is a large data section. In debugging I found that I run through cyg_hal_invoke_constructors() but do not get to the cyg_start() function that follows in vectors.S. Instead I seem to jump into the on board Flash which is blank. I appear to make 21 calls in cyg_hal_invoke_constructors() but I don't see where the calls initialization list __CTOR_LIST__ is defined. I have an Altera PIO driver which gets installed as part of the cyg_hal_invoke_constructors and that appears to work fine. I suspect something is overwriting or overflowing but do not know what or where to proceed from here. If I have a working build, it's not clear to me why adding a single line in my application such as "Index++;" would cause the kernel to stop booting. If I then remove that line it would start booting again. Any thoughts would be greatly appreciated, Thanks, Stefan