Sermoon D1 - Source Code Building



  • Has anyone recently attempted to build the firmware for the D1 Sermoon?

    I have downloaded the code and followed the Visual Studio Code setup and build.

    I keep getting these build errors:
    "sermoon-d1\marlin\src\hal\hal_stm32f1\fastio.h:30:10: fatal error: libmaple/gpio.h: No such file or directory"

    It seems there was some issue with the build environment according to this, but adding this line to the platformio.ini file makes no difference.

    https://reprap.org/forum/read.php?415,874307



  • Now, I just need some helping find out how to build the binary for the LCD display.

    Any ideas?



  • Ok, there are two things you need to do with the source to make it build.

    1. You need to specify an exact version of the MAX31865 library.
      Adafruit_MAX31865=https://github.com/adafruit/Adafruit_MAX31865/archive/1.1.0.zip

    So your common section should now look like:

    [common]
    default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
    extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
    build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
    lib_deps =
    U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
    LiquidCrystal@1.3.4
    TMCStepper@>=0.5.2,<1.0.0
    Adafruit NeoPixel@1.2.5
    #Adafruit_MAX31865=https://github.com/adafruit/Adafruit_MAX31865/archive/master.zip
    Adafruit_MAX31865=https://github.com/adafruit/Adafruit_MAX31865/archive/1.1.0.zip
    LiquidTWI2=https://github.com/lincomatic/LiquidTWI2/archive/master.zip
    Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/dev.zip
    SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
    SailfishRGB_LED=https://github.com/mikeshub/SailfishRGB_LED/archive/master.zip
    SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip

    1. You need to specify a version of "ststm32".
      platform = ststm32@<6.2.0

    So your STM32F1_base section should now look like:-

    [env:STM32F1_base]
    platform = ststm32@<6.2.0
    build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
    ${common.build_flags} -std=gnu++14
    build_unflags = -std=gnu++11
    src_filter = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
    lib_ignore = Adafruit NeoPixel, SPI
    monitor_speed = 250000


Log in to reply