- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe you are using code which is not thread safe.
Are you sure about your LCD and UART drivers? Can they run safely in a multi-threaded environment? Try first of all to switch STDOUT to JTAG UART- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was using the default Altera drivers (are they thread safe?)...but to be sure I removed them totally and set STDOUT to the JTAG UART. Still no luck, though I don't think it actually stops... I've single stepped through the code and it seems to be sat in a loop waiting for the next task to run, without ever starting one. It grabs a semaphore, looks for any waiting tasks, then releases it. (repeat)
This is odd as like I said before, I'm trying to use the default "Hello uCos" application, so have made no code changes...But it never seems to run the two default tasks. Perhaps I should start a new project with the minimal hardware, I've had lot's of issue's with the NIOS SBT for Eclipse "cashing" files and leaving projects dirty.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the system clock timer correctly defined? And is this timer actually running?
Did you change anything in syslib and RTOS options? I don't understand if the two tasks start and then after a while hang or if they don't start at all.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page