Marlin icon indicating copy to clipboard operation
Marlin copied to clipboard

Elegoo Neptune boards

Open thinkyhead opened this issue 1 year ago • 15 comments

Revival of #24567 by @mlee12382 for evaluation and possible merge.


Description

Add new board definitions and pins and updated .ini files for platformio for the Elegoo Neptune series of printers.

Benefits

Adds boards to make custom compiling firmware for the Elegoo Neptune series of printers easier, duplicates and renames the 2 boards that come in the Neptune 2 printers to make it more straightforward and adds the missing board files for the Neptune X and Neptune 3

thinkyhead avatar Oct 18 '22 03:10 thinkyhead

Good evening @ivankravets ! Apparently the dev version of PlatformIO 6.1.6a3 is causing our CI to fail, so I added a commit here that skips the update-to-latest step. What do you recommend?

thinkyhead avatar Nov 21 '22 23:11 thinkyhead

@thinkyhead , thanks for pinging me! Could you point me to the CI build where I can learn more about the issue with the latest PIO-dev? I checked the latest failed Marlin builds and didn't find any issues related to the PlatformIO.

ivankravets avatar Nov 22 '22 10:11 ivankravets

@thinkyhead , thanks for pinging me! Could you point me to the CI build where I can learn more about the issue with the latest PIO-dev? I checked the latest failed Marlin builds and didn't find any issues related to the PlatformIO.

For one CI test, LPC1768, the result looks like this...

  • Platform Manager: Installing https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip
  • 17 Downloading...
  • 18 Unpacking
  • 19 Platform Manager: [email protected] has been installed!
  • 20 Tool Manager: Installing platformio/tool-scons @ ~4.40400.0
  • 21 Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
  • 22 Unpacking
  • 23 Tool Manager: [email protected] has been installed!
  • 24 Tool Manager: Removing tool-scons @ 4.40300.1
  • 25 Tool Manager: [email protected] has been removed!
  • 26 Error: Build environment 'LPC1768' is incompatible with BOARD_RAMPS_14_EFB. Use one of these: mega2560, mega1280

Without pio upgrade --dev there is no error. The script that emits the error is breaking, or something else in the chain is, but it's not clear why. I tested the build locally with PIO version 6.1.6a4 and it works fine. The main reason that the MOTHERBOARD would return BOARD_RAMPS_14_EFB is if the Configuration.* files were failing to download from the Configurations repo. However, that should not be affected by removing pio upgrade --dev.

So, I will add more diagnostic lines to the scripts on this PR and see what's going on here in CI that isn't happening locally.

thinkyhead avatar Nov 26 '22 01:11 thinkyhead

@ivankravets — I have a feeling this is what is breaking, causing our preflight-checks.py script to run too soon:

def is_pio_build():
    from SCons.Script import DefaultEnvironment
    env = DefaultEnvironment()
    return not env.IsIntegrationDump()

Does that seem possible? Could some change in PIO only affecting the way it is installed / used within CI be causing pre: scripts to fire and for env.IsIntegrationDump() to return a false result during the init process?

thinkyhead avatar Nov 26 '22 02:11 thinkyhead

Do you call somewhere pio run -t clean or -t cleanall? Could it be related to this commit https://github.com/platformio/platformio-core/commit/7e6cb84c879a3d5080bd53183f80575d10a45cd5 ?

We added the ability to hook on "clean" target.

The easiest way to check "clean" targets are


if env.GetOption("clean") or ("cleanall" in COMMAND_LINE_TARGETS):
     env.Exit(0)

ivankravets avatar Nov 27 '22 14:11 ivankravets

Do you call somewhere pio run -t clean or -t cleanall?

Ahhhhh. We do use that in CI tests. Let me see if there is a way to detect it and then not run the environment check in that case. Hold on………

thinkyhead avatar Dec 04 '22 01:12 thinkyhead

Thanks for the clue, Ivan! This is all we needed: return not env.IsIntegrationDump() and not env.IsCleanTarget()

thinkyhead avatar Dec 04 '22 02:12 thinkyhead

I see Neptune configurations were added by @EvilGremlin and @just-trey so if you don't mind me pinging you both, can you comment on whether this PR is actually needed, or if we are already sufficiently covered by using the MKS Robin board defines for the MOTHERBOARD in all cases? Are there any significant differences in the boards included in Neptune machines?

thinkyhead avatar Dec 10 '22 15:12 thinkyhead

Does this also include support for the Neptune 3 Pro?

kozross avatar Dec 14 '22 05:12 kozross

Does this also include support for the Neptune 3 Pro?

Not at all, in fact this version of the Neptune 3 standard board doesn't work either which is why I abandoned it. Elegoo has bastardized Marlin too much to get the Neptune 3 working, this was my early attempt at getting it working on regular Marlin source code and it was a failure. As far as I know the source code for the pro and by extension the plus and the max hasn't been released yet and they use a different main board.

mlee12382 avatar Dec 14 '22 10:12 mlee12382

@thinkyhead and @mlee12382 - I managed to get this diagram of the pins for the Neptune 3 Pro's board. Dunno if it'd be of any help to you, but I thought I'd share.

kozross avatar Dec 26 '22 09:12 kozross

Additionally adding to this convo towards @mlee12382 & @kozross, was sifting through the Elegoo subreddit and found folks have been able to get klipper working. Here is the repo from someone within that community (@TheFeralEngineer):

Neptune 3

Neptune 3 Pro

Hopefully that helps out with getting these printers supported.

junland avatar Feb 06 '23 22:02 junland

Additionally adding to this convo towards @mlee12382 & @kozross, was sifting through the Elegoo subreddit and found folks have been able to get klipper working. Here is the repo from someone within that community (@TheFeralEngineer):

Neptune 3

Neptune 3 Pro

Hopefully that helps out with getting these printers supported.

Yup! Running on the 2/2s, 3, 3pro and working through the 3 plus and 3 Max with the help of others (i don't have one). I also had the 3 running on bare Marlin 2.1.x bugfix via the creality h43 touchscreen... Pretty cleanly, might I add... I just found more of a home with Klipper. Way better for continual modding and the integration of screen and webui is just lovely 😺

TheFeralEngineer avatar Feb 06 '23 22:02 TheFeralEngineer

I also ported the Neptune 3 Pro to Klipper, and even pushed it upstream.

kozross avatar Feb 06 '23 23:02 kozross

Is anybody with these boards still interested in getting this in? From the comments it sounds like what is here is probably incomplete? I'd probably recommend closing this unless any contributors are still interested in getting them working...there isn't much point in pulling something in that isn't functional.

sjasonsmith avatar Nov 21 '23 07:11 sjasonsmith