beagleg and the source for the bbb

Hey There,

Me…here. So, I have been up and down in the beagleg source. If you are familiar with this library, okay. Please give your two cents here. I cannot get past the Please home your machine first error that ridicules me on the GUI.

I can connect to a front end/GUI via USB to the development desktop from the BBB and have errors galore but nothing really shows up in the dmesg nor the journalctl -xe commands.

journalctl -xe gives some insight but not too much. I am afraid that I do not know how to debug the library yet and I am coming across issues.

I do not have config-pin on my machine. The library uses UIO and a PRU onboard to handle quick exchanges from/to the am335x on the BBB (I think). I am still new and learning how to handle all the source listed in /beagleg/src/.

Seth

P.S. The makefile calls for exporting a board. I made up a board name and changed things to suit my needs for the build. The board name is in /beagleg/hardware/MY_BOARD_NAME/ and there is a .config file in /beagleg/MY_BOARD_NAME.config listed.

I reached out on the chat webs to see if anyone has been using this library with success. I am waiting on any and all ideas if you have any. Oh and Ben, I got as far as being able to communicate from, only from, the beagleg source to the front end/GUI. I cannot communicate back to the BBB and beagleg source from the front end/GUI.

1 Like

on my CNC with limit switches, it drives the X and Y to one end and the Z up to the limit switch. this become Machine Coordinates [0,0,0]
with out limit switches, (from memory) your suppose to place the X/Y/Z at some known point and set Machine Coordinates to zero.
the home button in the GUI i use sends a G28 command to do this zeroing

1 Like

I tried. Something is up with the source. Digging and traversing it is…

Seth

P.S. G28 makes nothing do anything but for some reason I am stuck with nothing. Oh well, off to research the source more.

First off and sorry for not saying this earlier, yes. You are right. XYZ is a base with limit switches while without the switches for the axes, the build gantry gets zeroed out at the starting point for chipping away material.

Secondly, thank you for replying. Not everyone uses the BBB in this manner nor would I expect a heavy guild of people directing their attention to the BBB and PRUs for building CNC machines.

Although possible, as I have seen, I am not able to do it with the beagleg source just yet.

There are three or four /beagleg/hardware/ boards (BUMPS and CRAMPS come to mind) in the file where one can alter some basics to achieve chip making and removal of material easily (I think).

Too simplistic is my typing. Sorry. So, this is what I am getting at now.

  1. I started my own board, i.e. TARG.
    a. I liked the name, i.e. no acronym.
  2. I set up the build very similar to the BUMPS hardware and changed some things within a couple files.
    b. I ran make for the Makefile and it built successfully. I then use another command, i.e. sudo make install and that should have installed it at a particular place in a file for use.
  3. I can only run the source for starting a connection to the front end/GUI via sockets with sudo.
    c. I get errors when approaching the build off the BBB or on the BBB with specific Makefile commands within the file.

So, I comment out some, comment others, and keep trying.

Just for reference, I am still new to the beagleg source. So, it is not an everyone can do it, why can I not do it thing. I hoping to get some feedback on builds people have grown accustom to using within beagleg and the BBB.

Now, it could be my connections are iffy. Heck, they are iffy. I have a couple chips for protecting the BBB pins which are pin for pin I/O outside of the GND.

I used a Veroboard to handle the build. I stuck the pins in the holes where they belonged. I soldered them and boy did I. I must have soldered for over a span of two hours for 14 pins. Things are tiny these days…ha.

I got the end stops/switches on/off (three of them), three motors obviously, and a slew of GPIO pins from the BBB (count 'em - nine of 'em), and then the Output pins which are another nine pins off the power array.

Just a heads up before I get into testing pin for pin, /sys/class/gpio/* is listed on my image without config-pin. I think this library uses the config-pin ideals from the days of it all.

At least CRAMPS did…and CRAMPS is part of the library (sort of).

Plea or bargain…I am in it to win it! I will keep at it.

I guess trying with the regular build my prove more valuable outside of starting my own board within the beagleg source, e.g. since I know very little about it so far.

If you are at home G28 does nothing. If you are out of home position it will drive it home.

What software are you using to process the G code?

Its typically not a good button to push because you could send your tool across the vise and crash the machine. The machine does one thing, goes from current position to home position.

1 Like

bCNC works as a front end/GUI (it connects via sockets) and beagleg is the source built with pasm and some hard-to-read source. You may be more educated in the C/C++ realm and Python builds…

But yeppers, that is what I am using.

New to life over here.

Well, let me say this…

It connects. Can it read my build from .step to .nc? Not well enough.

Is that assembly for the arm board? 25-30 years ago I did drivers using MASM that ran on intel ms boxes. It clearly evaporated after all these years.

PRU.

I think pasm is for the PRUs onboard the BBB.

segmentation fault

I am receiving a segmentation fault when running ./prudebug after compilation.

make
cc    -c -o prudbg.o prudbg.c
prudbg.c: In function ‘main’:
prudbg.c:346:25: warning: implicit declaration of function ‘printhelpbrief’; did you mean ‘printhelp’? [-Wimplicit-function-declaration]
  346 |                         printhelpbrief();
      |                         ^~~~~~~~~~~~~~
      |                         printhelp
prudbg.c:352:33: warning: implicit declaration of function ‘cmd_print_breakpoints’ [-Wimplicit-function-declaration]
  352 |                                 cmd_print_breakpoints();
      |                                 ^~~~~~~~~~~~~~~~~~~~~
prudbg.c:356:41: warning: implicit declaration of function ‘cmd_clear_breakpoint’ [-Wimplicit-function-declaration]
  356 |                                         cmd_clear_breakpoint (bpnum);
      |                                         ^~~~~~~~~~~~~~~~~~~~
prudbg.c:364:41: warning: implicit declaration of function ‘cmd_set_breakpoint’ [-Wimplicit-function-declaration]
  364 |                                         cmd_set_breakpoint (bpnum, addr);
      |                                         ^~~~~~~~~~~~~~~~~~
prudbg.c:439:41: warning: implicit declaration of function ‘cmd_dis’; did you mean ‘cmd_d’? [-Wimplicit-function-declaration]
  439 |                                         cmd_dis(offset, addr, len);
      |                                         ^~~~~~~
      |                                         cmd_d
prudbg.c:467:33: warning: implicit declaration of function ‘cmd_runss’; did you mean ‘cmd_run’? [-Wimplicit-function-declaration]
  467 |                                 cmd_runss();
      |                                 ^~~~~~~~~
      |                                 cmd_run
prudbg.c:477:33: warning: implicit declaration of function ‘cmd_halt’ [-Wimplicit-function-declaration]
  477 |                                 cmd_halt();
      |                                 ^~~~~~~~
prudbg.c:506:33: warning: implicit declaration of function ‘cmd_printregs’ [-Wimplicit-function-declaration]
  506 |                                 cmd_printregs();
      |                                 ^~~~~~~~~~~~~
prudbg.c:527:33: warning: implicit declaration of function ‘cmd_single_step’ [-Wimplicit-function-declaration]
  527 |                                 cmd_single_step();
      |                                 ^~~~~~~~~~~~~~~
prudbg.c:534:33: warning: implicit declaration of function ‘cmd_print_watch’ [-Wimplicit-function-declaration]
  534 |                                 cmd_print_watch();
      |                                 ^~~~~~~~~~~~~~~
prudbg.c:538:41: warning: implicit declaration of function ‘cmd_clear_watch’ [-Wimplicit-function-declaration]
  538 |                                         cmd_clear_watch (wanum);
      |                                         ^~~~~~~~~~~~~~~
prudbg.c:546:41: warning: implicit declaration of function ‘cmd_set_watch_any’ [-Wimplicit-function-declaration]
  546 |                                         cmd_set_watch_any (wanum, addr);
      |                                         ^~~~~~~~~~~~~~~~~
prudbg.c:555:41: warning: implicit declaration of function ‘cmd_set_watch’ [-Wimplicit-function-declaration]
  555 |                                         cmd_set_watch (wanum, addr, value);
      |                                         ^~~~~~~~~~~~~
cc    -c -o cmdinput.o cmdinput.c
cc    -c -o cmd.o cmd.c
cc    -c -o printhelp.o printhelp.c
cc    -c -o da.o da.c
cc    -c -o uio.o uio.c
cc prudbg.o cmdinput.o cmd.o printhelp.o da.o uio.o -o prudebug

Here is the output of the make command from building the Makefile for prudebug. If you are using this source and know what steps to take, please jump on in.

Seth

Are you linking properly, missing header? implicit declaration is typically when the function is called before its declared.

1 Like

No.

I am not linking correctly. I just ruined my system to smithereens. So, a new image is called…

Seth

I got the CGT_PRU installed and the rest of it working. It compiled correctly. Okay and done with that part…

the source code is missing cmd.h and printhelp.h
you just need to create these from the .c and include them in prudbg.c

1 Like