You are not logged in.

#1 2017-06-30 23:26:30

jamesarm97
Member
Registered: 2017-02-02
Posts: 69

New binary compile request

Is there anyway to get a NanoDLP compile for the NanoPi M2? It runs on a Samsung Cortex-A9 S5P4418 Soc and is called FriendlyARM. It is a little smaller setup than the Pi3. (just need some open source nanodlp now wink

http://wiki.friendlyarm.com/wiki/index. … nvironment

Offline

#2 2017-07-01 06:17:08

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: New binary compile request

Have you tried running current raspberry version? It should crash on graphic subsystem. Please, try and let me know what kind of errors it throw out.

We need to have a version without GPIO/BCM(GPU) instead it should relay on framebuffer.

Offline

#3 2017-07-04 20:37:00

jamesarm97
Member
Registered: 2017-02-02
Posts: 69

Re: New binary compile request

I'll give it a try tomorrow, I think the binary wasn't compatible or something.

Offline

#4 2017-08-16 17:07:42

ender67
Member
Registered: 2017-08-16
Posts: 8

Re: New binary compile request

Trying to run on OrangePi One Raspbian:

2017/08/16 17:05:14.680777 {"Layer":"0","module":"Hardware","level":"Notice","msg":"Initializing build # 1589 - generic"}
2017/08/16 17:05:14.681504 {"Layer":"0","module":"SLAVE","level":"Error","msg":"Serial port could not be activated open /dev/ttyACM0: no such file or directory"}
* failed to open vchiq instance
2017/08/16 17:05:14.681767 {"Layer":"0","module":"Shutter","level":"Error","msg":"Pipe Access Problem open /dev/pigpio: no such file or directory"}

root@orangepi:/home/pi/printer# cat /etc/*-release
PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
root@orangepi:/home/pi/printer#

Offline

#5 2017-08-16 21:46:13

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: New binary compile request

ender,

Do it crashes after pigpio error? Try set framebuffer path see if it makes any difference.

Offline

#6 2017-08-19 18:24:44

ender67
Member
Registered: 2017-08-16
Posts: 8

Re: New binary compile request

I've tried different distributions (raspbian from orangepi, armbiaan based ln ubuntu and jessie form armbian.com, both server and destop). I intend to use it with arduino mega/ramps/marlin or arduino uno/cncshield/grbl and I was not interested in pigpio (I commented it ). Tried the latest version (it was supposed to have framebuffer support). it still has an error about libbcm, I guess there is still some code specific to raspberry pi. It's no longer a priority to me (I've bought several Rpi2 second hand) but in case you want to give it another shot to make it non-rpi dependant I can test it (on the latrst armbian / desktop with libGLES2).

Offline

#7 2017-08-19 19:58:11

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: New binary compile request

I should prevent rpi depend libraries get initialized.

Offline

#8 2017-08-20 03:10:24

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: New binary compile request

libGLESv2 and libEGL for armhf don't link with nanoDLP armel.

$ ldd printer
...
	libGLESv2.so => not found
	libEGL.so => not found
...
$ find /usr -name libGLES\*
/usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2
/usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2.0.0
$ LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/mesa-egl:$LD_LIBRARY_PATH ./printer
./printer: error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory

Can you please do an arm-linux-gnueabihf build for Debian Jessie without linking to libbcm_host or including GPIO support?  It should then "just work" with any later Debian or Ubuntu build.  That would be all I need to get my Duplicator 7 running without a PC attached.
Many thanks.  I will report back.

Offline

#9 2017-08-20 05:06:18

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: New binary compile request

Currently we use golang flags for arch and os to differentiate versions. (it works very elegantly)  Now all of these boards are linux and arm so I need to find better way to handle this scenario.

Offline

#10 2017-08-20 23:58:23

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: New binary compile request

Shahin wrote:

Currently we use golang flags for arch and os to differentiate versions. (it works very elegantly)  Now all of these boards are linux and arm so I need to find better way to handle this scenario.

Possibly silly suggestion: You might abuse the GOARM environment variable to distinguish build types.  You could include Broadcom/Raspbian facilities for $GOARM==6 (default) for Raspberry Pi builds, providing rasPi 2/3 compatibility at the cost of slightly slower floating point, and exclude Broadcom/Raspbian facilities for $GOARM==7, providing basically the PC build with X and framebuffer support, maybe also I2C displays, at the cost of requiring an external controller.
Anyway, my boards won't be here for a few weeks so I'll wait patiently.

Offline

#11 2017-08-21 05:43:14

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: New binary compile request

Good workaround, actually I have found a good way. It is possible to use custom build tag so different -tags RPi could be used.
Also as I see we have two issues. One with RPi BCM and another one with EGL. EGL is depend on desktop env.

We probably should have following installations
ARM RPi - Without X
ARM Generic - Without X (-EGL -BCM)
ARM Generic - With X/Desktop (-BCM)

Offline

#12 2017-08-24 05:50:38

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: New binary compile request

New version is available on download page for ARM. Please, try and let me know if it fixes the issues.

Offline

#13 2017-08-25 04:37:41

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: New binary compile request

Shahin wrote:

New version is available on download page for ARM. Please, try and let me know if it fixes the issues.

On my Banana Pi board, it starts up, and it slices, and machine control over serial works fine.  Video works too on my 1080p desktop monitor, had to disable the text cursor manually (vt.global_cursor_default=0 kernel parameter).  Also the program crashes when trying to display the static full HD calibration image:

panic: interface conversion: image.Image is *image.Gray, not *image.RGBA

goroutine 806 [running]:
projects/printer/app/renderer/img.LoadPix(0x119987b0, 0x28, 0x0, 0x0, 0x0)
	/home/shahin/go/src/projects/printer/app/renderer/img/loader.go:39 +0xec
projects/printer/app/viewer/fb.(*RGBA).Display(0x109553e0, 0x119987b0, 0x28, 0x2, 0x2)
	/home/shahin/go/src/projects/printer/app/viewer/fb/fb_linux.go:102 +0x24
projects/printer/app/viewer/fb.DisplayImage(0x119987b0, 0x28, 0x426fff)
	/home/shahin/go/src/projects/printer/app/viewer/fb/fb_linux.go:70 +0x30
main.showFrame(0x119987b0, 0x28, 0x21)
	/home/shahin/go/src/projects/printer/app/hardware.go:107 +0x13c
created by main.projectorDisplay
	/home/shahin/go/src/projects/printer/app/web.go:197 +0xe4

No big deal, the dynamic calibration plates work fine.  The oddly dimensioned LCD in the D7 doesn't appear to be recognized by this old A20 board, so I'll wait for my H3 boards to arrive to test on the printer some more.
Cheers!

Offline

#14 2017-08-25 06:15:56

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: New binary compile request

Thank you for testing. Actually all images must be RGBA maybe fullhd calibration images has been changed on your installation.

Offline

#15 2017-08-26 16:27:48

ender67
Member
Registered: 2017-08-16
Posts: 8

Re: New binary compile request

Armbian 5.30/jessie. Three issues so far:
1. when I try do display a the calibration image there is an error / panic (exit to prompt):
2017/08/26 18:07:34.751888 {"Layer":"1","module":"Image","level":"Warning","msg":"Display layer public/plates/dynamic.png"}
panic: runtime error: slice bounds out of range

goroutine 86 [running]:
projects/printer/app/viewer/fb.(*RGBA).Display(0x109d40e0, 0x494fc2, 0x19, 0x2, 0x2)
        /home/shahin/go/src/projects/printer/app/viewer/fb/fb_linux.go:106 +0x78
projects/printer/app/viewer/fb.DisplayImage(0x494fc2, 0x19, 0x426fff)
        /home/shahin/go/src/projects/printer/app/viewer/fb/fb_linux.go:70 +0x30
main.showFrame(0x494fc2, 0x19, 0x494fc2)
        /home/shahin/go/src/projects/printer/app/hardware.go:107 +0x13c
created by main.projectorGenerate
        /home/shahin/go/src/projects/printer/app/web.go:218 +0x140
root@orangepione:~#
Dynamic calibration, boundaries, full white, full HD ...the same result.

2. Printing calibration plate : panic:
2017/08/26 18:23:30.535782 {"Layer":"1","module":"Calibration","level":"Warning","msg":"Printing layer 1 from 100"}
2017/08/26 18:23:42.536760 {"Layer":"1","module":"Image","level":"Warning","msg":"Display layer public/plates/0/1.png"}
panic: runtime error: slice bounds out of range

goroutine 103 [running]:
projects/printer/app/viewer/fb.(*RGBA).Display(0x10961500, 0x10912d40, 0x15, 0x2, 0x2)
        /home/shahin/go/src/projects/printer/app/viewer/fb/fb_linux.go:106 +0x78
projects/printer/app/viewer/fb.DisplayImage(0x10912d40, 0x15, 0x426fff)
        /home/shahin/go/src/projects/printer/app/viewer/fb/fb_linux.go:70 +0x30
main.showFrame(0x10912d40, 0x15, 0x15)
        /home/shahin/go/src/projects/printer/app/hardware.go:107 +0x13c
main.printCalibration(0x1)
        /home/shahin/go/src/projects/printer/app/printing-calibration.go:45 +0x8ac
created by main.printerStart
        /home/shahin/go/src/projects/printer/app/web.go:667 +0xbc
root@orangepione:~#

3. printing a plate - error but no panic (no exit to prompt):
2017/08/26 18:13:52.197417 {"Layer":"1","module":"Image","level":"Warning","msg":"Display layer public/plates/2/1.png"}
2017/08/26 18:13:52.535976 {"Layer":"1","module":"Printing","level":"Error","msg":"Problem detected, printer paused. Please, solve the issue and resume printing. runtime error: slice bounds out of range"}

Framebuffer path is set to /dev/fb0.

root@orangepione:~# fbset -fb /dev/fb0 -i

mode "1920x1080"
    geometry 1920 1080 1920 2160 32
    timings 0 0 0 0 0 0 0
    rgba 8/16,8/8,8/0,8/24
endmode

Frame buffer device information:
    Name        :
    Address     : 0x56200000
    Size        : 16588800
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 7680
    Accelerator : No
root@orangepione:~#

/dev/fb0 seems to work : I can "fill" the screen with

cat /dev/urandom >/dev/fb0

and I can set a single pixel with

printf "\x00\xFF\xFF\x00" | dd bs=4 seek=$((100 * 1920 + 100)) >/dev/fb0

Offline

#16 2017-08-26 19:34:47

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,541

Re: New binary compile request

Fbsettings looks fine, but images being loaded are higher resolution than framebuffer size.
I add logic to prevent panic on this issue but you could not get correct image until sizes matches perfectly,

Offline

#17 2017-09-11 08:08:58

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: New binary compile request

Reporting initial success with an Orange Pi PC, Armbian 5.31, Wanhao D7, /dev/fb0.  The key seems to be to switch to the nightly kernel (I used 4.11.5-sun8i) using the armbian-config utility.
Video is correct.  Projector and Z-axis control work fine.  It's not a very fast machine with such demands being made on RAM bandwidth, but it's smaller and cooler than the PC I was using to drive it before.  Thanks again, Shahin!

@ender67, your virtual fb Y size is twice the physical size.  I had the same problem and also the error: slice bounds out of range, until switching to the nightly kernel with armbian-config.

Offline

Board footer

Powered by FluxBB