Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 12090

Re: Marlin 2.0 compille problems for a custom controller board

$
0
0
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

Viewing all articles
Browse latest Browse all 12090

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>