Closed phucly01 closed 1 year ago
That read me is not a full list of changes, just the highlights
Look at the example config provided
you have SERIAL_PORT 0
which is why you getting the error
error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB.
OT: I see that STRINGIFY is not working in assert
@GMagician it does but the assert is printed as well as the error line
Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB.
and
static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
ops missed first!
Thank you Ellensp and GMagician I got it compiled now but the printer doesn't recognize the cbd. I am trying to figure out how to set the platformio to keep the bin file to try it out. It looks like platformio removed the bin file after encrypting it.
Thank you Ellensp and GMagician I got it compiled now but the printer doesn't recognize the cbd. I am trying to figure out how to set the platformio to keep the bin file to try it out. It looks like platformio removed the bin file after encrypting it.
I tried the bin file and it still didn't update. I am trying to update the tronxy's official firmware to this firmware. Is it doable or I have to do something in between like some sort of conversion?
I managed to put the bin file in using the STM32CubeProgrammer. However, the screen is black. Am I missing something in the configuration?
Both boot and marlin, with correct addresses?
I am not sure what you mean by boot and marlin.
I compiled the code and flashed the firmware.bin with STM32CubeProgrammer at 0x08000000
This won't work, env expect bootloader
I'm blind apparentlyboard_build.address = 0x0800A000
you have to change that to 0x08000000 (or just delete line)
Can you elaborate this a bit. I just started this two days ago. I am using the chitu_f103 env and made some changes in the configuration.h to meet the tronxy x5sa pro settings. Am I supposed to make the bootloader and the firmware.bin and flash them both?
Ok, i'm not so blind in the end... it's a mess, chitu_f103_maple
env expect bootloader (thus encrypt bin) but missing board_build.offset
Delete buildroot/share/PlatformIO/scripts/chitu_crypt.py
fron env and it should work
But better use chitu_f103
env and also delete board_build.crypt_chitu
board_build.offset
and extra_scripts
chitu_f103_maple didn't compile. I have been using chitu_f103. I also did what you recommended but the screen does not turn on so I have no idea if the firmware even run. The download seems to gone through fine.
I think the bootloader is gone. Is there an instruction to build bootloader for this printer?
Download is always fine, it will flash absolutely whatever, there are no checks. Yep, boot is gone because you flashed with no offset. You'll have to find some opensource boot, configure and build for this board (not easy). Or find somewhere dump of stock one, which i cant google up. Eh, good riddance i say :) How you env look like now?
How do you put the offset? in the programmer or in the compilation?
In STM32CubeProgrammer, each time I open the bin file and set to 0x08000000 it says address out of range. There is no option to tell it to start at 0x08000000
in stm32f1.ini:
#
# Chitu boards like Tronxy X5s (STM32F103ZET6)
#
[env:chitu_f103]
extends = stm32_variant
board = genericSTM32F103ZE
#board_build.crypt_chitu = update.cbd
board_build.variant = MARLIN_F103Zx
#board_build.offset = 0x8800
build_flags = ${stm32_variant.build_flags}
-DSTM32F1xx
build_unflags = ${stm32_variant.build_unflags}
#extra_scripts = ${stm32_variant.extra_scripts}
# buildroot/share/PlatformIO/scripts/chitu_crypt.py
platformio.ini:
[platformio]
src_dir = Marlin
boards_dir = buildroot/share/PlatformIO/boards
default_envs = chitu_f103
include_dir = Marlin
extra_configs =
Marlin/config.ini
ini/avr.ini
ini/due.ini
ini/esp32.ini
ini/features.ini
ini/lpc176x.ini
ini/native.ini
ini/samd21.ini
ini/samd51.ini
ini/stm32-common.ini
ini/stm32f0.ini
ini/stm32f1-maple.ini
ini/stm32f1.ini
ini/stm32f4.ini
ini/stm32f7.ini
ini/stm32h7.ini
ini/stm32g0.ini
ini/teensy.ini
ini/renamed.ini
Bboth or neither i guess? 0x08000000 is flash start, no offset. I don't use cube though, so no idea if it checks anything
this is unreadable, use code brackets ( triple ``` )
looks right, should work if it can at all
So I think the problem is the programmer didn't write to the correct offset. Will setting this line force the offset? board_build.offset = 0x08000000 What program do you use that can tell the it the offset?
Nope, without bootloader you don't set any offsets anywhere. just open bin and flash
so the bin file must have the bootloader prepended?
I have the bootloader from tronxy
no
I have the bootloader. What do I do to get this to work?
Forget about bootloader for now, just build like this and flash, don't touch any address settings in cube.
[env:chitu_f103]
extends = stm32_variant
board = genericSTM32F103ZE
#board_build.crypt_chitu = update.cbd
board_build.variant = MARLIN_F103Zx
#board_build.offset = 0x8800
build_flags = ${stm32_variant.build_flags}
-DSTM32F1xx
build_unflags = ${stm32_variant.build_unflags}
#extra_scripts = ${stm32_variant.extra_scripts}
# buildroot/share/PlatformIO/scripts/chitu_crypt.py
I did that, it didn't work
Then it doesn't work at all now, so flash back boot and then flash stock firmware from SD
Yup I did that, back to ground 0 now. So, if I understand your correctly, this code set isn't working for my printer.
Seems like it. Of course you might be omitting some crucial thing that breaks everything as is often the case, only so much can be guessed remotely
Yeah,maybe I missed something but I won't know. I did everything from the document for the my printer. Thanks for your help.
This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
Ok so this is my second time here and I messed up the first time so please bear with me. Just for a bit of a background. I attempted to compile a baseline for my tronxy x5sa pro so I have a working code to work with. Ultimately I am trying to add code to compensate the inaccuracy of the prints. So far I already tried two repositories that generate firmware for the printer I have, supposedly. Yet, they both didn't compile. So My attempt is to use this code to make the firmware.
I followed the instruction here: https://github.com/MarlinFirmware/Configurations/blob/release-2.0.9.3/config/examples/Tronxy/X5SA/HOWTO-INSTALL.md to set the configuration. How ever it yield the compilation error.
I don't think it is the error from the code. I think it is more likely the platformio issue. I hope some senior members can point me to the right direction.
Additional info: VSCode: 1.87.2 Platformio: 6.1.7
This is the error: Processing chitu_f103_maple (board: marlin_maple_CHITU_F103; platform: ststm32@~12.1; framework: arduino)
Verbose mode can be enabled via
-v, --verbose
option CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/marlin_maple_CHITU_F103.html PLATFORM: ST STM32 (12.1.1) > CHITU STM32F103Z (64k RAM. 512k Flash) HARDWARE: STM32F103ZET6 72MHz, 59.12KB RAM, 469.03KB Flash DEBUG: Current (blackmagic) External (blackmagic, jlink, stlink) PACKAGES:~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\HAL.cpp:30: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\MarlinSerial.cpp:25: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\MarlinSerial.cpp:25: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\HAL_SPI.cpp:32: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\HAL_SPI.cpp:32: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_bl24cxx.cpp:29: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_bl24cxx.cpp:29: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\Servo.cpp:25: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\Servo.cpp:25: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ In file included from d:\projects\marlin-bugfix-2.1.x\marlin\src\hal\hal.h:30:0, from Marlin\src\HAL\STM32F1\dogm../../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\dogm\u8g_com_stm32duino_swspi.cpp:25: d:\projects\marlin-bugfix-2.1.x\marlin\src\hal\stm32f1\hal.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from d:\projects\marlin-bugfix-2.1.x\marlin\src\hal\hal.h:30:0, from Marlin\src\HAL\STM32F1\dogm../../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\dogm\u8g_com_stm32duino_swspi.cpp:25: d:\projects\marlin-bugfix-2.1.x\marlin\src\hal\stm32f1\hal.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\SPI.cpp:43: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\SPI.cpp:43: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\HAL.cpp.o] Error 1 [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\MarlinSerial.cpp.o] Error 1 In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_if_iic.cpp:30: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_if_iic.cpp:30: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_flash.cpp:32: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_flash.cpp:32: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\HAL_SPI.cpp.o] Error 1 In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_sdcard.cpp:30: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_sdcard.cpp:30: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\eeprom_bl24cxx.cpp.o] Error 1 [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\Servo.cpp.o] Error 1 [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\dogm\u8g_com_stm32duino_swspi.cpp.o] Error 1 [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\eeprom_if_iic.cpp.o] Error 1 [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\SPI.cpp.o] Error 1 [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\eeprom_flash.cpp.o] Error 1 In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\fast_pwm.cpp:24: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\fast_pwm.cpp:24: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\eeprom_sdcard.cpp.o] Error 1 In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_wired.cpp:29: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:172:1: error: expected ';' before 'typedef' typedef int8_t pin_t; ^~~ In file included from Marlin\src\HAL\STM32F1../../inc/../HAL/HAL.h:30:0, from Marlin\src\HAL\STM32F1../../inc/MarlinConfig.h:33, from Marlin\src\HAL\STM32F1\eeprom_wired.cpp:29: Marlin\src\HAL\STM32F1../../inc/../HAL/../HAL/STM32F1/HAL.h:97:3: error: static assertion failed: SERIAL_PORT must be from 1 to 5. You can also use -1 if the board supports Native USB. static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") ^~~~~ [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\fast_pwm.cpp.o] Error 1 [.pio\build\chitu_f103_maple\src\src\HAL\STM32F1\eeprom_wired.cpp.o] Error 1 ===================================================================================== [FAILED] Took 12.25 seconds =====================================================================================Environment Status Duration
chitu_f103_maple FAILED 00:00:12.248 ================================================================================ 1 failed, 0 succeeded in 00:00:12.248 ================================================================================
Bug Timeline
Not sure, I am a newbie
Expected behavior
No response
Actual behavior
No response
Steps to Reproduce
Install the latest VSCode Download/extract this repository Open it in VSCode (also tried in administrator mode) VSCode downloaded required plugins Change the configuration according to https://github.com/MarlinFirmware/Configurations/blob/release-2.0.9.3/config/examples/Tronxy/X5SA/HOWTO-INSTALL.md for the x5sa pro: {
define MOTHERBOARD BOARD_CHITU3D_V6
// The size of the printable area
define X_BED_SIZE 330
define Y_BED_SIZE 330
define Z_MAX_POS 400
define X_DRIVER_TYPE TMC2208_STANDALONE
define Y_DRIVER_TYPE TMC2208_STANDALONE
define Z_DRIVER_TYPE TMC2208_STANDALONE
define E0_DRIVER_TYPE TMC2208_STANDALONE
define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 800, 764 }
// Extruder seems inverted on titan!
define INVERT_E0_DIR true
} Click on build.
Version of Marlin Firmware
Tronxy x5sa pro V1.32
Printer model
Tronxy x5sa pro
Electronics
No response
Add-ons
No response
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
Configuration.zip