Most components are built with the .comp and the halcompile but since Andy had me install the .deb I'm not sure if installing the .dev would be the right thing to do. http://linuxcnc.org/docs/2.8/html/hal/comp.html#_installing
The .comp and halcompile appear to simplify much of the component construction. But if you wanted to play that would be the place to start I would think. http://linuxcnc.org/docs/2.8/html/hal/comp.html#_compiling_realtime_components_outside_the_source_tree Just below that link are some simple examples like sincos. > -----Original Message----- > From: Feral Engineer [mailto:[email protected]] > Sent: June-26-21 8:02 PM > To: Enhanced Machine Controller (EMC) > Subject: Re: [Emc-users] Compiling a component. > > I've been looking for some good component information as well. The > documentation didn't really point me in the right direction last time I > looked at it. > > Phil T. > The Feral Engineer > > Check out my LinuxCNC tutorials, machine builds and other antics at > www.youtube.com/c/theferalengineer > > Help support my channel efforts and coffee addiction: > www.patreon.com/theferalengineer > > On Sat, Jun 26, 2021, 10:57 PM John Dammeyer <[email protected]> wrote: > > > I expect Andy in the UK has gone to bed but I'm on the west coast and it's > > only 7:30PM. Maybe someone in North America or on the other side of the > > international date line can help? > > > > I've been trying to get to the point where I can compile a user component > > written in C. Specifically, just for the exercise, the shuttle.c > > component. With Andy's help I've installed the > > ./linuxcnc-uspace_2.8.1~shuttle~ec6f65e02_armhf.deb > > > > I've also used the github desktop to bring in the linuxcnc folder tree > > that has all the files and folders including this folder where the > > shuttle.c file lives. You can see I'm working with a Pi4. > > \\Pi4linuxcnc\homepi\linuxcnc\src\hal\user_comps > > <file:///\\Pi4linuxcnc\homepi\linuxcnc\src\hal\user_comps> > > > > This doc talks about compiling .comp files but not much about the .c files. > > > > http://linuxcnc.org/docs/2.8/html/hal/comp.html#_compiling_userspace_components_outside_the_source_tree > > If I go up to the src folder there is a Makefile > > > > pi@linuxcnc:~/linuxcnc/src $ make > > Makefile:99: *** Makefile.inc must specify RTPREFIX and other variables. > > Stop. > > > > I have no idea which variables are needed and since this is on a 1GB Pi4 I > > really don't want to spend 6 hours compiling the entire OS when all I want > > is the single shuttle.c component. > > > > I suspect since the Submakefile in the user_comps folder includes: > > > > ifeq ($(HIDRAW_H_USABLE),yes) > > SHUTTLE_SRC = hal/user_comps/shuttle.c > > USERSRCS += $(SHUTTLE_SRC) > > ../bin/shuttle: $(call TOOBJS, $(SHUTTLE_SRC)) ../lib/liblinuxcnchal.so.0 > > $(ECHO) Linking $(notdir $@) > > $(Q)$(CC) $(LDFLAGS) -o $@ $^ > > TARGETS += ../bin/shuttle > > Endif > > > > > > That somehow the main make command requires arguments like HIDRAW_H_USABLE? > > > > Anyone done this? Perhaps can point me to a document that describes the > > process. Not just the what but the how and why? > > > > Thanks > > John Dammeyer > > > > > > "ELS! Nothing else works as well for your Lathe" > > Automation Artisans Inc. > > www dot autoartisans dot com > > > > > > _______________________________________________ > > Emc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
