Skip to content

Commit

Permalink
Merge pull request #12 from gentijo/micropython
Browse files Browse the repository at this point in the history
Micropython
  • Loading branch information
gentijo authored Feb 25, 2023
2 parents 2e45870 + 6c53fd0 commit 25e5380
Show file tree
Hide file tree
Showing 7 changed files with 419 additions and 92 deletions.
17 changes: 17 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "gnu++14",
"intelliSenseMode": "linux-gcc-x64",
"configurationProvider": "ms-vscode.makefile-tools"
}
],
"version": 4
}
67 changes: 57 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,66 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"name": "ESP-IDF Debug: Launch",
"type": "espidf",
"request": "launch",
"executable": "${workspaceRoot}/microros_ws/assemblies/mptest/build/mptest.elf",
"target": ":3333",
"remote": true,
"cwd": "${workspaceRoot}/microros_ws/assemblies/mptest",
},
{
"type": "gdb",
"request": "launch",
"name": "Launch Program",
"target": "${workspaceFolder}/microros_ws/assemblies/mptest/build/mptest.elf",
"cwd": "${workspaceFolder}/microros_ws/assemblies/mptest",
"gdbpath": "/opt/esp/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb",
"autorun":
[
"target remote :3333"
]
},
{
"name": "OpenOCD Debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/microros_ws/assemblies/esp32-range-buggy/build/range_buggy.elf",
"cwd": "${workspaceFolder}/microros_ws/assemblies/esp32-range-buggy/",
"gdbpath": "/opt/esp/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb",
"miDebuggerPath": "/opt/esp/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gdb",
"program": "${workspaceFolder}/microros_ws/assemblies/mptest/build/mptest.elf",

"setupCommands": [
{ "text": "target remote 127.0.0.1:3333"},
{ "text": "set remote hardware-watchpoint-limit 2"},
{ "text": "monitor reset halt"},
{ "text": "flushregs"}
]
{
"description": "enable pretty printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"text": "file '${workspaceFolder}/microros_ws/assemblies/mptest/build/mptest.elf'"
},
{
"text": "target remote :3333"
},
{
"text": "set remote hardware-watchpoint-limit 2",
},
{
"text": "flushregs"
},
{
"text": "monitor reset halt"
},
{
"text": "thb app_main"
}
],
"cwd": "${workspaceFolder}/microros_ws/assemblies/mptest",
"externalConsole": false
}
],
"version": "2.0.0"

]
}
77 changes: 76 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
{
"cmake.configureOnOpen": true
"files.associations": {
"uros_network_interfaces.h": "c",
"microbot.h": "c",
"rclc.h": "c",
"ros_subscriptionspec.h": "c",
"string": "cpp",
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"map": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"set": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeinfo": "cpp",
"ringbuf.h": "c",
"objstr.h": "c",
"mpversion.h": "c",
"moduplatform.h": "c",
"mpconfig.h": "c",
"mphal.h": "c",
"mphalport.h": "c"
},
"cmake.configureOnOpen": false,
"cmake.sourceDirectory": "${workspaceFolder}/assemblies/esp32-joystick"
}
190 changes: 116 additions & 74 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,118 @@
// ======================== tasks.json ========================
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [{
"label": "Configure",
"type": "shell",
"command": "source /opt/esp/idf/export.sh && idf.py menuconfig",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py menuconfig" }
},
{
"label": "Build",
"group": "build",
"type": "shell",
"command": "idf.py build",
},
{
"label": "Get size",
"group": "build",
"type": "shell",
"command": "idf.py size",
},
{
"label": "Clean",
"group": "build",
"type": "shell",
"command": "source /opt/esp/idf/export.sh && idf.py clean",
},
{
"label": "Clean (full)",
"group": "build",
"type": "shell",
"command": "source /opt/esp/idf/export.sh && idf.py fullclean",
},
{
"label": "Flash",
"group": "test",
"type": "shell",
"command": "source /opt/esp/idf/export.sh && idf.py fullclean",
},
{
"label": "Erase flash",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py erase_flash",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py erase_flash" }
},
{
"label": "Monitor",
"group": "test",
"type": "shell",
"command": "idf.py monitor",
"isBackground": false,
//"dependsOn": ["Flash"]
},
{
"label": "OpenOCD",
"type": "shell",
"command": ". /opt/esp/idf/export.sh && openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg",
"isBackground": true,
"problemMatcher": {
"pattern": {
"regexp": "^(Info |Warn ):(.*)$", // Ignore errors
"severity": 1,
"message": 2
},
"background": {
"activeOnStart": false,
"beginsPattern": ".",
"endsPattern": "Info : Listening on port \\d+ for gdb connections"
}
}
}
]
}
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [{
"label": "Configure",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py menuconfig",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py menuconfig" }
},
{
"label": "Build",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py build",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py build" },
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceFolder}/build"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "Get size",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py size",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py size" },
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceFolder}/build"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "Clean",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py clean",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py clean" }
},
{
"label": "Clean (full)",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py fullclean",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py fullclean" }
},
{
"label": "Flash",
"group": "test",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py flash",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py flash" },
"problemMatcher": {
"owner": "cpp",
"fileLocation": ["relative", "${workspaceFolder}/build"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"label": "Erase flash",
"group": "build",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py erase_flash",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py erase_flash" }
},
{
"label": "Monitor",
"group": "test",
"type": "shell",
"command": ". $HOME/esp/esp-idf/export.sh && idf.py monitor",
"windows": { "command": "%userprofile%\\esp\\esp-idf\\export.bat && idf.py monitor" },
"isBackground": true,
//"dependsOn": ["Flash"]
},
{
"label": "OpenOCD",
"type": "shell",
"command": ". /opt/esp/idf/export.sh && openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover-kit-1.8v.cfg",
"isBackground": true,
"problemMatcher": {
"pattern": {
"regexp": "^(Info |Warn ):(.*)$", // Ignore errors
"severity": 1,
"message": 2
},
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "Info : Listening on port \\d+ for gdb connections"
}
}
}
]
}
10 changes: 4 additions & 6 deletions microros_ws/.gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
micro_ros_dev
micro_ros_src
esp32_toolchain.*
*.a
*.out
./include

archive
Archive/**

build
.images
*~
Archive/**
libmicroros.sym

libs/microros

5 changes: 4 additions & 1 deletion microros_ws/extra_packages/microros/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
**/
esp32_toolchain.cmake
include/**
libmicroros.a

Loading

0 comments on commit 25e5380

Please sign in to comment.