vxworks

How are the vxWorks "kernel shell" and "host shell" different?

In the vxWorks RTOS, there is a shell that allows you to issue command to your embedded system. The documentation refers to kernel shell, host shell and target shell. What is the difference between the three? ...

How does vxWorks deal with two tasks at the same priority?

We have two tasks (T1 and T2) in our vxWorks embedded system that have the same priority (110). How does the regular vxWorks scheduler deal with this if both tasks are ready to run? Which task executes first? ...

What happens to your time slice if you get pre-empted in vxWorks?

If you have round robin enabled in Vxworks and your task gets preempted by a higher priority task, what happens to the remaining time slice? ...

What happens to the time slice if you disable preemption in vxWorks?

If you have round robin scheduling enabled in VxWorks, and you use taskLock() to disable preemption, what happens when your timeslice expires? ...

Can I display the list of all the system objects (semaphores, queues...) in VxWorks?

I would like to know what semaphores, messageQueues, etc... are active in my vxWorks 6.x system. I have access to this information via the debugger, but I would like access to it from the shell. Is there a way? ...

How can I specify the maximum amount of heap an RTP can use in VxWorks?

We are creating a Real-Time Process in VxWorks 6.x, and we would like to limit the amount of memory which can be allocated to the heap. How do we do this? ...

How can I know why one of my vxWorks task is pended?

In vxWorks, I can issue the "i" command in the shell, and I get the list of tasks in my system along with some information like the following example: NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY ---------- ------------ -------- --- ---------- -------- -------- ------- ----- tJobTask 1005a6e0 ...

Why is there no main() function in vxWorks?

When using vxWorks as a development platform, we can't write our application with the standard main() function. Why can't we have a main function? ...

How do I redirect Tornado / VXWorks shell output?

I've been working on an embedded C/C++ project recently using the shell in Tornado 2 as a way of debugging what's going on in our kit. The only problem with this approach is that it's a complicated system and as a result, has a fair bit of output. Tornado 'helpfully' scrolls the window every time some new information arrives which means ...

Why do I need to SEM_PRIORITY_Q when using a VxWorks inversion safe mutex?

In VxWorks, I am creating a mutex with the SEM_INVERSION_SAFE option, to protect against the priority inversion problem. The manual says that I must also use the SEM_PRIORITY_Q option. Why is that? ...

How does VxWorks deal with priority inheritance?

We have 3 tasks running at different priorities: A (120), B (110), C (100). A takes a mutex semaphore with the Inversion Safe flag. Task B does a semTake, which causes Task A's priority to be elevated to 110. Later, task C does a semTake. Task A's priority is now 100. At this point, A releases the semaphore and C grabs it. We notice tha...

How do I access my memory mapped I/O Device (FPGA) from a RTP in VxWorks?

When using VxWorks, we are trying to access a memory mapped I/O device from a Real-Time Process. Since RTPs have memory protection, how can I access my I/O device from one? ...

Why am I losing data when using a vxWorks pipe?

I am using pipes to transfer information between two vxWorks tasks. Here is a code sample: Init() { fd = open("/pipe/mydev", O_RDWR, 0777); ... } taskRx() { ... len = read(fd, rxbuf, MAX_RX_LEN); ... } taskTx() { ... len = write(fd, txbuf, txLen); ... } If we send a message that is longer than MAX_RX_LEN, (ie t...

Is there a way to use the same file for both a RTP and a kernel module in vxWorks?

We have a vxWorks application that we would like to deploy either as a kernel module, or as a Real-Time process. Is there a way to do this from the same source file, or do we have to create one file for the kernel module and another for the RTP? ...

How can a task wait on multiple vxworks Queues?

We have a vxWorks design which requires one task to process both high and low priority messages sent over two message queues. The messages for a given priority have to be processed in FIFO order. For example, process all the high priority messages in the order they were received, then process the low priority messages. If there is no...

How do I define my own errno values?

When developing a module (device driver, middleware, etc...) that will run in the kernel space, we would like to have some way to capture the reason an operation might fail. In VxWorks, The errno mechanism seems to be a good way to do this. Is it possible to define my own errno values? ...

Will a task using kill to send a signal be preempted?

We have the following code in VxWorks: sig_hdr () { ... } task_low_priority() { ... // Install signal handler for SIGUSR1 signal(SIGUSR1, sig_hdr); ... } task_high_priority() { ... kill(pid, SIGUSR1); //pid is the ID of task_low_priority ... } The high priority task sends a signal (via kill) to the low pr...

How to receive UDP Multicast in VxWorks 5.5

I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the multicast group: setsockopt(soc, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) &ipMreq, sizeof (ipMreq)); Similar code on an adjacent Windows machine does receive multicast. I am able to send multicast from VxWorks; ifShow() indicates the interface is multicast c...

Can I implement a cooperative multi-tasking system in VxWorks?

A legacy embedded system is implemented using a cooperative multi-tasking scheduler. The system essentially works along the following lines: Task A does work When Task A is done, it yields the processor. Task B gets the processor and does work. Task B yields ... Task n yields Task A gets scheduled and does work One big Circular ...

Can I display the global variables of a RTP in the shell?

In VxWorks, I can display global variables in the shell like so: -> my_global my_global = 0x103c4110: value = 4 = 0x4 Is there a way to do the same with a RTP global variable? ...