OpenCN detailed documentation

Now when i try to run using using below commands
$ cd <OPENCN_HOME>/agency
$ ./st

I get error

nadim@nadim-pc:~/opencn/agency$ ./st
./st: line 1: #!/bin/bash: No such file or directory
qemu-system-x86_64: -hda /home/nadim/opencn/agency/filesystem/sdcard.img.x86-qemu: Could not open ‘/home/nadim/opencn/agency/filesystem/sdcard.img.x86-qemu’: No such file or directory

Am i still missing something? I cannot see any sdcard.img.x86-qemu at the given location.

Thanks and Regards

Great if you were able to compile the framework ! (I will fix the compilation error).

Once the compilation is completed, the next step is to deploy it.
the steps are, from agency folder:

  1. ./deploy -f It formats the SD card or create it in emulation case
  2. ./deploy -a It deploys all components (kernel, rootfs, apps) in the SD card

You can get the help of this tool: ./deploy -h

Hope this helps
J-P

1 Like

I will try this step.
I thought that the deploy steps are for real devices only so i skipped this step and tried to start qemu emulation directly.

I will try and update you.

Qemu booted: below log of boot.

nadim@nadim-pc:~/opencn/agency$ ./deploy.sh -f
Formating SD Card on ‘’ (platform: x86-qemu)…
Creating sdcard.img.x86-qemu …

Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x631f4c44.

Command (m for help): Created a new DOS disklabel with disk identifier 0x82b38413.
[ 0.000000] Linux version 5.4.44 (nadim@nadim-pc) (gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)) #1 SMP Mon Aug 14 20:19:21 IST 2023
[ 0.000000] Command line: root=/dev/ram console=ttyS0 earlyprintk=pciserial
[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003ffdefff] usable
[ 0.000000] BIOS-e820: [mem 0x000000003ffdf000-0x000000003fffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] printk: bootconsole [earlyser0] enabled
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 1190.834 MHz processor
[ 0.396167] last_pfn = 0x3ffdf max_arch_pfn = 0x400000000
[ 0.397283] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.408216] found SMP MP-table at [mem 0x000f5a70-0x000f5a7f]
[ 0.410854] check: Scanning 1 areas for low memory corruption
[ 0.414310] ACPI: Early table checksum verification disabled
[ 0.414833] ACPI: RSDP 0x00000000000F5A30 000014 (v00 BOCHS )
[ 0.415224] ACPI: RSDT 0x000000003FFE13E7 000034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.416137] ACPI: FACP 0x000000003FFE1283 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.416841] ACPI: DSDT 0x000000003FFDFDC0 0014C3 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
[ 0.417192] ACPI: FACS 0x000000003FFDFD80 000040
[ 0.417393] ACPI: APIC 0x000000003FFE12F7 000090 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.417667] ACPI: HPET 0x000000003FFE1387 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.417954] ACPI: WAET 0x000000003FFE13BF 000028 (v01 BOCHS BXPCWAET 00000001 BXPC 00000001)
[ 0.421340] Zone ranges:
[ 0.421467] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.421684] DMA32 [mem 0x0000000001000000-0x000000003ffdefff]
[ 0.421869] Normal empty
[ 0.421976] Movable zone start for each node
[ 0.422151] Early memory node ranges
[ 0.422295] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.422635] node 0: [mem 0x0000000000100000-0x000000003ffdefff]
[ 0.424036] Zeroed struct page in unavailable ranges: 131 pages
[ 0.424241] Initmem setup node 0 [mem 0x0000000000001000-0x000000003ffdefff]
[ 0.445256] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.445818] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
[ 0.446166] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.446632] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.446875] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.447271] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.447495] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.447935] Using ACPI (MADT) for SMP configuration information
[ 0.448201] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.448694] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[ 0.449673] [mem 0x40000000-0xfffbffff] available for PCI devices
[ 0.450248] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.450934] setup_percpu: NR_CPUS:4 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
[ 0.458648] percpu: Embedded 52 pages/cpu s173096 r8192 d31704 u524288
[ 0.460681] Built 1 zonelists, mobility grouping on. Total pages: 257896
[ 0.461005] Kernel command line: root=/dev/ram root=/dev/ram console=ttyS0 earlyprintk=pciserial
[ 0.502943] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.504355] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.506372] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.512663] Memory: 1006612K/1048052K available (10243K kernel code, 865K rwdata, 2388K rodata, 3408K init, 1796K bss, 41440K reserved, 0K cma-reserved)
[ 0.516892] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.532280] rcu: Hierarchical RCU implementation.
[ 0.532882] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[ 0.535893] NR_IRQS: 4352, nr_irqs: 456, preallocated irqs: 16
[ 0.546251] random: get_random_bytes called from start_kernel+0x306/0x4a6 with crng_init=0
[ 0.554055] Console: colour VGA+ 80x25
[ 0.555972] printk: console [ttyS0] enabled
[ 0.555972] printk: console [ttyS0] enabled
[ 0.556555] printk: bootconsole [earlyser0] disabled
[ 0.556555] printk: bootconsole [earlyser0] disabled
[ 0.557149] ACPI: Core revision 20190816
[ 0.562346] APIC: Switch to symmetric I/O mode setup
[ 0.568011] …TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.573095] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x112a48f5f74, max_idle_ns: 440795263567 ns
[ 0.574298] Calibrating delay loop (skipped), value calculated using timer frequency… 2381.66 BogoMIPS (lpj=1190834)
[ 0.575207] pid_max: default: 32768 minimum: 301
[ 0.576447] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.576723] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.592902] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.593105] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.593701] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[ 0.594372] Spectre V2 : Mitigation: Full generic retpoline
[ 0.594617] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[ 0.594922] Speculative Store Bypass: Vulnerable
[ 0.595327] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[ 0.601432] Freeing SMP alternatives memory: 28K
[ 0.816087] smpboot: CPU0: Intel Core i7 9xx (Nehalem Class Core i7) (family: 0x6, model: 0x1a, stepping: 0x3)
[ 0.819721] Performance Events: unsupported p6 CPU model 26 no PMU driver, software events only.
[ 0.821387] rcu: Hierarchical SRCU implementation.
[ 0.824021] smp: Bringing up secondary CPUs …

BOOting CPU 1

[ 0.825733] x86: Booting SMP configuration:
smpboot: CPU 1 Converting physical 0 to logical die 1
start_secondary: waiting on CPU 1 for starting Xenomai initialization …
Agency RT CPU is CPU #1
[Xeno** Agmai] scheduling class idle registeencrey RT CPU gets invisible for Linux…
d.
[Xenomai] scheduling class rt registered.

BOOting CPU 2

Cobalt vSOO-1.1 (SOO-xenocobalt)
[ 0.825920] … node #0, CPUs: #1 #2
[ 0.020906] smpboot: CPU 2 Converting physical 0 to logical die 2
[ 0.020906] calibrate_delay_direct() dropping max bogoMips estimate 0 = 1410921

BOOting CPU 3

[ 0.966456] #3
[ 0.020906] smpboot: CPU 3 Converting physical 0 to logical die 3
[ 1.027320] smp: Brought up 1 node, 3 CPUs
[ 1.027350] smpboot: Max logical packages: 4
[ 1.027517] smpboot: Total of 3 processors activated (7203.90 BogoMIPS)
[ 1.039078] devtmpfs: initialized
[ 1.055010] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 1.055271] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 1.065603] NET: Registered protocol family 16
xenomai_pre_init: waiting on CPU 0 for Xenomai/Cobalt fully initialized…
[ 1.088164] cpuidle: using governor menu
vbus_init: initializing vbstore…
… vbstore SOO Agency setting up…
vbs_store_mkdir: creating backend entry for /backend virtual driver…
vbs_store_mkdir: creating backend entry for /device virtual driver…
vbs_store_mkdir: creating backend entry for /domain virtual driver…
vbs_store_mkdir: creating backend entry for /domain/gnttab virtual driver…
vbs_store_mkdir: creating backend entry for /domain/gnttab/0 virtual driver…
vbs_store_mkdir: creating backend entry for /domain/gnttab/1 virtual driver…
vbs_store_mkdir: creating backend entry for /domain/gnttab/2 virtual driver…
vbs_store_mkdir: creating backend entry for /domain/gnttab/3 virtual driver…
vbs_store_mkdir: creating backend entry for /domain/gnttab/4 virtual driver…
vbs_store_mkdir: creating backend entry for /domain/gnttab/5 virtual driver…
vbs_store_mkdir: creating backend entry for /domain/gnttab/6 virtual driver…
vbs_store_mkdir: creating backend entry for /soo virtual driver…
vbs_store_mkdir: creating backend entry for /soo/directcomm virtual driver…
vbs_store_mkdir: creating backend entry for /soo/directcomm/0 virtual driver…
vbs_store_mkdir: creating backend entry for /soo/directcomm/1 virtual driver…
vbs_store_mkdir: creating backend entry for /soo/directcomm/2 virtual driver…
vbs_store_mkdir: creating backend entry for /soo/directcomm/3 virtual driver…
vbs_store_mkdir: creating backend entry for /soo/directcomm/4 virtual driver…
vbs_store_mkdir: creating backend entry for /soo/directcomm/5 virtual driver…
vbs_store_mkdir: creating backend entry for /soo/directcomm/6 virtual driver…
vbus_vbstore_init: done.
[ 1.100916] ACPI: bus type PCI registered
[ 1.103046] PCI: Using configuration type 1 for base access
[ 1.104866] mtrr: your CPUs had inconsistent fixed MTRR settings
[ 1.105087] mtrr: your CPUs had inconsistent variable MTRR settings
[ 1.105087] mtrr: your CPUs had inconsistent MTRRdefType settings
[ 1.105087] mtrr: probably your BIOS does not setup all CPUs.
[ 1.105121] mtrr: corrected configuration.
[ 1.162052] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
OpenCN: core subsystem initialization.
RTAPI: Init
RTAPI: Init complete
[ 1.191955] OpenCN: halcmd_init streamer subsystem initialization.
[ 1.193889] ACPI: Added _OSI(Module Device)
[ 1.194154] ACPI: Added _OSI(Processor Device)
[ 1.194446] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 1.194676] ACPI: Added _OSI(Processor Aggregator Device)
[ 1.195308] ACPI: Added _OSI(Linux-Dell-Video)
[ 1.195539] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[ 1.195802] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[ 1.213847] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 1.232649] ACPI: Interpreter enabled
[ 1.233472] ACPI: (supports S0 S5)
[ 1.233667] ACPI: Using IOAPIC for interrupt routing
[ 1.234495] PCI: Using host bridge windows from ACPI; if necessary, use “pci=nocrs” and report a bug
[ 1.236678] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 1.270006] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 1.270603] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
[ 1.273582] PCI host bridge to bus 0000:00
[ 1.274006] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 1.274142] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 1.274440] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 1.274702] pci_bus 0000:00: root bus resource [mem 0x40000000-0xfebfffff window]
[ 1.275008] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
[ 1.275519] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.276671] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[ 1.279899] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
[ 1.280087] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
[ 1.284750] pci 0000:00:01.1: reg 0x20: [io 0xc020-0xc02f]
[ 1.285197] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 1.285478] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 1.286156] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 1.286415] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 1.287705] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
[ 1.288484] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
[ 1.288760] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 1.289660] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
[ 1.291873] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
[ 1.294148] pci 0000:00:02.0: reg 0x18: [mem 0xfebd4000-0xfebd4fff]
[ 1.296811] pci 0000:00:02.0: reg 0x30: [mem 0xfebc0000-0xfebcffff pref]
[ 1.298823] pci 0000:00:03.0: [8086:10d3] type 00 class 0x020000
[ 1.300087] pci 0000:00:03.0: reg 0x10: [mem 0xfeb80000-0xfeb9ffff]
[ 1.301840] pci 0000:00:03.0: reg 0x14: [mem 0xfeba0000-0xfebbffff]
[ 1.303826] pci 0000:00:03.0: reg 0x18: [io 0xc000-0xc01f]
[ 1.306921] pci 0000:00:03.0: reg 0x1c: [mem 0xfebd0000-0xfebd3fff]
[ 1.312087] pci 0000:00:03.0: reg 0x30: [mem 0xfeb40000-0xfeb7ffff pref]
[ 1.319390] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 1.320471] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 1.321190] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 1.321779] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[ 1.322415] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[ 1.345031] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[ 1.345087] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[ 1.345209] pci 0000:00:02.0: vgaarb: bridge control possible
[ 1.345892] vgaarb: loaded
[ 1.348339] SCSI subsystem initialized
[ 1.350863] ACPI: bus type USB registered
[ 1.351653] usbcore: registered new interface driver usbfs
[ 1.352248] usbcore: registered new interface driver hub
[ 1.352578] usbcore: registered new device driver usb
[ 1.353164] pps_core: LinuxPPS API ver. 1 registered
[ 1.353394] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 1.353765] PTP clock support registered
[ 1.354174] EDAC MC: Ver: 3.0.0
[ 1.358202] PCI: Using ACPI for IRQ routing
EtherCAT: Master driver 1.5.2 REV
EtherCAT: 1 master waiting for devices.
[ 1.370024] clocksource: Switched to clocksource tsc-early
[ 1.428346] pnp: PnP ACPI init
[ 1.432351] pnp: PnP ACPI: found 6 devices
[ 1.465377] thermal_sys: Registered thermal governor ‘step_wise’
[ 1.465452] thermal_sys: Registered thermal governor ‘user_space’
[ 1.466450] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 1.466983] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 1.467218] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 1.467468] pci_bus 0000:00: resource 7 [mem 0x40000000-0xfebfffff window]
[ 1.467703] pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff window]
[ 1.469181] NET: Registered protocol family 2
[ 1.476031] tcp_listen_portaddr_hash hash table entries: 512 (order: 2, 20480 bytes, linear)
[ 1.476373] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 1.476904] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[ 1.477406] TCP: Hash tables configured (established 8192 bind 8192)
[ 1.478981] UDP hash table entries: 512 (order: 3, 49152 bytes, linear)
[ 1.479441] UDP-Lite hash table entries: 512 (order: 3, 49152 bytes, linear)
[ 1.480966] NET: Registered protocol family 1
[ 1.481483] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 1.481892] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 1.482181] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 1.482992] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 1.483427] PCI: CLS 0 bytes, default 64
[ 1.594390] check: Scanning for low memory corruption every 60 seconds
[ 1.598898] workingset: timestamp_bits=62 max_order=18 bucket_order=0
[ 1.690480] Key type asymmetric registered
[ 1.690821] Asymmetric key parser ‘x509’ registered
[ 1.691177] io scheduler mq-deadline registered
[ 1.691380] io scheduler kyber registered
HAL_LIB: loading kernel lib
RTAPI: initing comp HAL_LIB
RTAPI: comp ‘HAL_LIB’ loaded, ID: 1
RTAPI: shmem 01 created by comp 01, key: 0x48414c32, size: 348160
HAL_LIB: kernel lib installed successfully
[ 1.697080] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.719807] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 1.726331] Non-volatile memory driver v1.3
[ 1.726527] Linux agpgart interface v0.103
[ 1.729592] bochs-drm 0000:00:02.0: remove_conflicting_pci_framebuffers: bar 0: 0xfd000000 → 0xfdffffff
[ 1.730042] bochs-drm 0000:00:02.0: remove_conflicting_pci_framebuffers: bar 2: 0xfebd4000 → 0xfebd4fff
[ 1.730468] bochs-drm 0000:00:02.0: vgaarb: deactivate vga console
[ 1.731899] Console: switching to colour dummy device 80x25
[ 1.736111] [drm] Found bochs VGA, ID 0xb0c0.
[ 1.736135] [drm] Framebuffer size 16384 kB @ 0xfd000000, mmio @ 0xfebd4000.
[ 1.738334] [TTM] Zone kernel: Available graphics memory: 503320 KiB
[ 1.738773] [TTM] Initializing pool allocator
[ 1.739219] [TTM] Initializing DMA pool allocator
[ 1.741783] [drm] Found EDID data blob.
[ 1.747551] [drm] Initialized bochs-drm 1.0.0 20130925 for 0000:00:02.0 on minor 0
[ 1.766838] fbcon: bochs-drmdrmfb (fb0) is primary device
[ 1.790862] Console: switching to colour frame buffer device 128x48
[ 1.799870] bochs-drm 0000:00:02.0: fb0: bochs-drmdrmfb frame buffer device
[ 1.831059] loop: module loaded
[ 1.841115] scsi host0: ata_piix
[ 1.843204] scsi host1: ata_piix
[ 1.844097] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc020 irq 14
[ 1.844407] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc028 irq 15
[ 1.845723] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 1.846488] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 2.007186] PCI Interrupt Link [LNKC] enabled at IRQ 11
[ 2.008955] e1000e 0000:00:03.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 2.059287] e1000e 0000:00:03.0 0000:00:03.0 (uninitialized): registered PHC clock
[ 2.111118] e1000e 0000:00:03.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:01:29:53:97:ba
[ 2.111900] e1000e 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
[ 2.112677] e1000e 0000:00:03.0 eth0: MAC: 3, PHY: 8, PBA No: 000000-000
[ 2.116639] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 2.116984] ehci-pci: EHCI PCI platform driver
[ 2.117347] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 2.117685] ohci-pci: OHCI PCI platform driver
[ 2.118001] uhci_hcd: USB Universal Host Controller Interface driver
[ 2.118414] usbcore: registered new interface driver usblp
[ 2.120610] usbcore: registered new interface driver usb-storage
[ 2.121603] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[ 2.126316] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 2.126771] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 2.128999] mousedev: PS/2 mouse device common for all mice
[ 2.129853] rtc_cmos 00:05: RTC can wake from S4
[ 2.135367] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[ 2.140361] rtc_cmos 00:05: registered as rtc0
[ 2.141265] rtc_cmos 00:05: alarms up to one day, y3k, 242 bytes nvram
[ 2.145163] device-mapper: ioctl: 4.41.0-ioctl (2019-09-16) initialised: dm-devel@redhat.com
[ 2.145680] hidraw: raw HID events driver (C) Jiri Kosina
[ 2.146987] usbcore: registered new interface driver usbhid
[ 2.147226] usbhid: USB HID core driver
[ 2.153567] IPVS: Registered protocols ()
[ 2.157330] IPVS: Connection hash table configured (size=4096, memory=64Kbytes)
[ 2.162471] IPVS: ipvs loaded.
[ 2.168285] NET: Registered protocol family 10
[ 2.175749] Segment Routing with IPv6
[ 2.176385] NET: Registered protocol family 17
[ 2.177393] Bridge firewalling registered
[ 2.185437] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
[ 2.185812] ata1.00: 16777216 sectors, multi 16: LBA48
[ 2.187461] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[ 2.196296] scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 2.206287] sd 0:0:0:0: [sda] 16777216 512-byte logical blocks: (8.59 GB/8.00 GiB)
[ 2.207691] sd 0:0:0:0: [sda] Write Protect is off
[ 2.208472] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
[ 2.213608] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 2.215852] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5
[ 2.232898] sda: sda1
[ 2.241382] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[ 2.241944] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 2.245717] sr 1:0:0:0: Attached scsi generic sg1 type 5
[ 2.247224] IPI shorthand broadcast: enabled
[ 2.247754] sched_clock: Marking stable (2227605589, 19906340)->(2330327890, -82815961)
[ 2.253198] OpenCN: loopback subsystem initialization.
[ 2.253523] OpenCN: streamer subsystem initialization.
[ 2.253807] OpenCN: sampler subsystem initialization.
[ 2.254002] OpenCN: threads subsystem initialization.
[ 2.254214] OpenCN: lcec subsystem initialization.
[ 2.254453] OpenCN: lcct subsystem initialization.
[ 2.254751] OpenCN: lcct subsystem initialized
[ 2.254949] OpenCN: feedopt subsystem initialization.
[ 2.255174] OpenCN: plc subsystem initialization.
[ 2.260351] sd 0:0:0:0: [sda] Attached SCSI disk
[ 2.261413] OpenCN: simple_pg subsystem initialization.
[ 2.262284] OpenCN: mux subsystem initialization.
[ 2.263347] OpenCN: kinematic subsystem initialization.
[ 2.264311] OpenCN: ocno subsystem initialization.
[ 2.328537] Freeing unused kernel image memory: 3408K
[ 2.328779] This architecture does not have kernel memory protection.
[ 2.329291] Run /init as init process
SOO Agency last initialization part processing now…
sooenv_init: starting SOO environment…
RT Agency ready
[ 2.338671] Low frequency thread…
OpenCN initrd filesystem - now executing init from initramfs
[ 2.862565] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x112a48f5f74, max_idle_ns: 440795263567 ns
[ 2.863447] clocksource: Switched to clocksource tsc
[ 4.795842] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 5.039728] EXT4-fs (sda1): re-mounted. Opts: (null)
/etc/init.d/rcS: line 23: /etc/init.d/S01logging: Permission denied
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator… [ 5.793621] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: OK
[ 6.445352] random: avahi-daemon: uninitialized urandom read (4 bytes read)
[ 6.476843] random: avahi-daemon: uninitialized urandom read (4 bytes read)
Creating OpenCN dev… mkdir: can’t create directory ‘/dev/opencn’: File exists
OK
Logging into file (opencn debug)… – logfile utility –

Enabling RT logging in the file /root/opencn.log

OpenCN logging iOpenCN: enabling in-kernel logging…
nto /root/opencn.log …
starting OpenCN… Enabling RT logging echo
– logfile utility –

Enabling RT logging in the file /root/opencn.log

OpenCN logging shutdown
OpenCN logging: moving /var/log/opencn.log to /root/opencn.log
Loading OpenCN configuration…
Loading OpenCN configuration…
HAL: creating pin ‘hal.rtapi_msg.enable’
hal_systemv: waiting for child ./lcec
Starting lcec component
[ 7.273831] general protection fault: 0000 [#1] SMP
[ 7.274149] CPU: 0 PID: 973 Comm: lcec Not tainted 5.4.44 #1
[ 7.274405] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
[ 7.274915] RIP: 0010:strcpy+0x5/0x20
[ 7.275121] Code: 20 41 f6 80 80 d8 cb 81 01 0f b6 d2 0f 45 ca 48 83 c7 01 39 c8 75 04 85 c0 75 bf 29 c8 c3 0f 1f 80 00 00 00 00 48 89 f8 31 d2 <0f> b6 0c 16 88 0c 10 48 83 c2 01 84 c9 75 f1 c3 66 66 2e 0f 1f 84
[ 7.276326] RSP: 0018:ffffc900001ebdb8 EFLAGS: 00000246
[ 7.276709] RAX: ffffffff824c6c40 RBX: 00007ffcc75aea00 RCX: 00007ffcc75aea00
[ 7.277005] RDX: 0000000000000000 RSI: ff00000000000000 RDI: ffffffff824c6c40
[ 7.277264] RBP: ffffc900001ebe18 R08: 0000000000000000 R09: 0000000000000000
[ 7.277521] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000006900000
[ 7.277779] R13: ffff88803c81a140 R14: ffff88803d85dd80 R15: 00007ffcc75aea00
[ 7.278097] FS: 00007f3a415ee740(0000) GS:ffff88803ea00000(0000) knlGS:0000000000000000
[ 7.278383] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 7.278581] CR2: 00000000004102d8 CR3: 000000003dfb6000 CR4: 00000000000006f0
[ 7.278889] Call Trace:
[ 7.279461] ? lcec_ioctl+0xe0/0x215
[ 7.279681] do_vfs_ioctl+0x39a/0x650
[ 7.279929] ? putname+0x47/0x70
[ 7.280049] __x64_sys_ioctl+0x3e/0x70
[ 7.280184] do_syscall_64+0x5f/0x250
[ 7.280316] ? __do_page_fault+0x40/0x50
[ 7.280571] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 7.280915] RIP: 0033:0x7f3a416dea67
[ 7.281057] Code: c0 75 b5 48 8d 3c 2b e8 17 ff ff ff 85 c0 78 b6 48 89 d8 5b 5d 41 5c c3 66 2e 0f 1f 84 00 00 00 00 00 90 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d1 93 0c 00 f7 d8 64 89 01 48
[ 7.281793] RSP: 002b:00007ffcc75ae9c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
[ 7.282099] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3a416dea67
[ 7.282364] RDX: 00007ffcc75aea00 RSI: 0000000040010000 RDI: 0000000000000004
[ 7.282613] RBP: 00007ffcc75aeb60 R08: 0000000000408048 R09: 0000000000000001
[ 7.282873] R10: 0000000000000004 R11: 0000000000000202 R12: 0000000000000001
[ 7.283112] R13: 00007ffcc75aff33 R14: 00007ffcc75aeb60 R15: 00007ffcc75aff51
[ 7.283498] Modules linked in:
[ 7.284089] —[ end trace 1bb3c7d0e6819189 ]—
[ 7.284394] RIP: 0010:strcpy+0x5/0x20
[ 7.284548] Code: 20 41 f6 80 80 d8 cb 81 01 0f b6 d2 0f 45 ca 48 83 c7 01 39 c8 75 04 85 c0 75 bf 29 c8 c3 0f 1f 80 00 00 00 00 48 89 f8 31 d2 <0f> b6 0c 16 88 0c 10 48 83 c2 01 84 c9 75 f1 c3 66 66 2e 0f 1f 84
[ 7.285173] RSP: 0018:ffffc900001ebdb8 EFLAGS: 00000246
[ 7.285425] RAX: ffffffff824c6c40 RBX: 00007ffcc75aea00 RCX: 00007ffcc75aea00
[ 7.285659] RDX: 0000000000000000 RSI: ff00000000000000 RDI: ffffffff824c6c40
[ 7.285898] RBP: ffffc900001ebe18 R08: 0000000000000000 R09: 0000000000000000
[ 7.286134] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000006900000
[ 7.286425] R13: ffff88803c81a140 R14: ffff88803d85dd80 R15: 00007ffcc75aea00
[ 7.286662] FS: 00007f3a415ee740(0000) GS:ffff88803ea00000(0000) knlGS:0000000000000000
[ 7.286920] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 7.287108] CR2: 00000000004102d8 CR3: 000000003dfb6000 CR4: 00000000000006f0
[ 8.278569] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 8.285007] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

system waits here.
My quick doubts are

  • Will qemu’s ip is 127.0.0.1 localhost ip address or i can find exact ip somewhere else? Once I have IP then i can move ahead with SSH and other explorations.
  • To run host application, can i run it on same pc on which qemu is running?

When trying to build host application i get below errors :blush:

nadim@nadim-pc:~/opencn/agency/usr$ ./build-host.sh -h
./build-host.sh [OPTIONS]
-c Clean
-d Debug build
-h Print this help
nadim@nadim-pc:~/opencn/agency/usr$ ./build-host.sh -c
Cleaning /home/nadim/opencn/agency/usr/build-host
nadim@nadim-pc:~/opencn/agency/usr$ ./build-host.sh -d
Starting Debug build
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a … suffix to tell
CMake that the project does not need compatibility with older versions.

– The C compiler identification is GNU 11.4.0
– The CXX compiler identification is GNU 11.4.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
buildingcommonlibraries
== Build Host applications
– pybind11 v2.6.2
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/CMakeDependentOption.cmake:84 (message):
Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
Syntax. Run “cmake --help-policy CMP0127” for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
host/cmctl_client/python_module/pybind11/CMakeLists.txt:98 (cmake_dependent_option)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found PythonInterp: /usr/bin/python3.10 (found version “3.10.12”)
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.10.so
– Performing Test HAS_FLTO
– Performing Test HAS_FLTO - Success
CMake Error at host/user_gui/CMakeLists.txt:9 (find_package):
By not providing “FindQt5.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “Qt5”, but
CMake did not find one.

Could not find a package configuration file provided by “Qt5” (requested
version 5.9) with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of “Qt5” to CMAKE_PREFIX_PATH or set “Qt5_DIR”
to a directory containing one of the above files. If “Qt5” provides a
separate development package or SDK, be sure it has been installed.

– Configuring incomplete, errors occurred!
See also “/home/nadim/opencn/agency/usr/build-host/CMakeFiles/CMakeOutput.log”.
make: *** No targets specified and no makefile found. Stop.
/home/nadim/opencn/agency/usr
Copy host/tooledit/tooledit.sh
nadim@nadim-pc:~/opencn/agency/usr$

  • Can you please also guide me whether i need to export any environment variable like we do in standard embedded Linux build or I can directly open a new terminal and build the host application?

Hi Nadim,

Something when wrong at the end of the boot process. I’ve to check what is going on here.
To let you continue investigating OpenCN framework, you can do the following:

  • Comment all lines in agency/rootfs/board/common/rootfs_overlay/root/start_opencn.sh
  • Rebuild rootfs. From agency folder do ./build.sh -r
  • Deploy rootfs and apps: ./deploy -ru`
  • Start again OpenCN → You should arrive up to the opencn prompt

Hope this helps
J-P

1 Like

Regarding the error during the build of the host apps: It seems your system is missing QT5.

Here are the package you should installed: sudo apt install qtbase5-dev

Hope this helps
J-P

Continuing the discussion from OpenCN detailed documentation:

This solution worked.
Below is the first login and ifconfig command on qemu:

opencn ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:29:53:97:BA
inet addr:192.168.53.15 Bcast:192.168.53.255 Mask:255.255.255.0
inet6 addr: fe80::201:29ff:fe53:97ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:15417 (15.0 KiB)
Interrupt:11 Memory:feb80000-feba0000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3047 (2.9 KiB) TX bytes:3047 (2.9 KiB)

Below are the directory contents of openCN.

opencn ~ # ls
SetPoints_fast.txt lcct* one-drive.xml
cmctl-server* lcec* opencn-m5-server*
cmd.hal logfile* opencn-server*
cmd_float.hal loopback* plc*
cmds/ micro3.hal rate.hal
el3702_example.hal micro3.xml sampler*
el3702_example.xml micro5/ setpoints/
ethercat* mux* simple_pg*
example/ ocno* start_opencn.sh*
feedopt* ocno_dbg.hal streamer*
gcode/ ocno_test.sh* test_input.txt
halcmd* one-drive-feedopt.hal threads*
header.txt one-drive-sampler.hal timing_tests*
kinematic* one-drive.hal

I will redo the whole procedure on Ubuntu version because its what i use for other work also. I will redo and then get in touch with you for documentation discussion of what i did till now. My plan is to make such a document under guidance of you guys which is more interactive with pictures so that any new user can build openCN framework for all platforms and have a feel of what it is.

Great that the boot went well !

Can you share the content of micro5/micro5.hal ?

  • the boot issue seem related to it

Thanks
J-P

iI am very sorry to say I am using vi editor and its not able to paste contents out of editor so i am unable to copy the contents. can you tell me the path where all qemu files are stored host pc?

Below are the contents of root.

m5_kin_param.txt micro5_initcmds_tsdZS.xml
micro5.hal micro5_setup1.hal
micro5.ini micro5_setup1_with_plc.hal
micro5_ec_topology.xml micro5_startup.sh*
micro5_initcmds_tsdXB.xml micro5_test.txt
micro5_initcmds_tsdYC.xml tool.tbl

I’d like to see the file present on the target.

Once you started OpenCN with the st command, you can type the following command from the prompt: cat micro5/micro5.hal

@jmi
Actually problem was with default terminal of Kubuntu which disaplayed only 8 lines and previous lines got depleted.

I used another terminal Xterm and the cat command worked.

Thanks

opencn ~ # cat micro5/micro5.hal

Micro5 HAL file

The threads period is in [us], contrary to the one defined for the

Ethercat master in its xml, where it is in [ns]

– load components –

load lcec cfg=micro5/micro5_ec_topology.xml -d
load ocno axes=zbxyc # Order of axis to handle clearing - temporary solution
load feedopt --axes=xyzbc
load plc cfg=micro5
load plc cfg=spindle
load simple_pg joint_nr=5
load mux name=position type=float vector_nr=2 vector_size=5
load kinematic type=xyzbc params=micro5/m5_kin_param.txt

– Signal creation –

Inactive of operation

net set-mode-inactive-X ocno.axisX.set-mode-inactive => lcec.0.TSDXB.set-mode-inactive-0
net set-mode-inactive-Y ocno.axisY.set-mode-inactive => lcec.0.TSDYC.set-mode-inactive-0
net set-mode-inactive-Z ocno.axisZ.set-mode-inactive => lcec.0.TSDZS.set-mode-inactive-0
net set-mode-inactive-B ocno.axisB.set-mode-inactive => lcec.0.TSDXB.set-mode-inactive-1
net set-mode-inactive-C ocno.axisC.set-mode-inactive => lcec.0.TSDYC.set-mode-inactive-1
net in-mode-inactive-X ocno.axisX.in-mode-inactive <= lcec.0.TSDXB.in-mode-inactive-0
net in-mode-inactive-Y ocno.axisY.in-mode-inactive <= lcec.0.TSDYC.in-mode-inactive-0
net in-mode-inactive-Z ocno.axisZ.in-mode-inactive <= lcec.0.TSDZS.in-mode-inactive-0
net in-mode-inactive-B ocno.axisB.in-mode-inactive <= lcec.0.TSDXB.in-mode-inactive-1
net in-mode-inactive-C ocno.axisC.in-mode-inactive <= lcec.0.TSDYC.in-mode-inactive-1

Spindle

net spindle-target-velocity plc.spindle.target-velocity => lcec.0.TSDZS.target-velocity-1
net spindle-current-velocity plc.spindle.current-velocity <= lcec.0.TSDZS.current-velocity-1
net spindle-set-mode-csv plc.spindle.set-mode-csv => lcec.0.TSDZS.set-mode-csv-1
net spindle-set-mode-inactive plc.spindle.set-mode-inactive => lcec.0.TSDZS.set-mode-inactive-1
net spindle-in-mode-csv plc.spindle.in-mode-csv <= lcec.0.TSDZS.in-mode-csv-1
net spindle-in-mode-inactive plc.spindle.in-mode-inactive <= lcec.0.TSDZS.in-mode-inactive-1

Spindle parameter

setp plc.spindle.acceleration 5000 # Debug mode !
#setp plc.spindle.min-velocity 8000 # TO BE SET ONECE TEST IS DONE
setp plc.spindle.max-velocity 60000

#spindle to be linked in real machine
net spindle-cmd-target-velocity plc.spindle.cmd-target-velocity <= ocno.spindle.speed
net spindle-cmd-rotate-spindle plc.spindle.cmd-rotate-spindle <= ocno.spindle.enable

Homing of operation

net set-hm-csp-X ocno.axisX.set-mode-homing => lcec.0.TSDXB.set-mode-hm-0
net set-hm-csp-Y ocno.axisY.set-mode-homing => lcec.0.TSDYC.set-mode-hm-0
net set-hm-csp-Z ocno.axisZ.set-mode-homing => lcec.0.TSDZS.set-mode-hm-0
net set-hm-csp-B ocno.axisB.set-mode-homing => lcec.0.TSDXB.set-mode-hm-1
net set-hm-csp-C ocno.axisC.set-mode-homing => lcec.0.TSDYC.set-mode-hm-1
net in-hm-csp-X ocno.axisX.in-mode-homing <= lcec.0.TSDXB.in-mode-hm-0
net in-hm-csp-Y ocno.axisY.in-mode-homing <= lcec.0.TSDYC.in-mode-hm-0
net in-hm-csp-Z ocno.axisZ.in-mode-homing <= lcec.0.TSDZS.in-mode-hm-0
net in-hm-csp-B ocno.axisB.in-mode-homing <= lcec.0.TSDXB.in-mode-hm-1
net in-hm-csp-C ocno.axisC.in-mode-homing <= lcec.0.TSDYC.in-mode-hm-1

CSP of operation

net set-mode-csp-X ocno.axisX.set-mode-csp => lcec.0.TSDXB.set-mode-csp-0
net set-mode-csp-Y ocno.axisY.set-mode-csp => lcec.0.TSDYC.set-mode-csp-0
net set-mode-csp-Z ocno.axisZ.set-mode-csp => lcec.0.TSDZS.set-mode-csp-0
net set-mode-csp-B ocno.axisB.set-mode-csp => lcec.0.TSDXB.set-mode-csp-1
net set-mode-csp-C ocno.axisC.set-mode-csp => lcec.0.TSDYC.set-mode-csp-1
net in-mode-csp-X ocno.axisX.in-mode-csp <= lcec.0.TSDXB.in-mode-csp-0
net in-mode-csp-Y ocno.axisY.in-mode-csp <= lcec.0.TSDYC.in-mode-csp-0
net in-mode-csp-Z ocno.axisZ.in-mode-csp <= lcec.0.TSDZS.in-mode-csp-0
net in-mode-csp-B ocno.axisB.in-mode-csp <= lcec.0.TSDXB.in-mode-csp-1
net in-mode-csp-C ocno.axisC.in-mode-csp <= lcec.0.TSDYC.in-mode-csp-1

Data Path

net data-selector mux.position.selector <= ocno.datapath-sel
net cmd-pos{XYZBC} ocno.axis{XYZBC}.target-pos => simple_pg.joint{01234}.cmd-pos
net cmd-pos{XYZBC} ocno.axis{XYZBC}.target-pos => mux.position.vector0.input{01234}
net pg-data{XYZBC} mux.position.vector1.input{01234} <= simple_pg.joint{01234}.target-position
net target-position-x mux.position.output0 => lcec.0.TSDXB.target-position-0
net target-position-y mux.position.output1 => lcec.0.TSDYC.target-position-0
net target-position-z mux.position.output2 => lcec.0.TSDZS.target-position-0
net target-position-b mux.position.output3 => lcec.0.TSDXB.target-position-1
net target-position-c mux.position.output4 => lcec.0.TSDYC.target-position-1

Homing

net start-hm-X ocno.homing.axisX.start => lcec.0.TSDXB.do-homing-0
net start-hm-Y ocno.homing.axisY.start => lcec.0.TSDYC.do-homing-0
net start-hm-Z ocno.homing.axisZ.start => lcec.0.TSDZS.do-homing-0
net start-hm-B ocno.homing.axisB.start => lcec.0.TSDXB.do-homing-1
net start-hm-C ocno.homing.axisC.start => lcec.0.TSDYC.do-homing-1
net stop-hm-X ocno.homing.axisX.stop => lcec.0.TSDXB.do-stop-homing-0
net stop-hm-Y ocno.homing.axisY.stop => lcec.0.TSDYC.do-stop-homing-0
net stop-hm-Z ocno.homing.axisZ.stop => lcec.0.TSDZS.do-stop-homing-0
net stop-hm-B ocno.homing.axisB.stop => lcec.0.TSDXB.do-stop-homing-1
net stop-hm-C ocno.homing.axisC.stop => lcec.0.TSDYC.do-stop-homing-1
net homed-X ocno.homing.axisX.homed <= lcec.0.TSDXB.homed-0
net homed-Y ocno.homing.axisY.homed <= lcec.0.TSDYC.homed-0
net homed-Z ocno.homing.axisZ.homed <= lcec.0.TSDZS.homed-0
net homed-B ocno.homing.axisB.homed <= lcec.0.TSDXB.homed-1
net homed-C ocno.homing.axisC.homed <= lcec.0.TSDYC.homed-1

JOG

net jog-enable ocno.jog.enable => simple_pg.enable
#net pg-target-pos{XYZBC} ocno.axis{XYZBC}.target-pos => simple_pg.joint{01234}.cmd-pos
net current-pos-X lcec.0.TSDXB.current-position-0 => simple_pg.joint0.current-position
net current-pos-Y lcec.0.TSDYC.current-position-0 => simple_pg.joint1.current-position
net current-pos-Z lcec.0.TSDZS.current-position-0 => simple_pg.joint2.current-position
net current-pos-B lcec.0.TSDXB.current-position-1 => simple_pg.joint3.current-position
net current-pos-C lcec.0.TSDYC.current-position-1 => simple_pg.joint4.current-position
net jog-running-{XYZBC} ocno.jog.axis{XYZBC}.is_running <= simple_pg.joint{01234}.is_running

OCNO - current position

net current-pos-{XYZBC} ocno.axis{XYZBC}.current-joint-pos

OCNO machining

net spindle-current-velocity ocno.spindle.current-speed lcec.0.TSDZS.current-velocity-1

Fault

net in-fault-X ocno.axisX.in-fault
net in-fault-Y ocno.axisY.in-fault
net in-fault-Z ocno.axisZ.in-fault
net in-fault-B ocno.axisB.in-fault
net in-fault-C ocno.axisC.in-fault

ocno - fault reset

net fault-reset-X ocno.axisX.fault-reset => lcec.0.TSDXB.fault-reset-0
net fault-reset-Y ocno.axisY.fault-reset => lcec.0.TSDYC.fault-reset-0
net fault-reset-Z ocno.axisZ.fault-reset => lcec.0.TSDZS.fault-reset-0
net fault-reset-B ocno.axisB.fault-reset => lcec.0.TSDXB.fault-reset-1
net fault-reset-C ocno.axisC.fault-reset => lcec.0.TSDYC.fault-reset-1

Quick-Stop

net quick-stop-X ocno.axisX.quick-stop => lcec.0.TSDXB.quick-stop-0
net quick-stop-Y ocno.axisY.quick-stop => lcec.0.TSDYC.quick-stop-0
net quick-stop-Z ocno.axisZ.quick-stop => lcec.0.TSDZS.quick-stop-0
net quick-stop-B ocno.axisB.quick-stop => lcec.0.TSDXB.quick-stop-1
net quick-stop-C ocno.axisC.quick-stop => lcec.0.TSDYC.quick-stop-1

Simple PG

always in ‘absolute’ position - relative position handled by ‘ocno’)

setp simple_pg.joint0.relative-pos 0
setp simple_pg.joint1.relative-pos 0
setp simple_pg.joint2.relative-pos 0
setp simple_pg.joint3.relative-pos 0
setp simple_pg.joint4.relative-pos 0

PLC safety and functionality of M5

net in-fault-X plc.micro5.is_x_in_fault <= lcec.0.TSDXB.in-fault-0
net in-fault-Y plc.micro5.is_y_in_fault <= lcec.0.TSDYC.in-fault-0
net in-fault-Z plc.micro5.is_z_in_fault <= lcec.0.TSDZS.in-fault-0
net in-fault-S plc.micro5.is_spindle_in_fault <= lcec.0.TSDZS.in-fault-1
net in-fault-B plc.micro5.is_b_in_fault <= lcec.0.TSDXB.in-fault-1
net in-fault-C plc.micro5.is_c_in_fault <= lcec.0.TSDYC.in-fault-1
net m5-EStop plc.micro5.is_EStop_pushed <= lcec.0.EL1809.din-4-not
net m5-release-break-z plc.micro5.release_break_z => lcec.0.CTEU.out0.bit-0
net is-enabled-2 plc.micro5.is_z_enabled <= lcec.0.TSDZS.enabled-0
net is-enabled-3 plc.micro5.is_spindle_enabled <= lcec.0.TSDZS.enabled-1
net is-enabled-4 plc.micro5.is_b_enabled <= lcec.0.TSDXB.enabled-1
net is-enabled-5 plc.micro5.is_c_enabled <= lcec.0.TSDYC.enabled-1
net m5-sealing plc.micro5.b_c_s_axis_sealing => lcec.0.CTEU.out0.bit-1
net m5-spindle_cooling plc.micro5.spindle_cooling => lcec.0.CTEU.out0.bit-6

net set-mode-inactive-3 plc.micro5.spindle_set_mode_inactive => lcec.0.TSDZS.set-mode-inactive-1

net set-mode-csv-3 plc.micro5.spindle_set_mode_csv => lcec.0.TSDZS.set-mode-csv-1

net m5-pull-0 plc.micro5.spindle_pulling_pin0 <= lcec.0.EL1809.din-11
net m5-pull-1 plc.micro5.spindle_pulling_pin1 <= lcec.0.EL1809.din-12
net m5-free-tool plc.micro5.free_milling_tool => lcec.0.CTEU.out0.bit-4
net m5-cone-clean plc.micro5.cone_cleaning => lcec.0.CTEU.out0.bit-5
net m5-free-pal plc.micro5.free_palette => lcec.0.CTEU.out0.bit-2
net m5-blow-pal plc.micro5.blowing_palette => lcec.0.CTEU.out0.bit-3
net spindle-can-turn plc.micro5.spindle_can_turn => ocno.spindle.can-turn
net spindle-temperature plc.micro5.spindle_temperature <= lcec.0.EL3202.chan1.temperature
net m5-is-milling plc.micro5.is_milling <= ocno.machining.running

Feedopt

net machining-finished feedopt.finished => ocno.machining.finished
net machining-underrun feedopt.sample.underrun => ocno.machining.underrun
net machining-ready feedopt.ready => ocno.machining.operation-ready
net machining-read-one-samples feedopt.read.single <= ocno.machining.get-one-sample
net machining-read-samples feedopt.read.start <= ocno.machining.read-samples
net machining-cmd-pos-{XYZBC} feedopt.axis{XYZBC}.sample => ocno.machining.axis{XYZBC}.cmd-pos
net feedopt-spindle-target-speed feedopt.spindle-target-speed => ocno.machining.target-spindle-speed
net feedopt-resampling-pause feedopt.resampling.pause => ocno.machining.resampling-pause

#to be linked
#net m5-cmd-free-tool plc.micro5.cmd_free_tool <=
#net m5-cmd_free_pal plc.micro5.cmd_free_palette <=
#net m5-cmd-enable-spindle plc.micro5.cmd_enable_spindle <=
#net m5-stop-operation plc.micro5.stop_operation =>

– Parameters config --#

lcec - modulo mode

setp lcec.0.TSDYC.modulo-1 360

– Micro5 specific behavior –

Machine position limits

setp ocno.axisX.limit-min -39
setp ocno.axisX.limit-max 39
setp ocno.axisY.limit-min -28
setp ocno.axisY.limit-max 28
setp ocno.axisZ.limit-min -50
setp ocno.axisZ.limit-max 0
setp ocno.axisB.limit-min -102 # 10 recommended from manufaccturer / (24 degree mesured143degree mesured in full range, we still use manufacturer spec
setp ocno.axisB.limit-max 15
setp ocno.axisC.limit-min 0
setp ocno.axisC.limit-max 0

– Export functions –

addf ocno.func lcec_thread.0
addf feedopt.update lcec_thread.0
addf plc.micro5 lcec_thread.0
addf plc.spindle lcec_thread.0
addf simple_pg.func lcec_thread.0
addf mux.position_func lcec_thread.0

– Debug mode –

in debug mode set some default values !

setp lcec.0.EL1809.debug_din-11 1
setp lcec.0.EL1809.debug_din-12 1

– Sampler –

load sampler depth=1000 cfg=fffffffffffffffub

net target-position-x sampler.0.pin.0
net target-position-y sampler.0.pin.1
net target-position-z sampler.0.pin.2
net target-position-b sampler.0.pin.3
net target-position-c sampler.0.pin.4
net current-pos-X sampler.0.pin.5
net current-pos-Y sampler.0.pin.6
net current-pos-Z sampler.0.pin.7
net current-pos-B sampler.0.pin.8
net current-pos-C sampler.0.pin.9

#sampler logging of error position
net pos-error-0 lcec.0.TSDXB.position-error-0 => sampler.0.pin.10
net pos-error-1 lcec.0.TSDYC.position-error-0 => sampler.0.pin.11
net pos-error-2 lcec.0.TSDZS.position-error-0 => sampler.0.pin.12
net pos-error-3 lcec.0.TSDXB.position-error-1 => sampler.0.pin.13
net pos-error-4 lcec.0.TSDYC.position-error-1 => sampler.0.pin.14

net data-selector sampler.0.pin.15
net machining-finished sampler.0.pin.16

addf sampler.0 lcec_thread.0

– Start operations –

start

Hi Nadim,

Thanks for sharing the file. Unfortunately (if I can say) it seems correct. I’ve no idea why you had an error at the boot. I’ve to debug (I will try to do it asap).

Anyway, you still can play with OpenCN without it.

Regarding the terminal display issue, the cmd resize usually restore the print area.

J-P

1 Like

No Problem @jmi , Thanks
You can debug as per your time.

In the meantime I will try below tasks:

  • I will redo the whole procedure on Ubuntu version because thats what i use for other work also. I will redo and then study and try the document in detail. I will also check if this same problem occurs again.
  • I will also try to build and run on raspberrypi4 target
  • I will comeback with the results

Can you create a seperate branch from where I can checkout and try my handson and update things?

My gitlab userid is :15429624
I am new to gitlab but i can follow along its documentation.

Hi Nadim,

I will add you as developer in the OpenCN repo. Regarding the branches and issue, we already have the issue #113. This issue, and its related branch, was created to follow documentation update which was not related to new features/dev.

  • The branch has to be aligned with the current master

You can use this issue/branch if it is ok for you

Have a nice day
J-P

I need you gitlab username. I cannot add you using the userid

My username is nadim4114

Done - you should receive an invitation

1 Like

Thanks for adding me.
I received an invitation.

I am using below branch to checkout a copy. Is this correct if you can confirm.

nadim@nadim-pc:~/opencn$ git checkout origin/113-documentation-update
M agency/usr/matlab
HEAD is now at dc31915f1e [doc] deployment: add info to install on PC internal disk

Yes, it is the correct branch. But I has to be aligned with the current state of master branch.

J-P