VxWorks

Relocation value does not fit in 24 bits

那年仲夏 提交于 2019-12-22 08:59:42
问题 I tried to load a code file to memory using the vxWorks function loadModule and it gave me the error: Relocation value does not fit in 24 bits I tried to add the -mlongcall flag in my compiler but it doesn't work. 回答1: I have seen this error before working in a PowerPC architecture. Assuming that you are working in a similar environment, the issue has to do specifically with the amount of memory in the system and the range of the relative branch instruction. The Argonne National Labs has a

Why are particular UDP messages always getting dropped below a particular buffer size?

这一生的挚爱 提交于 2019-12-18 18:59:12
问题 3 different messages are being sent to the same port at different rates: Message size (bytes) Sent every transmit speed High 232 10 ms 100Hz Medium 148 20ms 50Hz Low 20 60 ms 16.6Hz I can only process one message every ~ 6 ms . Single threaded. Blocking read. A strange situation is occurring, and I don't have an explanation for it. When I set my receive buffer to 4,799 bytes, all of my low speed messages get dropped. I see maybe one or two get processed, and then nothing. When I set my

How can I cancel a blocked read/recvfrom system call on vxworks or linux

房东的猫 提交于 2019-12-13 12:22:35
问题 In TASK I : ... while (1) { if (running == false) break; ret = read(fd, buf, size); /* Or: ret = recvfrom(sock, buf, size, 0, NULL, NULL); */ ... } In task II : ... running = true; /* ioctl(fd, FIOCANCEL, 0); */ close(fd); /* Or: close(sock);*/ what should do in task II to cancel the blocked task I , In vxworks , there is a function, ioctl(fd, FIOCANCEL, 0) to cancel a blocked read or write but it can not work. Probably because the driver can not support "FIOCANCEL" . how to write task II in

Using system symbol table from VxWorks RTP

断了今生、忘了曾经 提交于 2019-12-13 04:37:25
问题 I have an existing project, originally implemented as a Vxworks 5.5 style kernel module. This project creates many tasks that act as a "host" to run external code. We do something like this: void loadAndRun(char* file, char* function) { //load the module int fd = open (file, O_RDONLY,0644); loadModule(fdx, LOAD_ALL_SYMBOLS); SYM_TYPE type; FUNCPTR func; symFindByName(sysSymTbl, &function , (char**) &func, &type); while (true) { func(); } } This all works a dream, however, the functions that

How to set keepalive option for induvidual socket in VxWorks

天涯浪子 提交于 2019-12-13 01:17:23
问题 Is there any way to set keepalive for induvidual socket descriptor in vxworks? I read in some documents that "SOL_TCP" option in setsockopt function will do such favors in linux. Is such facility available in VxWorks too? If so please provide related details regarding the same, like what are the include file we need to include and how to use such option etc. 回答1: From the VxWorks "Library Reference" manual (can be download): OPTIONS FOR STREAM SOCKETS The following sections discuss the socket

Design patterns commonly used for RTOS (VXworks)

﹥>﹥吖頭↗ 提交于 2019-12-12 08:17:11
问题 Can anyone help me on design patterns commonly used for RTOS? In VXworks, which pattern is more preferable? 回答1: Can we ignore the second sentence in your question? It is meaningless, and perhaps points to a misunderstanding of design patterns. The first part is interesting however. That said, I would generalise it to cover real-time systems rather than RTOS. Many of the most familiar patterns are mechanistic, but in real-time systems higher-level architectural patterns are also important.

Redirect VxWorks Serial Input

醉酒当歌 提交于 2019-12-12 05:06:51
问题 I am trying to redirect all serial data to a process in VxWorks. Using the following code fd = open("/tyCo/0", O_RDWR,0); ioctl(fd, FIOSETOPTIONS, OPT_TERMINAL & ~OPT_7_BIT); read(fd, line, 100); gives the correct input, except the first character entered is not populated, but is printed to the terminal. So if I enter "Hello", "H" is printed out and line="ello". If I don't enter anything and hit the return key, I get a prompt from the VxWorks Shell. I think that the VxWorks Shell is

C interp: unknown symbol name 'inetstatShow'

梦想的初衷 提交于 2019-12-12 02:49:51
问题 I have some Vxworks embedded os and I want to check the netstat . This is what I tried: -> inetstatShow And the output is: C interp: unknown symbol name 'inetstatShow'. How can I have netstat command in this? 回答1: inetstatShow is provided by netShow library - you need to be sure that your OS configuration includes netShow, or you can dynamically load it using ld. The lkup function can be used to list symbols that are available to the shell. Try lkup "Show" to list all symbols that include the

vxWorks 6.8 mapping physical to virtual memory

馋奶兔 提交于 2019-12-11 18:46:42
问题 This is my first question here :). I been trying for while now to map physical memory to virtual memory in vxWorks 6.8 with no success, I'm trying to use "vmMap" function but somehow it keeps return with: errno = 0x30065 S_taskLib_NAME_NOT_FOUND. my code is: int page_size=0; PHYS_ADDR GPIO_BASE_VIRTUAL_ADDR = 0x40E00000; VIRT_ADDR VIRTUAL_ADDR=0; page_size =vmPageSizeGet(); if((VIRTUAL_ADDR = (VIRT_ADDR)memalign(page_size,page_size*2))==NULL)// allocate 2 pages { printf("error in memalign()

Problem with ADA file executed by a c++(UsrAppInit) in VXWorks 6.7(workspace-4)?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 15:38:30
问题 I have a file build and compiled correctly in ADA (a simple Hello world). I want to execute the file .o from a c++ using taskspawn. To do that I have read that you must declare in the c++ something like that: ... #include <taskLib.h> /* Ada binder-generated main - ADA_MAIN is passed as a macro from the makefile */ extern void ADA_MAIN(void); void UsrAppInit() { int stackSize = 0x80000; int spawnFlags = VX_FP_TASK; /* MAIN_TASK_NAME is passed as a macro from the makefile */ char * mainTaskName