Skip to content

Commit

Permalink
Added first working build
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Mar 18, 2019
0 parents commit ed7de83
Show file tree
Hide file tree
Showing 36 changed files with 2,559 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

.app.db
.app
bin
obj
tags
.gdb_history
.gdb_out
.gdb_cmds
*~
.DS_Store
*.swp
*.swo
7 changes: 7 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Can't easily add license to rat-excludes file.
.rat-excludes

# Temporary user files.
.gdb_history
.gdb_out
tags
1 change: 1 addition & 0 deletions .vscode/.cortex-debug.peripherals.state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions .vscode/.cortex-debug.registers.state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
32 changes: 32 additions & 0 deletions .vscode/bookmarks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"path": "$ROOTPATH$/apps/my_sensor_app/pkg.yml",
"bookmarks": [
{
"line": 26,
"column": 5,
"label": ""
}
]
},
{
"path": "$ROOTPATH$/targets/bluepill_my_sensor/syscfg.yml",
"bookmarks": [
{
"line": 0,
"column": 3,
"label": ""
}
]
},
{
"path": "$ROOTPATH$/repos/apache-mynewt-core/hw/sensor/creator/src/sensor_creator.c",
"bookmarks": [
{
"line": 199,
"column": 37,
"label": ""
}
]
}
]
53 changes: 53 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
// VSCode Debugger Config for Cortex Debug Extension and for QEMU Blue Pill Emulator.
// Manually overwrite launch.json by this file.
"version": "0.2.0",
"configurations": [
{
// Cortex Debug: https://marcelball.ca/projects/cortex-debug/cortex-debug-launch-configurations/
"name": "Cortex Debug (OpenOCD)",
"type": "cortex-debug",
"request": "launch",
"servertype": "openocd",
"cwd": "${workspaceRoot}",
"executable": "bin/targets/bluepill_my_sensor/app/apps/my_sensor_app/my_sensor_app.elf",
// "executable": "bin/targets/bluepill_boot/app/apps/boot/boot.elf",
"device": "STM32F103C8",
"configFiles": [
"interface/stlink-v2.cfg",
"target/stm32f1x.cfg",
"scripts/debug.ocd"
],
"preLaunchCommands": [
"set remotetimeout 60",

// This indicates that an unrecognized breakpoint location should automatically result in a pending breakpoint being created.
"set breakpoint pending on",

// Display the instruction when hitting breakpoint.
"display/i $pc",

// "symbol-file bin/targets/bluepill_boot/app/apps/boot/boot.elf",
// "symbol-file bin/targets/bluepill_my_sensor/app/apps/my_sensor_app/my_sensor_app.elf",

],
"postLaunchCommands": [
"stepi", // Must step before setting PC.
"set $pc = Reset_Handler", // Prepare to jump to the application's Reset Handler.
"stepi", // Execute the Reset Handler.
"break main", // Break at main().
"step",
// "monitor sleep 1000",
// "continue", // Run until main().
],
"preAttachCommands": [
],
"postAttachCommands": [
],
"preRestartCommands": [
],
"postRestartCommands": [
],
}
]
}
106 changes: 106 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "1️⃣ Build bluepill_boot",
"type": "shell",
"command": "newt",
"args": [
"build",
"-p",
"-v",
"bluepill_boot"
],
"problemMatcher": [
"$gcc"
]
},
{
"label": "2️⃣ Build bluepill_my_sensor",
"type": "shell",
"command": "newt",
"args": [
"build",
"-p",
"-v",
"bluepill_my_sensor"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "3️⃣ Image bluepill_my_sensor",
"type": "shell",
"command": "newt",
"args": [
"create-image",
"-v",
"bluepill_my_sensor",
"1.0.0"
],
"problemMatcher": [
"$gcc"
]
},
{
"label": "4️⃣ Load bluepill_boot",
"type": "shell",
"command": "newt",
"args": [
"load",
"-v",
"bluepill_boot"
],
"problemMatcher": [
"$gcc"
]
},
{
"label": "5️⃣ Load bluepill_my_sensor",
"type": "shell",
"command": "newt",
"args": [
"load",
"-v",
"bluepill_my_sensor"
],
"problemMatcher": [
"$gcc"
]
},
{
"label": "💣 Debug bluepill_my_sensor",
"type": "shell",
"command": "newt",
"args": [
"debug",
"bluepill_my_sensor",
// "-n",
"-v"
],
"problemMatcher": [
"$gcc"
]
},
{
"label": "🗑 Clean",
"type": "shell",
"command": "newt",
"args": [
"clean",
"-v",
"all"
],
"problemMatcher": [
"$gcc"
]
}
]
}
Loading

0 comments on commit ed7de83

Please sign in to comment.