grblHAL / STM32F4xx

grblHAL driver for ST STM32F4xx (Nucleo-64, Blackpill)
Other
93 stars 85 forks source link

Manually Building SuperLongBoard STM32F412 #193

Open siganberg opened 4 hours ago

siganberg commented 4 hours ago

Since the SuperLongBoard is not yet available in Web Builder, I'm trying to build firmware for the LongBoard32, but I can't seem to get it working, and I keep encountering errors.

So far, I have created an entry in the platformio.ini file:


[env:f412vg_SLB]
board = genericSTM32F412VG
custom_prog_version = SLB
board_build.ldscript = STM32F412VGTX_FLASH.ld
build_flags = ${common.build_flags} 
  -D BOARD_LONGBOARD32=1
  -D SLB_EEPROM_ENABLE=1
  -D SIENCI_LASER_PWM=1
  -D SDCARD_ENABLE=2 
  -D _VOLUMES=1  
lib_deps = ${common.lib_deps}
  FatFs
  eeprom
lib_extra_dirs = ${common.lib_extra_dirs}  
upload_protocol = stlink

I also added an entry in driver.json:

  {
      "name": "Longboard32",
      "symbol": "BOARD_LONGBOARD32",
      "URL": "https://github.com/Sienci-Labs/SuperLongBoard",
      "MAP": "boards/longboard32_map.h",
      "caps": {
        "axes": 5,
        "auto_square": 2,
        "digital_in": 3,
        "digital_out": 4,
        "eeprom": -2,
        "fram": 0,
        "i2c": 1,
        "sdcard": 1,
        "keypad": 1,
        "pio_board": "genericSTM32F412VG",
        "ldscript": "STM32F412VGTX_FLASH.ld"
      },
      "symbols": {
          "STM32F446xx": "",
          "HAS_BOOTLOADER": ""
      }

I copied the genericSTM32F412VG.json file to the root folder. This file can be found here: (https://github.com/Sienci-Labs/sienciHAL/blob/SLB_Bringup_Dev/genericSTM32F412VG.json).

Then, I executed the following command:

pio run -e f412vg_SLB

I started with fewer plugins to have a successful build, but I keep getting errors after fixing one issue. Before going down the rabbit hole of trying to fix all the errors, I figured I'd ask if anyone has already had a successful build.

The reason I am building this is that the core of the Sienci grblHAL firmware is not up to date.

terjeio commented 3 hours ago

Here is the platformio.ini I use to build the latest version with VSCode/PlatformIO: Note that this build has not been verified yet!

platformio.zip

siganberg commented 2 hours ago

Do you have the extra scripts?

extra_scripts = 
    pre:extra_script.py
    post:extra_script.py

image

siganberg commented 2 hours ago

Not sure if the script is important but if I take it out, I'm getting this errors:

image

terjeio commented 2 hours ago

Do you have the extra scripts?

It is found here.

Not sure if the script is important but if I take it out, I'm getting this errors:

Do you have the latest grblHAL version?

siganberg commented 1 hour ago

The core? Yes

image

I manage to have successful compilation by disabling the the following. Will adding Sienci custom plugins and looking to fix those 2 flags.

 -D EVENTOUT_ENABLE=0
  -D RGB_LED_ENABLE=0

Thanks a lot for the help, really appreciate it.

terjeio commented 1 hour ago

Will adding Sienci custom plugins and looking to fix those 2 flags.

Do a recursive pull to get the latest submodules instead, recently a new one was added for the two you disabled.