Draft - HAL types update and HAL isolation#4247
Conversation
7bb25b0 to
c4f0b6f
Compare
|
On Fr, 2026-07-17 at 07:08 -0700, Luca Toniolo wrote:
grandixximo left a comment (LinuxCNC/linuxcnc#4247)
Never cease to amaze me...
Are we having a meeting with #4099 as central discussion? We skipped
a few weeks, not sure why @rmu75
Seems about time... or is everyone on summer vacation? Probably
better send to the mailing list...
I had some unexpected troubles with "remote" internet access around
21st of june and it seems I got a bit sidetracked... sorry for that.
Last meeting I have notes for was 2026-06-07 10:00 CEST
According to our cadence, 2026-06-21 would have been late, 2026-07-05
early and the next meeting would be tomorrow "late" at 20:00 CEST.
I'm not sure I can make it this weekend but I will try.
I think luca wants to discuss the hal interface redesign, so maybe
change of plan and meeting at 10:00 would be better? please reply
whoever can make it at what time.
https://greenlight.bbb.uni-rostock.de/b/ste-c4d-brs-3k6
Access code: 869782
(hope this is still active)
best regards
…--
Robert Schöftner ***@***.***>
|
|
Should send to the mailing list, my bad for starting it here 😞 |
| // Make sure we can query pins/params/signals | ||
| retval = hal_lib_init(); | ||
| CHKS(retval < 0, "fetch_hal_param: hal_lib_init(): error=%d", retval); | ||
|
|
There was a problem hiding this comment.
FIXME: init/exit is reference counted
c4f0b6f to
bce8942
Compare
|
@grandixximo the whole |
2f2ddb5 to
64739e1
Compare
|
Thanks for the quick turnaround, checked the new push. The Two Out-of-Bounds of the same family as ADDF remain:
Minor: literal Loadusr: agreed, the whole path wants a proper rewrite, here or in a follow up. |
64739e1 to
695ac8f
Compare
|
Should be all fixed now, except the param write in hal_set_p, which will take more than a mere moment to alter. |
c6f9e2d to
7f5b5ae
Compare
|
I just tested this branch on a machine with smartserial slaves. the driver loads, and creates all the pins, but nothing works. IO are not getting to the hardware. I cannot see any error messages. |
Thanks for testing. But, I haven't run locally on the hardware for some time. Need to check up on that. Also, the changes in hostmot2 have not yet been properly reviewed, so there can be lurking any detail in any layer of the hm2 driver stack. I'll give a peep when this can be tested again. |
7f5b5ae to
6d5e2e2
Compare
| chan->params->float_param = 500; | ||
| chan->params->timer_num = 0; | ||
| hal_set_real(chan->params->param.r, 500); | ||
| hal_set_ui32(chan->params->timer_num, 0); |
There was a problem hiding this comment.
param.r (frequency-khz) and timer_num are handles that are only created later in hm2_absenc_parse_md() (abs_encoder.c:~455-465).
If @rene-dev 's test setup has absenc channels configured, this is the prime suspect for IO not working
| chan->params->float_param = 500; | ||
| chan->params->timer_num = 0; | ||
| hal_set_real(chan->params->param.r, 500); | ||
| hal_set_ui32(chan->params->timer_num, 0); |
| chan->params->u32_param = 0xF; | ||
| chan->params->timer_num = 0; | ||
| hal_set_ui32(chan->params->param.u, 0xF); | ||
| hal_set_ui32(chan->params->timer_num, 0); |
| @@ -1359,13 +1571,13 @@ int hal_link(const char *pin_name, const char *sig_name) | |||
| case HAL_U32: | |||
| *((hal_u32_t *) data_addr) = pin->dummysig.u; | |||
| break; | |||
| case HAL_S64: | |||
| case HAL_SINT: | |||
| *((hal_s64_t *) data_addr) = pin->dummysig.s; | |||
There was a problem hiding this comment.
should this be .ls or that is after the transition period?
| *((hal_s64_t *) data_addr) = pin->dummysig.s; | ||
| break; | ||
| case HAL_U64: | ||
| case HAL_UINT: | ||
| *((hal_u64_t *) data_addr) = pin->dummysig.u; |
There was a problem hiding this comment.
same as above, should this be .lu ?
|
Does your test config string enable absenc (ssi/biss/fanuc formats)? |
This is the full tree conversion for the HAL types where #4099 would be the first step.
Changes:
State of progress of these changes:
Missing in this tree: