-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renode toolset #339
Renode toolset #339
Changes from 24 commits
34e3636
6dd90b6
8ad2c47
27698c4
71d7c76
634a0b0
688ee51
46ae401
7377bd2
7195e0c
3cc060b
001c5b9
20bb31f
009a9a0
e32b3d4
f591612
76444ac
ec66f59
99383a9
3214028
68590d1
ac9c213
3fdf843
402615c
52db71f
087f2a5
1ed186c
8f6b598
5133574
4fea6a3
8790919
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,299 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "../" | ||
}, | ||
{ | ||
"path": "../../Embedded-Sharepoint" | ||
}, | ||
{ | ||
"path": "../../BPS" | ||
} | ||
], | ||
"settings": { | ||
"liveServer.settings.multiRootWorkspaceName": "renode", | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "bash", | ||
"icon": "terminal-bash", | ||
"args": ["-i"] | ||
}, | ||
}, | ||
}, | ||
"tasks": { | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Build Controls", | ||
"type": "process", | ||
"command": "make", | ||
"args": [ | ||
"${input:target}", | ||
"TEST=${input:test}", | ||
"DEBUG=${input:debug}" | ||
], | ||
"presentation": { | ||
"echo": false, | ||
"reveal": "always", | ||
"panel": "dedicated", | ||
"focus": true, | ||
"clear": true, | ||
"group": "build" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Start Renode", | ||
"type": "shell", | ||
"command": "${workspaceFolder:Controls}/Scripts/start_renode.sh", | ||
"presentation": { | ||
"echo": false, | ||
"reveal": "always", | ||
"panel": "dedicated", | ||
"focus": true, | ||
"clear": true, | ||
"group": "debug" | ||
}, | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "custom", | ||
"pattern": { | ||
"regexp": ".", | ||
"file": 1, | ||
"location": 2, | ||
"message": 3 | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "^.*", | ||
"endsPattern": "^\"Renode Simulator is now active\".*" | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "Open UART2 Telnet", | ||
"type": "shell", | ||
"command": "echo \"Controls Leaderboard UART2\"; while ! nc -z localhost ${RENODE_UART2_TELNET}; do sleep 2; echo .; done; echo Connected && nc localhost ${RENODE_UART2_TELNET}", | ||
"presentation": { | ||
"echo": false, | ||
"reveal": "always", | ||
"panel": "dedicated", | ||
"focus": true, | ||
"group": "debug" | ||
}, | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "custom", | ||
"pattern": { | ||
"regexp": ".", | ||
"file": 1, | ||
"location": 2, | ||
"message": 3 | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": ".", | ||
"endsPattern": "." | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "Start OpenOCD debugger", | ||
"type": "shell", | ||
"command": "openocd", | ||
"presentation": { | ||
"echo": false, | ||
"reveal": "always", | ||
"panel": "dedicated", | ||
"focus": true, | ||
"group": "debug" | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Open Terminal GDB", | ||
"type": "shell", | ||
"command": "arm-none-eabi-gdb ${workspaceFolder:Controls}/Objects/controls-leader.elf", | ||
"presentation": { | ||
"echo": false, | ||
"reveal": "always", | ||
"panel": "dedicated", | ||
"focus": true, | ||
"group": "debug" | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Start Renode Tools", | ||
"dependsOn": [ | ||
"Start Renode", | ||
"Open UART2 Telnet" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Start Renode Tools & Terminal GDB", | ||
"dependsOn": [ | ||
"Start Renode Tools", | ||
"Open Terminal GDB" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Start Hardware Tools", | ||
"dependsOn": [ | ||
"Start OpenOCD debugger", | ||
"Open Terminal GDB" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Build Controls & Start OpenOCD", | ||
"dependsOn": [ | ||
"Build Controls", | ||
"Start OpenOCD debugger" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Build Controls & Start Hardware Tools", | ||
"dependsOn": [ | ||
"Build Controls", | ||
"Start Hardware Tools" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Build Controls & Start Renode Tools", | ||
"dependsOn": [ | ||
"Build Controls", | ||
"Start Renode Tools" | ||
], | ||
"dependsOrder": "sequence", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Kill Processes", | ||
"type": "process", | ||
"command": [ | ||
"${command:workbench.action.tasks.terminate}", | ||
"${command:workbench.action.acceptSelectedQuickOpenItem}" | ||
], | ||
"problemMatcher": [] | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "target", | ||
"type": "pickString", | ||
"description": "Target to compile.", | ||
"options": [ | ||
"simulator", | ||
"leader", | ||
"flash", | ||
"clean" | ||
] | ||
}, | ||
{ | ||
"id": "test", | ||
"type": "promptString", | ||
"description": "Test file to compile and run.", | ||
"default": "" | ||
}, | ||
{ | ||
"id": "debug", | ||
"type": "pickString", | ||
"description": "Debug ", | ||
"options": [ | ||
"1", | ||
"0" | ||
], | ||
"default": "1" | ||
} | ||
], | ||
}, | ||
"launch": { | ||
"version": "2.0.0", | ||
"configurations": [ | ||
{ | ||
"name": "Renode Build & Debug Controls", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"cwd": "${workspaceFolder:Controls}", | ||
"program": "${workspaceFolder:Controls}/Objects/controls-leader.elf", | ||
"preLaunchTask": "Build Controls & Start Renode Tools", | ||
"postDebugTask": "Kill Processes", | ||
|
||
"stopAtEntry": true, | ||
"stopAtConnect": true, | ||
|
||
"customLaunchSetupCommands": [ | ||
{"text": "target extended-remote :3333", "ignoreFailures": false}, | ||
{"text": "file Objects/controls-leader.elf"} | ||
], | ||
|
||
"MIMode": "gdb", | ||
"miDebuggerPath": "arm-none-eabi-gdb", | ||
"miDebuggerServerAddress": "localhost:3333", | ||
"miDebuggerArgs": "--cd=${workspaceFolder:Controls}", | ||
"hardwareBreakpoints": {"require": true}, | ||
|
||
"targetArchitecture": "arm64", | ||
"logging": { | ||
"engineLogging": false, | ||
"traceResponse": false | ||
} | ||
}, | ||
{ | ||
"name": "Hardware Build & Debug Controls", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"cwd": "${workspaceFolder:Controls}", | ||
"program": "${workspaceFolder:Controls}/Objects/controls-leader.elf", | ||
"preLaunchTask": "Build Controls & Start OpenOCD", | ||
"postDebugTask": "Kill Processes", | ||
|
||
"stopAtEntry": true, | ||
"stopAtConnect": true, | ||
|
||
"customLaunchSetupCommands": [ | ||
{"text": "target extended-remote :3333", "ignoreFailures": false}, | ||
{"text": "file Objects/controls-leader.elf"} | ||
], | ||
|
||
"MIMode": "gdb", | ||
"miDebuggerPath": "arm-none-eabi-gdb", | ||
"miDebuggerServerAddress": "localhost:3333", | ||
"miDebuggerArgs": "--cd=${workspaceFolder:Controls}", | ||
"hardwareBreakpoints": {"require": true}, | ||
|
||
"targetArchitecture": "arm64", | ||
"logging": { | ||
"engineLogging": false, | ||
"traceResponse": false | ||
} | ||
} | ||
|
||
] | ||
}, | ||
"extensions": { | ||
"recommendations": [ | ||
"ms-vscode.cpptools-extension-pack", // For Controls C code | ||
"GitHub.vscode-pull-request-github", // For reviewing pull requests directly from VSCode | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TAKE THIS OUT There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? |
||
"xaver.clang-format", // For auto-formatting code on VSCode | ||
"eamodio.gitlens", // For better github stuff | ||
"ritwickdey.liveserver", // For quick viewing test reports | ||
] | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,11 @@ TARGET = controls-leader | |
# building variables | ||
###################################### | ||
# optimization | ||
OPT = -Og -g | ||
ifeq ($(DEBUG), 0) | ||
OPT = -O3 | ||
else | ||
OPT = -Og | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ADD -G |
||
endif | ||
|
||
####################################### | ||
# paths | ||
|
@@ -32,15 +36,10 @@ $(wildcard ../../RTOS/uCOS-III-STM32F4/uC-CPU/*.c) \ | |
$(wildcard ../../RTOS/uCOS-III-STM32F4/uC-CPU/ARM-Cortex-M4/GNU/*.c) \ | ||
$(wildcard ../../RTOS/uCOS-III-STM32F4/uC-LIB/*.c) | ||
|
||
ifneq ($(TEST), none) | ||
TEST_FILE := $(TEST).c | ||
# This line adds everything in Apps/Src/*.c except for main.c | ||
# This line adds everything in Apps/Src/*.c except for main.c, then adds the test file | ||
C_SOURCES += \ | ||
$(filter-out ../../Apps/Src/main.c, $(wildcard ../../Apps/Src/*.c)) \ | ||
$(wildcard ../../$(TEST_FILE)) | ||
else | ||
C_SOURCES += $(wildcard ../../Apps/Src/*.c) | ||
endif | ||
../../$(TEST) | ||
IshDeshpa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# ASM sources | ||
ASM_SOURCES = \ | ||
|
@@ -111,8 +110,8 @@ C_INCLUDES = \ | |
-I../../RTOS/uCOS-III-STM32F4/uCOS-III/Ports/ARM-Cortex-M4/Generic/GNU/ \ | ||
-I../../RTOS/uCOS-III-STM32F4/uC-CPU/ \ | ||
-I../../RTOS/uCOS-III-STM32F4/uC-CPU/ARM-Cortex-M4/GNU/ \ | ||
-I../../RTOS/uCOS-III-STM32F4/uC-LIB/ | ||
|
||
-I../../RTOS/uCOS-III-STM32F4/uC-LIB/ \ | ||
-I../../Tests/Inc/ \ | ||
IshDeshpa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# compile gcc flags | ||
ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TAKE THIS OUT!!!