First of all: I am sorry, you was right I have problem in HAL: I forgot # before addf

But when I enabled addf, lcnc cannot start, becouse cannot find function. I didn't found GS10 driver as you have, so I have tried to test example: modcompile relayboard.mod. It was compiled, installed, but the same problemn with addf. when I disable addf and leave loadrt only, lcnc starts and I see relayboard in halshow, not work, of course.
Found file(REL): ./custom.hal
HAL: ERROR: function 'relayboard' not found
./custom.hal:58: addf failed
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
USRMOT: ERROR: command 3 timeout
HAL: ERROR: component 0 not found
hm2_eth: in hm2_eth_reset
hm2_eth: HostMot2 ethernet driver unloaded
hm2: unloading
my custom.hal:
l# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again
loadrt threads name1=pwm-thread period1=1000000 fp1=1
# --- Teploty Libor ---
# *** nastaveni rozsahu analogovych vstupu
setp hm2_7i96s.0.7i87.0.0.analogin0-scalemax 750
setp hm2_7i96s.0.7i87.0.0.analogin1-scalemax 750
#loadrt pid num_chan=1
addf pid.tb.do-pid-calcs servo-thread
loadrt pwmgen output_type=0
addf pwmgen.update pwm-thread
addf pwmgen.make-pulses servo-thread
newsig temp_bath_enable bit
sets temp_bath_enable FALSE
net temp_bath_enable => pid.tb.enable
net temp_bath_enable => pwmgen.0.enable
net temp_bath_set => pid.tb.command
net temp_bath_pidout pid.tb.output => pwmgen.0.value
net temp_bath_pwmout pwmgen.0.pwm => hm2_7i96s.0.7i87.0.0.output-00
net temp_bath <= hm2_7i96s.0.7i87.0.0.analogin0 => pid.tb.feedback
# net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.enable
# net emcmot.01.enable <= axis.1.amp-enable-out
# set PID loop gains from inifile
setp pid.tb.Pgain [TEMP_BATH]P
setp pid.tb.Igain [TEMP_BATH]I
setp pid.tb.Dgain [TEMP_BATH]D
setp pid.tb.bias [TEMP_BATH]BIAS
setp pid.tb.FF0 [TEMP_BATH]FF0
setp pid.tb.FF1 [TEMP_BATH]FF1
setp pid.tb.FF2 [TEMP_BATH]FF2
setp pid.tb.deadband [TEMP_BATH]DEADBAND
setp pid.tb.maxoutput [TEMP_BATH]MAX_OUTPUT
setp pwmgen.0.scale [TEMP_BATH]PWM_SCALE
setp pwmgen.0.pwm-freq [TEMP_BATH]PWM_FREQ
setp pwmgen.0.dither-pwm [TEMP_BATH]PWM_DITHER
setp pwmgen.0.max-dc [TEMP_BATH]PWM_MAX_DC
setp pwmgen.0.min-dc [TEMP_BATH]PWM_MIN_DC
#setp pid.tb.command 50
# Predehrev
net temp_preheat <= hm2_7i96s.0.7i87.0.0.analogin1
#
IFM bus
#loadrt mesa_ifm ports=hm2_7i96s.0.pktuart.0
#addf mesa_ifm servo-thread
loadrt relayboard ports=hm2_7i96s.0.pktuart.0
addf relayboard servo-thread