Altera_Forum
Honored Contributor
14 years agoHello MicroC/OS-II problem
Firstly, I'm totally new to MicroC/OS and FPGA's in general, so no doubt this will be a no brainier for everyone else.
I'm using a Cyclone II on a "DE2" board. Up to this point, I had a small bit of code based on the Altera HAL Hello World, which interfaced to RS-232, the LCD and some custom Verilog via a PIO. So my SOPC hardware includes the interfaces for these, along side a 10ms interval timer and the expected system ID and plenty of RAM. I've tried running just the basic "Hello uCos" application on this SOPC, but it resets as soon as multi-tasking is enabled.. Interestingly, if I never enable multi-tasking, all of my code works as expected except for the LCD which is a stream at /dev/lcd_0, this now displays incorrect (but not random) characters. From what I can tell, uCos should be happy with a 10ms timer, JTAG UART and system ID and some memory. Am I missing something?? I've set all the values in the BSP editor, though just a thought, does it matter if STDOUT is not the JTAG UART? I've left debugging set to JTAG, but STDOUT is the RS-232 UART. As I'm new to this sort of thing, I'm also not sure how to go about debugging it properly, but I would lean towards some sort of interrupt table issue, as if when it try's to task switch it gets and invalid hander address and triple faults... (total stab in the dark) I can supply more details once I'm back at the lab tomorrow, Quartus et al is all the latest version. Thanks for any help!