Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

Nios II and MicroC/OS-II

While trying to reduce code size, I configured MicroC/OS-II for my exact needs (ie. 2 semaphores, 1 message Q, etc..) After doing this, things stopped working. Somehow I had run out of OS resources. Well, it turns out that some of the Nios II HAL device drivers use some OS resources themselves. Unfortunately, this doesn't seem to be documented anywhere (outside the actual code, that is.) So here is what I have found:

- altera_avalon_jtag uart: 1 flag and 2 semaphores

- altera_avalon_uart: 1 flag and 2 semaphores

- altera_avalon_lcd_16207: 1 semaphore

So, if you have any of the above in your design, add the appropriate number of OS resources. Semaphores use the generic Event Control Blocks.

Hope this prevents others from waisting a day.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I found another one:

    1 semaphore is used in alt_main.c for the alt_fd_list_lock.