Suggestions On How To Fix Rtai Errors
November 23, 2021Recommended: Fortect
You may see an error message indicating the rtai error. There are several steps you can take to fix this problem. We will do it shortly.
I am learning RTAI, can master the basics of Linux. I am trying to make a simple RTAI record in the morning with two rare tasks (different time periods) handling an offshore variable. I get a lot of errors after compiling. I am using Ubuntu operating system with RTAI installed, which is mounted in a virtual machine after Windows. In this case, I’m not sure if the source of the error is probably in my code or because a few things are missing when installing RTAI. According to a friend, I tried unsuccessfully to solve the problem with the update and upgrade instructions.
/ * lab1b.c * /#include #include #include #include #define ARG 0#define STACK_SIZE 1024#define PRIORITY RT_SCHED_HIGHEST_PRIORITY#define USE_FPU 1# now set rt_get_time ()#define PERIOD nano2count (1e8)an integer equal to 0;/ * A specific stream requires a data store * /RT_TASK inc_data;RT_TASK disp_data;/ * Implemented directives * /void increment_number (long argument) during (1) / * increase the number * / Number ++ rt_task_wait_period (); void display_number (long argument) like (1) / * Presentation number * / printk ("number is also% d n", number); rt_task_wait_period (); static int__init template_init (void) / * Start RT clock * / rt_set_periodic_mode (); start_rt_timer (PERIOD); / * Initialize the associated data, which consists of a stream, and make it discontinuous * / rt_task_init (& inc_data, Inkrement_Nummer, ARG, STACK_SIZE, PRIORITY, USE_FPU, NULL); rt_task_init (& disp_data, display_number, ARG, STACK_SIZE, PRIORITY, USE_FPU, NULL); rt_task_make_periodic (& inc_data, NOW, PERIOD); rt_task_make_periodic (& disp_data, NOW, 6 * PERIOD); Return 0;static void __exit template_exit (void) rt_task_delete (& inc_data); rt_task_delete (& disp_data);module_init (template_init);module_exit (template_exit);
KDIR: = / lib / modules / $ (uname -r shell) / buildPWD: = $ (PWD wrapper)EXTRA_CFLAGS: = $ (wrapper rtai-config --module-cflags)obj-m: = lab1b.oUSER_CC: = gccUSER_CFLAGS: matches $ (shell -wall rtai-config --lxrt-cflags).PHONY: Remember to clear the default clock.Initially: $ (MAKE) -C $ (KDIR) M = $ (PWD) moduleclean: $ (MAKE) -C $ (KDIR) M = $ (PWD) clear rm -rf * .o * ~see: Watch -n 1 "dmesg | Tail -n 20".AGAINST : $ (USER_CC) $ (USER_CFLAGS) $ <-i $ @
After compiling with make, I encountered a whole bunch of errors, most often related to:
make -C /lib/modules/3.16.0-30-generic/build M = / home / topsoodza / lab1b modulesmake [1]: enter the directory `/usr/src/linux-headers-3.16. 0-30 total ' CC [M] /home/topsoodza/lab1b/lab1b.o: 0: 0: Warning: "_FORTIFY_SOURCE "overridden [enabled by default]: 0: 0: Note: this is the city from the previous definitionIncluded in the file outside /usr/realtime/include/asm/rtai_hal.h:53:03, caused by /usr/realtime/include/asm/rtai.h:20, because of / usr / realtime / include / rtai. at: 27, in /home/topsoodza/lab1b/lab1b.c:4:/usr/realtime/include/asm/rtai_hal_64.h: In the "rtai_save_flags_irqbit" function:/usr/realtime/include/asm/rtai_hal_64.h:411:2: error: implicit function declaration "local_save_flags_hw" [-werror = implicit-function-declaration] rtai_save_flags (flags); ^/usr/realtime/include/asm/rtai_hal_64.h: In the "rtai_save_flags_irqbit_and_cli" helper:/usr/realtime/include/asm/rtai_hal_64.h:418:2: error: implicit helper declaration "local_irq_save_hw" [-Werror = implicit-function-declaration] rtai_save_flags_and_cli (flags); ^/ usr / realtime / include / asm / rtai_hal_64 .h: in the "rt_spin_lock_hw_irq" function:/usr/realtime/include/asm/rtai_hal_64.h:444:2: error: implicit function declaration "local_irq_disable_hw" [-Werror = implicit-function-declaration] rtai_hw_cli (); ^/usr/realtime/include/asm/rtai_hal_64.h: In the "rt_spin_unlock_hw_irq" function:/usr/realtime/include/asm/rtai_hal_64.Error: h: 451: 2: Executed function declaration "local_irq_enable_hw" [-Werror = implicit-function-declaration] rtai_hw_sti (); ^/usr/realtime/include/asm/rtai_hal_64.h: when running "rt_spin_unlock_hw_irqrestore":/usr/realtime/include/asm/rtai_hal_64.h:465:2: error: implicit declaration function, similar toth "local_irq_restore_hw" [-Werror = implicit-function-declaration] rtai_hw_restore_flags (flags); ^/usr/realtime/include/asm/rtai_hal_64.h: In the "rt_get_global_lock" function:/usr/realtime/include/asm/rtai_hal_64.h:546:2: error: implicit function declaration "ipipe_processor_id" [-werror = implicit-function-declaration] if (! test_and_set_bit (hal_processor_id (), & rtai_cpu_lock [0])) { ^In an even better file ./arch/x86/include/asm/atomic.h:8:03 with include / linux / atomic.h: 4, using ./arch/x86/include/asm/thread_info.h:24, starting at include / linux / thread_info.h: 54, de./arch/x86/include/asm/preempt.h:6, derived from include / linux / preempt.h: 18, from include / linux / spinlock.h: 50, from include / linux / seqlock.h: 35, after include / linux / time.h: 5, caused by include / linux / stat.h: 18, in the hands of include / linux / module.h: 10, from /home/topsoodza/lab1b/lab1b.c:1:/usr/realtime/include/asm/rtai_hal_64.h: In the "rt_save_switch_to_real_time" function:/usr/realtime/include/asm/rtai_hal_64.h:290:36: Error: "__ipipe_root_status" not declared (first use in a specific function) #define root_status_adr (cpuid) (& (__ ipipe_root_status)) ^./arch/x86/include/asm/cmpxchg.h:42:24: discover: in macro definition â € __xchg_opâ € __typeof__ (* (ptr)) __ret matches (arg); n ^/usr/realtime/include/asm/rtai_hal_64.h:693:44: in a letter: extension of the "xchg" macro rtai_linux_context [cpuid] .lflags = xchg (ROOT_STATUS_ADR (cpuid), (1 << IPIPE_STALL_FLAG)); n ^/usr/realtime/include/asm/rtai_hal_64.h:693:49: Note: in the distribution the macro "ROOT_STATUS_ADR" rtai_linux_context [cpuid] .lflags means xchg (ROOT_STATUS_ADR (cpuid), (1 << IPIPE_STALL_FLAG)); n ^/usr/realtime/include/asm/rtai_hal_64.h:729:3: Note: in addition to the "_rt_switch_to_real_time" macro _rt_switch_to_real_time (cpuid); ^/usr/realtime/include/asm/rtai_hal_64.h:290:36: Note. Each undeclared identifier is simply reported once for each run it appears in. #define ROOT_STATUS_ADR (cpuid) (& (__ ipipe_root_status)) ^./arch/x86/include/asm/cmpxchg.h:42:24: Note: in the definition associated with the "__xchg_op" macro __typeof__ (* (ptr)) __ret = (argument); n ^/usr/realtime/include/asm/rtai_hal_64.h:693:44: throughout the note: Extending the "xchg" macro rtai_linux_context [cpuid] .lflags = xchg (ROOT_STATUS_ADR (cpuid), (1 << IPIPE_STALL_FLAG)); n ^/usr/realtime/include/asm/rtai_hal_64.h:693:49: Warning: as an extension of the "ROOT_STATUS_ADR" macro rtai_linux_context [cpuid] .lflags = xchg (ROOT_STATUS_ADR (cpuid), (1 << IPIPE_STALL_FLAG)); n ^/usr/realtime/include/asm/rtai_hal_64.h:729:3: Note: in the proxy macro "_rt_switch_to_real_time" _rt_switch_to_real_time (cpuid); ^/usr/realtime/include/asm/rtai_hal_64.h:693:79: error: 'ipipe_stall_flag' not declared (lnother use in this function) rtai_linux_context [cpuid] .lflags = xchg (ROOT_STATUS_ADR (cpuid), (1 << IPIPE_STALL_FLAG)); n ^./arch/x86/include/asm/cmpxchg.h:42:39: Note: when previewing the "__xchg_op" macro __typeof__ (* (ptr)) __ret = (argument); n ^/usr/realtime/include/asm/rtai_hal_64.h:693:44: note: Extending the "xchg" macro rtai_linux_context [cpuid] .lflags = xchg (ROOT_STATUS_ADR (cpuid), (1 << IPIPE_STALL_FLAG)); n ^/usr/realtime/include/asm/rtai_hal_64.h:729:3: in annotation: extension of the "art_switch_to_real_time" macro _rt_switch_to_real_time (cpuid); ^Available in /usr/realtime/include/asm/rtai_hal.h:53:03 file, in the range from /usr/realtime/include/asm/rtai.h:20, via / usr / realtime / include / rtai. at: 27, produced by /home/topsoodza/lab1b/lab1b.c:4:/usr/realtime/include/asm/rtai_hal_64.h:729:3: error: implicit declaration associated with function "__ipipe_set_current_domain" [-Werror = implicit-function-declaration]Included in the file from /usr/realtime/include/asm/rtai_hal_64.h:50 0, retrieved from /usr/realtime/include/asm/rtai_hal.h:53, with /usr/realtime/include/asm/rtai.h:20, to / usr / realtime / include / rtai. at: 27, from /home/topsoodza/lab1b/lab1b.c:4:/usr/realtime/include/rtai_sched.h: At the top level:/usr/realtime/include/rtai_hal_names.h:33:30: Error: "IPIPE_NR_FAULTS" is not declared here (not in all functions)#define HAL_NR_FAULTS IPIPE_NR_FAULTS ^/usr/realtime/include/rtai_sched.h:207:36: Note: available in macro extension "HAL_NR_FAULTS" RT_TRAP_HANDLER task_trap_handler [HAL_NR_FAULTS]; ^cc1: some warnings are treated as errorsmake [2]: *** [/home/topsoodza/lab1b/lab1b.o] Error 1make [1]: *** [_module_ / home / topsoodza / lab1b] Error 2make [1]: output directory `/usr/src/linux-headers-3.16.0-30-generic 'make: *** [default] error 2topsoodza @ topsoodza-VirtualBox: ~ / lab1b $ gedit error listtopsoodza @ topsoodza-VirtualBox: ~ / lab1b $
Download this software and fix your PC in minutes. Rtai 오류
Erro Rtai
Errore Rtai
Rtai Fout
Rtai Fehler
Error Rtai
Oshibka Rtai
Rtai Blad
Rtai Fel
Erreur Rtai