Welcome! Log In Create A New Profile

Advanced

New board on marlin 2.0

Posted by neuraldip 
New board on marlin 2.0
June 08, 2020 01:28AM
Hello,
i am trying to add a new board in marlin (ATmega2560) but i can’t seem to even compile it. i start clean from bugfix-2.0.x branch and then i do exactly what the documentation says:

“Once your pins file is ready, simply add a new define to the boards.h file and a conditional include to pins.h . And you’re done!”

the error i get is : #error “Unknown MOTHERBOARD value set in Configuration.h”

please find attached the files that i have modified.

Of course the clean version compiles fine.
Do i have to add my board in some other background files too?

thank you
Attachments:
open | download - boards.h (20 KB)
open | download - Configuration.h (80.5 KB)
open | download - Configuration_adv.h (126.3 KB)
Re: New board on marlin 2.0
June 13, 2020 10:35PM
I've never done that, but how does Marlin know what pins file to use?

“Once your pins file is ready,.............."
How did yo make your pins file ready?
Re: New board on marlin 2.0
June 15, 2020 08:21AM
" simply add a new define to the boards.h file and a conditional include to pins.h"
                                                                 ^^^^^^
                                                                 ||||||


eg in pins.h is

#elif MB(RAMPS_14_EFB )
  #include "ramps/pins_RAMPS.h"                 // ATmega1280, ATmega2560                 env:mega1280 env:mega2560


note you do not use the BOARD_ prefix in the test, the macro MB does that for you.
also note the comments are required. they are for the auto build feature. What options to display and the env to use when building it.

so your would look a little like
#elif MB(TENLOG_D3P)
  #include "ramps/pins_TENLOG_D3P.h"                 // ATmega2560                 env:mega2560

Edited 6 time(s). Last edit at 06/15/2020 08:41AM by Dust.
Re: New board on marlin 2.0
June 15, 2020 08:27AM
Configuration.h and boards.h look good, just need to add it to pins.h and of course create the pins_TENLOG_D3P.h file that pins.h loads

Edited 1 time(s). Last edit at 06/15/2020 08:46AM by Dust.
Re: New board on marlin 2.0
June 15, 2020 11:07AM
I was trying to help them figure out why it did not work with my question, as they did not upload a pins file.
from what I found it appears that their board has the same I/O as a Ramps board, so the conditional include would include pins_RAMPS.h and there is no need for another pins file.
Re: New board on marlin 2.0
June 15, 2020 11:12AM
Thank a lot,
the problem was that in the pins.h file i was using the complete name of the board..
Re: New board on marlin 2.0
June 15, 2020 12:16PM
thanks for the update
Sorry, only registered users may post in this forum.

Click here to login