Forum Discussion
Altera_Forum
Honored Contributor
21 years agoSemaphore support
Hi, I'm currently trying to initialize a semaphore by making a call to sem_init(), but instead of returning a non-zero value and printing a error condition, Nios II reboots. struct sem_...
Altera_Forum
Honored Contributor
21 years agoHi Ken,
I think that might be the problem. However, I only get an "undefined reference to 'sem_init'" error from the linker when DEBUG=1 and it attempts to generate the .gdb file. When DEBUG=0, the linker does not report any errors or warnings when it generates the application. What path do I need to follow within the kernel configuration menu to check and see if IPC support is turned on? The only choice in the menu options that I found that was related to semaphores is "General Setup --> POSIX message queues". Is that right? I'll also take a look at those linux examples to make sure I'm initializing the semaphores correctly. Thanks for your help. UPDATE: (8/24/05): I enabled the "General Setup -> POSIX message queues" from the kernel configuration menu, performed a new build, and downloaded the new vmlinux.bin file. However, the application still causes a Nios2 reboot as soon as sem_init() is called. Is there something else I'm missing?