simulator usability (#2794)

* simulator

* simulator is debuggable

* s

* format
This commit is contained in:
Matthew Kennedy 2021-06-03 22:34:49 -07:00 committed by GitHub
parent 7cef936a6d
commit f3ff40724a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 173 additions and 139 deletions

112
.vscode/launch.json vendored
View File

@ -24,6 +24,24 @@
}
]
},
{
"name": "Debug simulator (gdb)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/simulator/build/rusefi_simulator",
"stopAtEntry": false,
"cwd": "${workspaceFolder}/simulator/",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Debug Unit Tests (lldb)",
"type": "lldb",
@ -33,56 +51,56 @@
"cwd": "${workspaceFolder}/unit_tests/build/",
},
{
"name": "Debug F40x",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}/firmware",
"executable": "${workspaceRoot}/firmware/build/rusefi.elf",
"device": "STM32F407V",
"v1": false,
"svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32F405.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink.cfg", "target/stm32f4x.cfg"],
"runToMain": true
"name": "Debug F40x",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}/firmware",
"executable": "${workspaceRoot}/firmware/build/rusefi.elf",
"device": "STM32F407V",
"v1": false,
"svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32F405.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink.cfg", "target/stm32f4x.cfg"],
"runToMain": true
},
{
"name": "Debug F42x",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}/firmware",
"executable": "${workspaceRoot}/firmware/build/rusefi.elf",
"device": "STM32F429Z",
"v1": false,
"svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32F427.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink.cfg", "target/stm32f4x.cfg"],
"runToMain": true
"name": "Debug F42x",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}/firmware",
"executable": "${workspaceRoot}/firmware/build/rusefi.elf",
"device": "STM32F429Z",
"v1": false,
"svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32F427.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink.cfg", "target/stm32f4x.cfg"],
"runToMain": true
},
{
"name": "Debug F7x6",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}/firmware",
"executable": "${workspaceRoot}/firmware/build/rusefi.elf",
"device": "STM32F767V",
"v1": false,
"svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32F7x7.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink.cfg", "target/stm32f7x.cfg"],
"runToMain": true
},
{
"name": "Debug H743",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}/firmware",
"executable": "${workspaceRoot}/firmware/build/rusefi.elf",
"device": "STM32H743V",
"v1": false,
"svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32H743x.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink.cfg", "target/stm32h7x.cfg"],
"runToMain": true
}
"name": "Debug F7x6",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}/firmware",
"executable": "${workspaceRoot}/firmware/build/rusefi.elf",
"device": "STM32F767V",
"v1": false,
"svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32F7x7.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink.cfg", "target/stm32f7x.cfg"],
"runToMain": true
},
{
"name": "Debug H743",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceFolder}/firmware",
"executable": "${workspaceRoot}/firmware/build/rusefi.elf",
"device": "STM32H743V",
"v1": false,
"svdFile": "${workspaceRoot}/firmware/ext/cmsis-svd/data/STMicro/STM32H743x.svd",
"servertype": "openocd",
"configFiles": ["interface/stlink.cfg", "target/stm32h7x.cfg"],
"runToMain": true
}
]
}

198
.vscode/tasks.json vendored
View File

@ -3,133 +3,149 @@
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Firmware (Frankenso/default)",
"type": "shell",
"command": "make -j12",
{
"label": "Build Firmware (Frankenso/default)",
"type": "shell",
"command": "make -j12",
"windows": {
"command": "wsl bash -lc 'make -j12'"
},
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Firmware (Proteus F4)",
"type": "shell",
"command": "make -j12 PROJECT_BOARD=proteus",
"windows": {
"label": "Build Firmware (Proteus F4)",
"type": "shell",
"command": "make -j12 PROJECT_BOARD=proteus",
"windows": {
"command": "wsl bash -lc 'make -j12 PROJECT_BOARD=proteus'"
},
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Firmware (Proteus F7)",
"type": "shell",
"command": "make -j16 PROJECT_BOARD=proteus PROJECT_CPU=ARCH_STM32F7",
"label": "Build Firmware (Proteus F7)",
"type": "shell",
"command": "make -j16 PROJECT_BOARD=proteus PROJECT_CPU=ARCH_STM32F7",
"windows": {
"command": "wsl bash -lc 'make -j12 PROJECT_BOARD=proteus PROJECT_CPU=ARCH_STM32F7'"
},
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Firmware (Proteus H7) EXPERIMENTAL",
"type": "shell",
"command": "make -j16 PROJECT_BOARD=proteus PROJECT_CPU=ARCH_STM32H7",
"label": "Build Firmware (Proteus H7) EXPERIMENTAL",
"type": "shell",
"command": "make -j16 PROJECT_BOARD=proteus PROJECT_CPU=ARCH_STM32H7",
"windows": {
"command": "wsl bash -lc 'make -j12 PROJECT_BOARD=proteus PROJECT_CPU=ARCH_STM32H7'"
},
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Firmware (hellen72)",
"type": "shell",
"command": "make -j16 PROJECT_BOARD=hellen/hellen72",
"label": "Build Firmware (hellen72)",
"type": "shell",
"command": "make -j16 PROJECT_BOARD=hellen/hellen72",
"windows": {
"command": "wsl bash -lc 'make -j12 PROJECT_BOARD=hellen/hellen72'"
},
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Firmware (microRusEfi F4)",
"type": "shell",
"command": "make -j12 PROJECT_BOARD=microrusefi",
"label": "Build Firmware (microRusEfi F4)",
"type": "shell",
"command": "make -j12 PROJECT_BOARD=microrusefi",
"windows": {
"command": "wsl bash -lc 'make -j12 PROJECT_BOARD=microrusefi'"
},
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Firmware (microRusEfi F7)",
"type": "shell",
"command": "make -j12 PROJECT_BOARD=microrusefi PROJECT_CPU=ARCH_STM32F7",
"label": "Build Firmware (microRusEfi F7)",
"type": "shell",
"command": "make -j12 PROJECT_BOARD=microrusefi PROJECT_CPU=ARCH_STM32F7",
"windows": {
"command": "wsl bash -lc 'make -j12 PROJECT_BOARD=microrusefi PROJECT_CPU=ARCH_STM32F7'"
},
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
"options": {
"cwd": "${workspaceRoot}/firmware"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Unit Tests",
"type": "shell",
"command": "make -j12",
"label": "Build Unit Tests",
"type": "shell",
"command": "make -j12",
"windows": {
"command": "wsl make -j12"
},
"options": {
"cwd": "${workspaceRoot}/unit_tests"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
"options": {
"cwd": "${workspaceRoot}/unit_tests"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build Simulator",
"type": "shell",
"command": "make -j12",
"windows": {
"command": "wsl make -j12"
},
"options": {
"cwd": "${workspaceRoot}/simulator"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

View File

@ -34,7 +34,7 @@ ifeq ($(USE_OPT),)
# this config producec a smaller binary file
# 7.3 compiler would want -Wno-error=implicit-fallthrough while 6.4 does not know about it
# see https://github.com/rusefi/rusefi/issues/517
USE_OPT = -Wall -O2 -Wno-error=implicit-fallthrough -Wno-error=write-strings -Wno-error=strict-aliasing
USE_OPT = -Wall -Og -g -Wno-error=implicit-fallthrough -Wno-error=write-strings -Wno-error=strict-aliasing
ifeq ($(OS),Windows_NT)
else