I am trying to compile .mod file using modcompile but keep getting error
Code:
[color=#5454ff]~/linuxcnc-dev/bin[/color][color=#000000]$ sudo ./modcompile mesa_modbus_A5_Driver.mod [/color]
/tmp/tmpwmbs48kd/mesa_modbus.c
make: *** No rule to make target 'mesa_modbus.c', needed by 'mesa_modbus.o'. Stop.
I build linuxcnc on kubuntu 22.04 using the following commands
Code:
git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-devcd linuxcnc-dev/debian
./configure uspace no-docs
cd ..
dpkg-buildpackage -b -uc
I then copied modcompile from linuxcnc-dev/bin/ to linuxcnc else i get following error because of wrong path :
Code:
[color=#000000]mesa_modbus.c:21:10:[/color][color=#000000] [/color][color=#ff5454]fatal error: [/color][color=#000000]rtapi.h: No such file or directory [/color]
21 | #include [color=#ff5454]"rtapi.h"[/color][color=#000000] [/color]
| [color=#ff5454]^~~~~~~~~[/color]
If i try and compile it now i get the following :
Code:
[color=#000000]sudo ./modcompile mesa_modbus_A5_Driver.mod [/color]
/tmp/tmp31lc1kki/mesa_modbus.c
make: *** No rule to make target 'mesa_modbus.c', needed by 'mesa_modbus.o'. Stop.
Here is my driver file :
Code:
// Lichuan A5 AC Servo Drive Driver
#define MAX_MSG_LEN 16 // may be increased if necessary to max 251
#define DEBUG 1
static const hm2_modbus_chan_descriptor_t channels[] = {
/* {TYPE, FUNC, ADDR, COUNT, pin_name} */
{HAL_U32, 3, 0x9C8, 1, "speed-actual"},
{HAL_U32, 3, 0x9C9, 1, "speed-instruction"},
{HAL_U32, 3, 0x9CA, 1, "torque-instruction"},
{HAL_U32, 3, 0x9D4, 1, "avg-load-rate"},
{HAL_U32, 3, 0x9E0, 1, "phase-current"},
{HAL_U32, 3, 0x9E2, 1, "bus-voltage"},
{HAL_U32, 6, 0x9E3, 1, "tempreture"},
};
Any help please ? image missing /media/kunena/emoticons/unsure.png