Skip to content

Commit

Permalink
Add XL
Browse files Browse the repository at this point in the history
  • Loading branch information
Prusa Research authored and dragomirecky committed Mar 15, 2023
1 parent 860d225 commit a255fa4
Show file tree
Hide file tree
Showing 1,644 changed files with 536,441 additions and 9,080 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@
/CMakeLists.txt.user
CMakeUserPresets.json
.ccls-cache
.cache/clangd
.idea
compile_commands.json
/.vscode/*.peripherals.state.json
Expand Down
19 changes: 17 additions & 2 deletions .pre-commit-config.yaml
Expand Up @@ -18,6 +18,12 @@ repos:
language: script
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$
args: ['-i', '-style=file']
- id: generate-log-components-overview
name: log-components-doc-generate
description: This hook generate an overview of currently defined Log Components.
entry: python utils/logging/generate_overview.py
language: python
language_version: python3
- id: generate-cmake-presets
name: generate-cmake-presets
description: This hook generates CMakePresets.json file based on utils/presets/presets.json
Expand All @@ -44,11 +50,16 @@ exclude: |
^tests/unit/lang/translator/(keys|cs|es|fr|de|pl|it)\.txt$|
^lib/printf|
^lib/inih/|
^lib/Marlin/|
^lib/Marlin/(?!
Marlin/src/feature/prusa/|
Marlin/src/gcode/feature/prusa/|
Marlin/src/module/prusa/
)|
^lib/Prusa-Error-Codes/|
^lib/TMCStepper/|
^lib/Middlewares/Third_Party/LwIP/|
^lib/jsmn/|
^lib/Drivers/|
^lib/ESP/serial-flasher/|
^lib/ESP/lwesp/|
^lib/ESP/prusa/src/serial-flasher/serial_comm.c|
Expand All @@ -62,5 +73,9 @@ exclude: |
^lib/Segger|
^lib/tinyusb|
^lib/Middlewares/Third_Party/littlefs/|
^lib/Middlewares/Third_Party/mbedtls/
^lib/Prusa-Firmware-MMU/|
^lib/Middlewares/Third_Party/CycloneTCP/|
^lib/Middlewares/Third_Party/mbedtls/|
^lib/liblightmodbus/|
^lib/CrashCatcher/
)
173 changes: 170 additions & 3 deletions .vscode/launch.json
Expand Up @@ -12,10 +12,10 @@
"openOCDPreConfigLaunchCommands": ["set bbf_over_debugger_path ./build-vscode-buddy/firmware.bbf"],
"configFiles": ["${workspaceRoot}/utils/debug/00_common.cfg", "${workspaceRoot}/utils/debug/10_custom_config.cfg", "${workspaceRoot}/utils/debug/20_board_buddy.cfg", "${workspaceRoot}/utils/debug/30_rtt_workaround.cfg"],
"toolchainPrefix": "arm-none-eabi",
"device": "STM32F429VI",
"device": "STM32F427ZI",
"rtos": "FreeRTOS",
"runToEntryPoint": "startup_task",
"preRestartCommands": ["si"],
"preLaunchTask": "Backup current ELF",
"rttConfig": {
"enabled": true,
"address": "auto",
Expand Down Expand Up @@ -44,7 +44,7 @@
"openOCDPreConfigLaunchCommands": ["set bbf_over_debugger_path ./build-vscode-buddy/firmware.bbf"],
"configFiles": ["${workspaceRoot}/utils/debug/00_common.cfg", "${workspaceRoot}/utils/debug/10_custom_config.cfg", "${workspaceRoot}/utils/debug/20_board_buddy.cfg", "${workspaceRoot}/utils/debug/30_rtt_workaround.cfg"],
"toolchainPrefix": "arm-none-eabi",
"device": "STM32F429VI",
"device": "STM32F427ZI",
"rtos": "FreeRTOS",
"preRestartCommands": ["si"],
"rttConfig": {
Expand All @@ -64,6 +64,106 @@
]
}
},
{
"name": "Launch Dwarf",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-vscode-dwarf/firmware",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"armToolchainPath": "${workspaceRoot}/.dependencies/gcc-arm-none-eabi-10.3.1/bin",
"openOCDPreConfigLaunchCommands": ["set PUPPY_TYPE dwarf"],
"configFiles": ["${workspaceRoot}/utils/debug/00_common.cfg", "${workspaceRoot}/utils/debug/10_custom_config.cfg", "${workspaceRoot}/utils/debug/20_board_puppy.cfg", "${workspaceRoot}/utils/debug/30_rtt_workaround.cfg"],
"toolchainPrefix": "arm-none-eabi",
"device": "STM32G07",
"svdFile": "${workspaceRoot}/.dependencies/cmsis-svd-0.4.9999/data/STMicro/STM32G07x.svd",
"rtos": "FreeRTOS",
"presentation": {
"group": "XL Puppies",
},
"preLaunchTask": "Wait 1", // this is needed when starting all puppies at once, because there is some issue when all of them start at once
"rttConfig": {
"enabled": true,
"address": "auto",
"searchSize": 16,
"searchId": "SEGGER RTT",
"clearSearch": true,
"polling_interval": 10,
"decoders": [
{
"label": "Logging",
"port": 0,
"noprompt": true,
"type": "console"
}
]
}
},
{
"name": "Attach to Dwarf",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-vscode-dwarf/firmware",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"armToolchainPath": "${workspaceRoot}/.dependencies/gcc-arm-none-eabi-10.3.1/bin",
"openOCDPreConfigLaunchCommands": ["set PUPPY_TYPE dwarf"],
"configFiles": ["${workspaceRoot}/utils/debug/00_common.cfg", "${workspaceRoot}/utils/debug/10_custom_config.cfg", "${workspaceRoot}/utils/debug/20_board_puppy.cfg", "${workspaceRoot}/utils/debug/30_rtt_workaround.cfg"],
"toolchainPrefix": "arm-none-eabi",
"device": "STM32G07",
"svdFile": "${workspaceRoot}/.dependencies/cmsis-svd-0.4.9999/data/STMicro/STM32G07x.svd",
"rtos": "FreeRTOS",
"rttConfig": {
"enabled": true,
"address": "auto",
"searchSize": 16,
"searchId": "SEGGER RTT",
"clearSearch": true,
"polling_interval": 10,
"decoders": [
{
"label": "Logging",
"port": 0,
"noprompt": true,
"type": "console"
}
]
}
},
{
"name": "Launch ModularBed",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-vscode-modularbed/firmware",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"armToolchainPath": "${workspaceRoot}/.dependencies/gcc-arm-none-eabi-10.3.1/bin",
"openOCDPreConfigLaunchCommands": ["set PUPPY_TYPE modularbed"],
"configFiles": ["${workspaceRoot}/utils/debug/00_common.cfg", "${workspaceRoot}/utils/debug/10_custom_config.cfg", "${workspaceRoot}/utils/debug/20_board_puppy.cfg", "${workspaceRoot}/utils/debug/30_rtt_workaround.cfg"],
"toolchainPrefix": "arm-none-eabi",
"device": "STM32G07",
"svdFile": "${workspaceRoot}/.dependencies/cmsis-svd-0.4.9999/data/STMicro/STM32G07x.svd",
"rtos": "FreeRTOS",
"presentation": {
"group": "XL Puppies",
},
"preLaunchTask": "Wait 2", // this is needed when starting all puppies at once, because there is some issue when all of them start at once
},
{
"name": "Attach to ModularBed",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-vscode-modularbed/firmware",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"armToolchainPath": "${workspaceRoot}/.dependencies/gcc-arm-none-eabi-10.3.1/bin",
"openOCDPreConfigLaunchCommands": ["set PUPPY_TYPE modularbed"],
"configFiles": ["${workspaceRoot}/utils/debug/00_common.cfg", "${workspaceRoot}/utils/debug/10_custom_config.cfg", "${workspaceRoot}/utils/debug/20_board_puppy.cfg", "${workspaceRoot}/utils/debug/30_rtt_workaround.cfg"],
"toolchainPrefix": "arm-none-eabi",
"device": "STM32G07",
"svdFile": "${workspaceRoot}/.dependencies/cmsis-svd-0.4.9999/data/STMicro/STM32G07x.svd",
"rtos": "FreeRTOS",
},
{
"name": "Launch MINI Simulator",
"type": "cortex-debug",
Expand Down Expand Up @@ -120,6 +220,56 @@
"executable": "${workspaceRoot}/build-vscode-buddy/firmware",
"request": "launch",
},
{
"name": "Launch MK404 Simulator",
"type": "cortex-debug",
"servertype": "qemu",
"serverpath": "${workspaceRoot}/.dependencies/mini403-0.5.4/qemu-system-buddy",
"armToolchainPath": "${workspaceRoot}/.dependencies/gcc-arm-none-eabi-10.3.1/bin",
"osx": {
"serverArgs": [
"-machine", "prusa-mk404",
"-display", "cocoa",
"-drive", "id=usbstick,file=fat:rw:${workspaceFolder}/build-vscode-buddy/simulator/usbdir",
"-device", "usb-storage,drive=usbstick",
"-mtdblock", "${workspaceFolder}/build-vscode-buddy/simulator/xflash.bin",
"-pflash", "${workspaceFolder}/build-vscode-buddy/simulator/eeprom_bank1.bin",
"-pflash", "${workspaceFolder}/build-vscode-buddy/simulator/eeprom_bank2.bin",
"-nodefaults",
"-chardev", "stdio,id=stm32_itm"
],
},
"windows": {
"serverArgs": [
"-machine", "prusa-mk404",
"-display", "sdl",
"-drive", "id=usbstick,file=fat:rw:${workspaceFolder}\\build-vscode-buddy\\simulator\\usbdir",
"-device", "usb-storage,drive=usbstick",
"-mtdblock", "${workspaceFolder}\\build-vscode-buddy\\simulator\\xflash.bin",
"-pflash", "${workspaceFolder}\\build-vscode-buddy\\simulator\\eeprom_bank1.bin",
"-pflash", "${workspaceFolder}\\build-vscode-buddy\\simulator\\eeprom_bank2.bin",
"-nodefaults",
"-chardev", "stdio,id=stm32_itm"
],
},
"linux": {
"serverArgs": [
"-machine", "prusa-mk404",
"-display", "gtk",
"-drive", "id=usbstick,file=fat:rw:${workspaceFolder}/build-vscode-buddy/simulator/usbdir",
"-device", "usb-storage,drive=usbstick",
"-mtdblock", "${workspaceFolder}/build-vscode-buddy/simulator/xflash.bin",
"-pflash", "${workspaceFolder}/build-vscode-buddy/simulator/eeprom_bank1.bin",
"-pflash", "${workspaceFolder}/build-vscode-buddy/simulator/eeprom_bank2.bin",
"-nodefaults",
"-chardev", "stdio,id=stm32_itm"
],
},
"preLaunchTask": "Prepare Simulator State Directory",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/build-vscode-buddy/firmware",
"request": "launch",
},
{
"name": "GDB (QEMU)",
"type": "gdb",
Expand All @@ -130,6 +280,23 @@
"cwd": "${workspaceRoot}",
"gdbpath": "${workspaceRoot}/.dependencies/gcc-arm-none-eabi-10.3.1/bin/arm-none-eabi-gdb",
"autorun": []
},
{
"name": "Unit-tests debug",
"type": "cppdbg",
"request": "launch",
"MIMode": "gdb",
"cwd": "${workspaceRoot}",
}
],
"compounds": [
{
"name": "XL - ALL",
"configurations": ["Launch Buddy","Launch Dwarf", "Launch ModularBed"],
"presentation": {
"group": "XL Puppies",
},
"preLaunchTask": ""
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Expand Up @@ -20,5 +20,8 @@
"cmake.cmakePath": "${workspaceFolder}/.dependencies/cmake-3.22.5/bin/cmake",
"cmake.generator": "Ninja",
"files.insertFinalNewline": true,
"files.associations": {
"xlocale": "cpp"
},
"task.allowAutomaticTasks": "on"
}
31 changes: 30 additions & 1 deletion .vscode/tasks.json
Expand Up @@ -21,6 +21,35 @@
"windows": {
"command": "python ${workspaceFolder}\\.vscode\\prepare_simulator_dir.py ${workspaceFolder}\\build-vscode-buddy ${workspaceFolder}\\build-vscode-buddy\\simulator"
}
}
},
{
"label": "Wait 1",
"type": "shell",
"command": "sleep 1",
"hide": true,
"windows": {
"command": "ping 127.0.0.1 -n 1 > $null"
}
},
{
"label": "Wait 2",
"type": "shell",
"command": "sleep 2",
"hide": true,
"windows": {
"command": "ping 127.0.0.1 -n 2 > $null"
}
},
{
"label": "Backup current ELF",
"type": "shell",
"command": "python3 utils/backup_elf.py",
"windows": {
"command": "python utils/backup_elf.py",
},
"presentation": {
"reveal": "silent",
}
},
]
}

3 comments on commit a255fa4

@kczyz-gmail
Copy link

@kczyz-gmail kczyz-gmail commented on a255fa4 Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I looks like this commit breaks hotend cooling fan functionality (hotend fan is not enabled during print) for Prusa MINI
Best regards,
Krzysztof

@kczyz-gmail
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved by modifying below line in ./include/marlin/Configuration_MINI_adv.h
#define E0_AUTO_FAN_PIN (73)

@dragomirecky
Copy link
Member

@dragomirecky dragomirecky commented on a255fa4 Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Krzysztof, thanks for the report! This version isn't considered stable for the MINI yet, so expect more issues to raise.
Nice job solving the issue though 🙂

Please sign in to comment.