On 23/02/18 07:26, 'schoone...@btinternet.com' via Machinekit wrote:



On 23/02/2018 01:12, Aurelien wrote:
this message is sended by the driver i have found the output text error in source code

xhc.hal = (xhc_hal_t *)hal_malloc(sizeof(xhc_hal_t));
if (xhc.hal == NULL) {
fprintf(stderr, "%s: ERROR: unable to allocate HAL shared memory\n", modname);
exit(1);
The most common mistake that gives this error, is calling hal_malloc() when realtime is not started.
Does not look to be the case.

I have no familiarity with this code and only have a standard xhc pendant, but will look later.

I don't know what you are doing, but when I build it and run, it works (as far as it can with no pendant attached)

You will get the error you had when realtime is not started.

The memory allocation will work in sim mode because that uses calloc() not hal_malloc()


user@INTEL-i7:/usr/src/sandbox/machinekit# DEBUG=5 realtime restart
user@INTEL-i7:/usr/src/sandbox/machinekit# halcmd loadusr xhc-whb04b-6 -Hup
<commandline>:0: Program 'xhc-whb04b-6' started
user@INTEL-i7:/usr/src/sandbox/machinekit# hal   initialize HAL component in HAL mode xhc-whb04b-6 ... ok
hal   initialize shared HAL memory for component id  80 ... ok
hal   bit   out whb.button.reset
hal   bit   out whb.button.macro-11
hal   bit   out whb.button.stop
hal   bit   out whb.button.macro-12
hal   bit   out whb.button.start-pause
hal   bit   out whb.button.macro-13
hal   bit   out whb.button.feed-plus
hal   bit   out whb.button.macro-1
hal   bit   out whb.button.feed-minus
hal   bit   out whb.button.macro-2
hal   bit   out whb.button.spindle-plus
hal   bit   out whb.button.macro-3
hal   bit   out whb.button.spindle-minus
hal   bit   out whb.button.macro-4
hal   bit   out whb.button.m-home
hal   bit   out whb.button.macro-5
hal   bit   out whb.button.safe-z
hal   bit   out whb.button.macro-6
hal   bit   out whb.button.w-home
hal   bit   out whb.button.macro-7
hal   bit   out whb.button.s-on-off
hal   bit   out whb.button.macro-8
hal   bit   out whb.button.fn
hal   bit   out whb.button.probe-z
hal   bit   out whb.button.macro-9
hal   bit   out whb.button.macro-10
hal   bit   out whb.button.macro-14
hal   bit   out whb.button.mode-continuous
hal   bit   out whb.button.macro-15
hal   bit   out whb.button.mode-step
hal   bit   out whb.button.macro-16
hal   s32   out whb.axis.0.jog-counts
hal   bit   out whb.axis.0.jog-enable
hal   float out whb.axis.0.jog-scale
hal   bit   out whb.axis.0.jog-vel-mode
hal   s32   out whb.axis.1.jog-counts
hal   bit   out whb.axis.1.jog-enable
hal   float out whb.axis.1.jog-scale
hal   bit   out whb.axis.1.jog-vel-mode
hal   s32   out whb.axis.2.jog-counts
hal   bit   out whb.axis.2.jog-enable
hal   float out whb.axis.2.jog-scale
hal   bit   out whb.axis.2.jog-vel-mode
hal   s32   out whb.axis.3.jog-counts
hal   bit   out whb.axis.3.jog-enable
hal   float out whb.axis.3.jog-scale
hal   bit   out whb.axis.3.jog-vel-mode
hal   s32   out whb.axis.4.jog-counts
hal   bit   out whb.axis.4.jog-enable
hal   float out whb.axis.4.jog-scale
hal   bit   out whb.axis.4.jog-vel-mode
hal   s32   out whb.axis.5.jog-counts
hal   bit   out whb.axis.5.jog-enable
hal   float out whb.axis.5.jog-scale
hal   bit   out whb.axis.5.jog-vel-mode
hal   bit   out whb.pendant.is-sleeping
hal   bit   out whb.pendant.is-connected
hal   float in  whb.halui.axis.0.pos-feedback
hal   float in  whb.halui.axis.1.pos-feedback
hal   float in  whb.halui.axis.2.pos-feedback
hal   float in  whb.halui.axis.3.pos-feedback
hal   float in  whb.halui.axis.4.pos-feedback
hal   float in  whb.halui.axis.5.pos-feedback
hal   float in  whb.halui.axis.0.pos-relative
hal   float in  whb.halui.axis.1.pos-relative
hal   float in  whb.halui.axis.2.pos-relative
hal   float in  whb.halui.axis.3.pos-relative
hal   float in  whb.halui.axis.4.pos-relative
hal   float in  whb.halui.axis.5.pos-relative
hal   float in  whb.stepgen.00.maxvel
hal   float in  whb.stepgen.00.position-scale
hal   float in  whb.stepgen.01.maxvel
hal   float in  whb.stepgen.01.position-scale
hal   float in  whb.stepgen.02.maxvel
hal   float in  whb.stepgen.02.position-scale
hal   float in  whb.stepgen.03.maxvel
hal   float in  whb.stepgen.03.position-scale
hal   float in  whb.stepgen.04.maxvel
hal   float in  whb.stepgen.04.position-scale
hal   float in  whb.stepgen.05.maxvel
hal   float in  whb.stepgen.05.position-scale
hal   bit   out whb.halui.feed.selected-0.001
hal   bit   out whb.halui.feed.selected-0.01
hal   bit   out whb.halui.feed.selected-0.1
hal   bit   out whb.halui.feed.selected-1.0
hal   float out whb.halui.feed-override.scale
hal   bit   out whb.halui.feed-override.direct-val
hal   bit   out whb.halui.feed-override.count-enable
hal   float in  whb.halui.feed-override.value
hal   float in  whb.halui.feed-override.min-value
hal   float in  whb.halui.feed-override.max-value
hal   s32   out whb.halui.feed-override.counts
hal   bit   out whb.halui.feed-override.decrease
hal   bit   out whb.halui.feed-override.increase
hal   float in  whb.motion.current-vel
hal   float in  whb.halui.spindle-override.value
hal   float in  whb.motion.spindle-speed-abs
hal   bit   out whb.halui.spindle.increase
hal   bit   out whb.halui.spindle.decrease
hal   bit   out whb.halui.spindle-override.increase
hal   bit   out whb.halui.spindle-override.decrease
hal   bit   in  whb.halui.spindle.is-on
hal   bit   out whb.halui.spindle.stop
hal   bit   out whb.halui.spindle.forward
hal   bit   out whb.halui.spindle.reverse
hal   bit   out whb.halui.estop.activate
hal   bit   in  whb.halui.estop.is-activated
hal   bit   out whb.halui.estop.reset
hal   bit   in  whb.halui.machine.is-on
hal   bit   out whb.halui.machine.on
hal   bit   out whb.halui.machine.off
hal   bit   in  whb.halui.program.is-idle
hal   bit   in  whb.halui.program.is-paused
hal   bit   in  whb.halui.program.is-running
hal   bit   out whb.halui.program.resume
hal   bit   out whb.halui.program.pause
hal   bit   out whb.halui.program.run
hal   bit   out whb.halui.program.stop
hal   bit   in  whb.halui.mode.is-auto
hal   bit   in  whb.halui.mode.is-joint
hal   bit   in  whb.halui.mode.is-manual
hal   bit   in  whb.halui.mode.is-mdi
hal   bit   out whb.halui.mode.auto
hal   bit   out whb.halui.mode.joint
hal   bit   out whb.halui.mode.manual
hal   bit   out whb.halui.mode.mdi
hal   bit   out whb.halui.joint.x.select
hal   bit   out whb.halui.joint.y.select
hal   bit   out whb.halui.joint.z.select
hal   bit   out whb.halui.joint.a.select
hal   bit   out whb.halui.joint.b.select
hal   bit   out whb.halui.joint.c.select
hal   float out whb.halui.jog-speed
hal   bit   out whb.halui.home-all
init  usb context ... ok
init  not waiting for device XHC-WHB04B-6 vendorId=0x10ce productId=0xeb93, will continue in 0s






--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to