makerbase-mks / MKS-Robin-Nano-S-Firmware

GNU General Public License v3.0
1 stars 2 forks source link

error in vscode in compiling #4

Open Bergateo opened 3 years ago

Bergateo commented 3 years ago

Hi everyone here again for a new problem... i can't compile correctly the marlin fw for the MKS Robin Nano S 1.3... i've tried to compile the fw as new and also some others fw already prepared for the flyingbear ghost 5 (but with a different board) and it works correctly with those already prepared,.. but if I change the parameters for the board in the configuration.h and platform.ini with my board informations, it gets a bunch of errors.. i've dowloaded this repository that seems working and from which i'm trying to edit it correctly; https://github.com/SimoneCarnio/Flying-Bear-Ghost-5-Marlin-2.0-Firmware-Red3D-Edition

this are the values that i'm changing: default_env:mks_robin_pro2 (in platform.ini)

define MOTHERBOARD BOARD_MKS_ROBIN_PRO_V2 (in configuration.h)

and this is the error that i get just only changing the configuration.h and platform.ini:

In file included from Marlin\src\HAL\STM32\tft\tft_fsmc.cpp:28:
Marlin\src\HAL\STM32\tft\tft_fsmc.h:55:12: error: 'SRAM_HandleTypeDef' does not name a type; did you mean 'UART_HandleTypeDef'? 
   55 |     static SRAM_HandleTypeDef SRAMx;
      |            ^~~~~~~~~~~~~~~~~~
      |            UART_HandleTypeDef
In file included from Marlin\src\HAL\STM32\tft\tft_fsmc.cpp:28:
Marlin\src\HAL\STM32\tft\tft_fsmc.h:101:12: error: 'FSMC_NORSRAM_DEVICE' was not declared in this scope; did you mean 'FSMC_NORSRAM_TYPEDEF'?
  101 |   {PD_14,  FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D00
      |            ^~~~~~~~~~~~~~~~~~~
      |            FSMC_NORSRAM_TYPEDEF
Marlin\src\HAL\STM32\tft\tft_fsmc.h:102:12: error: 'FSMC_NORSRAM_DEVICE' was not declared in this scope; did you mean 'FSMC_NORSRAM_TYPEDEF'?
  102 |   {PD_15,  FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D01
      |            ^~~~~~~~~~~~~~~~~~~
      |            FSMC_NORSRAM_TYPEDEF
Marlin\src\HAL\STM32\tft\tft_fsmc.h:103:12: error: 'FSMC_NORSRAM_DEVICE' was not declared in this scope; did you mean 'FSMC_NORSRAM_TYPEDEF'?
  103 |   {PD_0,   FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D02
      |            ^~~~~~~~~~~~~~~~~~~
      |            FSMC_NORSRAM_TYPEDEF
Marlin\src\HAL\STM32\tft\tft_fsmc.h:104:12: error: 'FSMC_NORSRAM_DEVICE' was not declared in this scope; did you mean 'FSMC_NORSRAM_TYPEDEF'?
  104 |   {PD_1,   FSMC_NORSRAM_DEVICE, FSMC_PIN_DATA}, // FSMC_D03
      |            ^~~~~~~~~~~~~~~~~~~
      |            FSMC_NORSRAM_TYPEDEF
compilation terminated due to -fmax-errors=5.
Compiling .pio\build\mks_robin_pro2\src\src\HAL\STM32\watchdog.cpp.o
Compiling .pio\build\mks_robin_pro2\src\src\HAL\shared\HAL_spi_L6470.cpp.o
*** [.pio\build\mks_robin_pro2\src\src\HAL\STM32\tft\tft_fsmc.cpp.o] Error 1
================= [FAILED] Took 52.42 seconds =================

Environment     Status    Duration
--------------  --------  ------------
mks_robin_pro2  FAILED    00:00:52.415
============ 1 failed, 0 succeeded in 00:00:52.415 ============ 
The terminal process "C:\Users\Matteo\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'mks_robin_pro2'" terminated with exit code: 1.  

can someone help me through it please?

willngton commented 3 years ago

@Bergateo The source code your are trying to use is behind Marlin official bug-fix, it does not have the board definition for robin nano v 1.3

Best way would be your download the latest Marlin Bug fix e compare line by line side by side and make your own configs (Configuration.h and Configuration_adv.h )

MKS Robin Nano V1.3 and Nano-S V1.3 use Marlin 2.0.x firmware settings In platformio.ini file set: default_envs = mks_robin_nano_v1_3_f4 In Confiuration.h file set: #define SERIAL_PORT 3; #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V1_3_F4 If you need reupload bootloader to board, you can refer to Bootloader path README The latest version marlin has supported MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 board

Here is an example how I did on my VSCode.

Selection_857

Bergateo commented 3 years ago

@Bergateo The source code your are trying to use is behind Marlin official bug-fix, it does not have the board definition for robin nano v 1.3

Best way would be your download the latest Marlin Bug fix e compare line by line side by side and make your own configs (Configuration.h and Configuration_adv.h )

MKS Robin Nano V1.3 and Nano-S V1.3 use Marlin 2.0.x firmware settings In platformio.ini file set: default_envs = mks_robin_nano_v1_3_f4 In Confiuration.h file set: #define SERIAL_PORT 3; #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V1_3_F4 If you need reupload bootloader to board, you can refer to Bootloader path README The latest version marlin has supported MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 board

Here is an example how I did on my VSCode.

Selection_857

@willngton

so you are choosing the board "mks_robin_nano_v1_3_F4"? i was refearing to the chip code to choose the right board... and the one that corrisponde is the "BOARD_MKS_ROBIN_PRO_V2" (which has the STM32F407VE). all the test, before i had to try to compile a fw already built, are done in the marlin bugfix-2.x.x version 2.0.9.1.

i've also tried to find out the board that you've specified, on board.h, but i cannot find it even if i open the search window... can you open a branch with the files that you've edited so i can see directly what is out of place? also, do you have my same version or do you have another board?

willngton commented 3 years ago

@Bergateo The source code your are trying to use is behind Marlin official bug-fix, it does not have the board definition for robin nano v 1.3 Best way would be your download the latest Marlin Bug fix e compare line by line side by side and make your own configs (Configuration.h and Configuration_adv.h )

MKS Robin Nano V1.3 and Nano-S V1.3 use Marlin 2.0.x firmware settings In platformio.ini file set: default_envs = mks_robin_nano_v1_3_f4 In Confiuration.h file set: #define SERIAL_PORT 3; #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V1_3_F4 If you need reupload bootloader to board, you can refer to Bootloader path README The latest version marlin has supported MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 board

Here is an example how I did on my VSCode. Selection_857

@willngton

so you are choosing the board "mks_robin_nano_v1_3_F4"? i was refearing to the chip code to choose the right board... and the one that corrisponde is the "BOARD_MKS_ROBIN_PRO_V2" (which has the STM32F407VE). all the test, before i had to try to compile a fw already built, are done in the marlin bugfix-2.x.x version 2.0.9.1.

i've also tried to find out the board that you've specified, on board.h, but i cannot find it even if i open the search window... can you open a branch with the files that you've edited so i can see directly what is out of place? also, do you have my same version or do you have another board?

Are you trying do build Marlin for Robin Nano v1.3 (or s v1.3) ?

Bergateo commented 3 years ago

@willngton

Are you trying do build Marlin for Robin Nano v1.3 (or s v1.3) ?

For the s v1.3 (STM32F407VET6) also tried out the marlin auto build plugin and it recognize the parameters correctly but always fails with my board... with another board it compile correctly. error vscode

willngton commented 3 years ago

@willngton

Are you trying do build Marlin for Robin Nano v1.3 (or s v1.3) ?

For the s v1.3 (STM32F407VET6)

Perfect,

You you need to use platformio and board directives defined here:

https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X

And the latest Marlin Bug-fix (2.0.9.2)

Bergateo commented 3 years ago

@willngton

Perfect,

You you need to use platformio and board directives defined here:

https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X

And the latest Marlin Bug-fix (2.0.9.2)

you mean this part?

## Tips
- MKS Robin Nano V1.3 and Nano-S V1.3 the pin map same as the MKS Robin Nano V1.2
- Please donot update  V1.2 version's firmware to V1.3 motherboard
- MKS Robin Nano V1.3 and Nano-S V1.3 use Marlin 2.0.x firmware settings
  - In platformio.ini file set:  default_envs = mks_robin_nano_v1_3_f4
  - In Confiuration.h file set: #define SERIAL_PORT 3; #define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V1_3_F4
- If you need reupload bootloader to board, you can refer to Bootloader path README
- The [latest version marlin](https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x) has supported MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 board

because i've just downloaded again the folder of marlin 2.x.x version 2.0.9.2 but if i check in board.h there isn't the board that is specified.... tried to compile it anyway but the results says that it cant find the board...

willngton commented 3 years ago

@Bergateo

I was checking https://github.com/SimoneCarnio/Flying-Bear-Ghost-5-Marlin-2.0-Firmware-Red3D-Edition code and he did a great work on making filament detect work on LGVL UI, that is not implemented on Marlin (and wont be unless he merge his code).

To use the same UI, a bit more work on marlin code will be need, I would open a issue-request on his github.

willngton commented 3 years ago

I just compiled using Marlin Color UI and worked, I have up on LVGL UI a long ago, not seen any interest from Marlin folks on it.

If you want I can share the files. Selection_858

Bergateo commented 3 years ago

I just compiled using Marlin Color UI and worked, I have up on LVGL UI a long ago, not seen any interest from Marlin folks on it.

If you want I can share the files. Selection_858

yes thank you! i've tried so many times in all kind of versions but none it's working..

willngton commented 3 years ago

Here you go,

I left a pre-compiled version with and copy-like config from Simone Carnio in the folder bin_MarlinColorUI, if you want to try and play with LVGL, just need to Find the line on: Configuration.h, comment out TFT_COLOR_UI an un-comment define TFT_LVGL_UI

//#define TFT_COLOR_UI

define TFT_LVGL_UI

it will give you some errors, on compiling phase asking to enable another few thing... (but wont work, I would reach out to Simone Carnio , so he can merge the new butfix on his code)

Marlin_FBG5_RobinNanov1.3.zip

Bergateo commented 3 years ago

@willngton thanks so much, it's compiling correctly now! althought i don't know what version did you find that has that board... all the versions that i've dowloaded didn't have that line, even the most recent on marlin github... mistery...

by the way i don't know if i will implement the LVGL cause i'm mounting a MKS H43 on the board, and it's on his way ;) but for adding it, the board does have to run marlin ;) and i'm still not sure if i should enable them, i think that at first i will try it out, and then maybe implement stuff ;)

thanks, once more, for helping me! ;)

another short question, i'm getting a bunch of file after the compiling, but i have to put in the sd card just the firmware.bin and the firmware.elf am i right?

willngton commented 3 years ago

@willngton thanks so much, it's compiling correctly now! althought i don't know what version did you find that has that board... all the versions that i've dowloaded didn't have that line, even the most recent on marlin github... mistery...

by the way i don't know if i will implement the LVGL cause i'm mounting a MKS H43 on the board, and it's on his way ;) but for adding it, the board does have to run marlin ;) and i'm still not sure if i should enable them, i think that at first i will try it out, and then maybe implement stuff ;)

thanks, once more, for helping me! ;)

another short question, i'm getting a bunch of file after the compiling, but i have to put in the sd card just the firmware.bin and the firmware.elf am i right?

The file you need to transfer to your sd card would be inside the folder:

.pio/build/mks_robin_nano_v1_3_f4/Robin_nano35.bin

Bergateo commented 3 years ago

@willngton

The file you need to transfer to your sd card would be inside the folder:

.pio/build/mks_robin_nano_v1_3_f4/Robin_nano35.bin

oh ok and only that? and now i'm struggling for adding the H43... 🤦🏻‍♂️