Welcome! Log In Create A New Profile

Advanced

Marlin 2.0 compille problems for a custom controller board

Posted by DocRaptor 
Marlin 2.0 compille problems for a custom controller board
May 06, 2020 05:51AM
Hi everybody. I have a problem with Marlin 2.0 in PlatformIO. I try to compile it for a STM32F103RET on a custom build board (the pinout is similar to the bigtree skr mini v1.1, but one pin is different and the pins for the sd-card slot on the board are free so I can use them for the stepperdriver when using when I want to upgrade to tmc driver and some other stuff I did), but I always get errors like e0 pins and heater_0_pin are not defined. I just modified the bigtree skr mini v1.1 pin file and added it to pins.h and board.h (https://marlinfw.org/docs/hardware/boards.html). I don't know why.
Attachments:
open | download - marlin_changed_added_files.zip (87.8 KB)
Re: Marlin 2.0 compille problems for a custom controller board
May 06, 2020 08:49AM
In your Configuration.h you have "#define MOTHERBOARD BOARD_DRAGON_CONTROLLER"

but in boards.h you have

#define BOARD_CUSTOM_CONTROLLER 4024 // Dragon Controller

So when you define MOTHERBOARD as BOARD_DRAGON_CONTROLLER, MOTHERBOARD is set to 0 as the string BOARD_DRAGON_CONTROLLER is not defined as a number

Next in the file pins.h is the macro MB() this takes the MOTHERBOARD name and drops the BOARD_ prefix

It then tries to match "DRAGON_CONTROLLER" to load the correct board pins.h files.

But in pins.h you don't have that. you have

"#elif MB(BOARD_CUSTOM_CONTROLLER)
#include "stm32f1/pins_CUSTOM_controller.h" // STM32F1 env:custom_controller"

So to recap.

chose a name, either BOARD_CUSTOM_CONTROLLER or BOARD_DRAGON_CONTROLLER or make both work.

I will presume you want BOARD_DRAGON_CONTROLLER

So Configuration.h is good.

Update boards.h from #define BOARD_CUSTOM_CONTROLLER 4024 // Dragon Controller
To #define BOARD_DRAGON_CONTROLLER 4024 // Dragon Controller

update pins.h from
"#elif MB(BOARD_CUSTOM_CONTROLLER)
#include "stm32f1/pins_CUSTOM_controller.h" // STM32F1 env:custom_controller"
to
"#elif MB(DRAGON_CONTROLLER)
#include "stm32f1/pins_CUSTOM_controller.h" // STM32F1 env:custom_controller"

NOTE the dropped BOARD_ prefix when using the MB() macro


Two things to note:
1) you should probably update the file name from stm32f1/pins_CUSTOM_controller.h to stm32f1/pins_DRAGON_CONTROLLER.h"
2) env: sets the name of the platformio environment for auto build. You either need to add a custom environment of the name custom_controller or set it to STM32F103RE or create a DRAGON environment

Edited 2 time(s). Last edit at 05/06/2020 10:18AM by Dust.
Re: Marlin 2.0 compille problems for a custom controller board
May 06, 2020 12:07PM
Looks like I mixed in the export two marlin-files together. I wanted to put the one custom_controller here, but the entire marlin files in zip-format didn't fit here and so I wanted just put the files up here, which I changed, but I mixed it up with some other Marlin files. I have to much files.
I tested some other boards with configuration. bigtree skr mini v1.1 didn't work and gave the same errors and with a mks robin (which I don't know) the same. But when I tested it with the Fysetc cheetah, it compiled just fine.
Re: Marlin 2.0 compille problems for a custom controller board
May 06, 2020 04:15PM
I reinstaled platformIO and tested it again. Now I can't compile anything. Great
Re: Marlin 2.0 compille problems for a custom controller board
May 07, 2020 02:59AM
Its utterly pointless telling us this without error logs!
Re: Marlin 2.0 compille problems for a custom controller board
May 07, 2020 03:56AM
Quote
Dust
Its utterly pointless telling us this without error logs!

The error were the same, but every stm32f1 based (even the fysetc ones too, that compilled), had them. So I reinstalled PlatformIO again, but this time with a different editor, and still nothing. Now I downloaded Marlin again and used for testing the example configurations from here [github.com] and modified the platformio.ini for the boards. Annow it works. Looks like the Marlin Download I used was broken.
Sorry, only registered users may post in this forum.

Click here to login