Skip to content

Commit 2a5119c

Browse files
committed
Added .vscode folder to each of the Ravenscar examples of Microbit_V2
1 parent e4cf8a9 commit 2a5119c

File tree

140 files changed

+3028
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+3028
-259
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
# GNAT seems to use 3 space indents as standard
11+
[*.{adb,ads}]
12+
indent_size = 3

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
3+
updates:
4+
# Git submodules
5+
- package-ecosystem: gitsubmodule
6+
directory: /
7+
schedule:
8+
interval: daily
9+
time: "18:00"
10+
# Use Central European Time (GMT +01:00)
11+
timezone: "Europe/Oslo"

.github/workflows/ada.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Ada (GNAT)
2+
'on':
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: 'true'
17+
18+
- name: Setup GNAT ARM Toolchain
19+
run: |
20+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-14.2.0-1/gnat-arm-elf-linux64-x86_64-14.2.0-1.tar.gz
21+
tar xf gnat-arm-elf-linux64-x86_64-14.2.0-1.tar.gz
22+
echo "${PWD}/gnat-arm-elf-linux64-x86_64-14.2.0-1/bin" >> $GITHUB_PATH
23+
24+
wget -q https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-22.0.0-1/gprbuild-x86_64-linux-22.0.0-1.tar.gz
25+
tar xf gprbuild-x86_64-linux-22.0.0-1.tar.gz
26+
echo "${PWD}/gprbuild-x86_64-linux-22.0.0-1/bin" >> $GITHUB_PATH
27+
28+
- name: Build
29+
run: 'gprbuild -j0 -P Code/itrs.gpr Code/src/main.adb -cargs:ada -gnatef'
30+
31+
- name: Upload Artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: ITRS
35+
path: Code/obj/main

.github/workflows/main.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"AdaCore.ada",
4+
"EditorConfig.EditorConfig",
5+
"marus25.cortex-debug",
6+
"ms-vscode.cpptools",
7+
"ms-vscode.vscode-serial-monitor"
8+
]
9+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "cortex-debug",
6+
"cwd": "${workspaceFolder}",
7+
"preLaunchTask": "Build",
8+
"executable": "${workspaceFolder}/Code/obj/main",
9+
"name": "Debug (PyOCD)",
10+
"request": "launch",
11+
//"runToEntryPoint": "main", //(Uncomment if you want to break on start)
12+
"showDevDebugOutput": "vscode",
13+
"servertype": "pyocd",
14+
"targetId": "nrf52833"
15+
}
16+
]
17+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cortex-debug.armToolchainPrefix": "arm-eabi"
3+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "shell",
6+
"command": "pyocd",
7+
"args": [
8+
"load",
9+
"-t",
10+
"nrf52833",
11+
"--format",
12+
"elf",
13+
"obj/main"
14+
],
15+
"group": {
16+
"kind": "build",
17+
"isDefault": true
18+
},
19+
"label": "Build & Flash",
20+
"dependsOn":["Build"]
21+
},
22+
{
23+
"type": "ada",
24+
"command": "gprbuild",
25+
"args": [
26+
"${command:ada.gprProjectArgs}",
27+
"src/main.adb",
28+
"-cargs:ada",
29+
"-gnatef",
30+
//"-largs -Wl,-Map=map.txt" used in gnatstudio, needed here?
31+
],
32+
"problemMatcher": [
33+
"$ada"
34+
],
35+
"group": "build",
36+
"label": "Build"
37+
},
38+
{
39+
"type": "shell",
40+
"command": "pyocd",
41+
"args": [
42+
"load",
43+
"-t",
44+
"nrf52833",
45+
"--format",
46+
"elf",
47+
"obj/main"
48+
],
49+
"group": "build",
50+
"label": "Flash"
51+
},
52+
{
53+
"type": "shell",
54+
"command": "pyocd",
55+
"args": [
56+
"erase",
57+
"--mass",
58+
"-t",
59+
"nrf52833"
60+
],
61+
"group": "build",
62+
"label": "Erase"
63+
}
64+
]
65+
66+
}
Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
with "..\..\..\..\boards\MicroBit_v2\microbit_v2_full.gpr";
1+
with "..//..//..//..//boards//MicroBit_v2//microbit_v2_full.gpr";
22

33
project BLE_Beacon is
44

5-
for Runtime ("ada") use "ravenscar-full-nrf52833";
6-
for Target use "arm-eabi";
7-
for Main use ("main.adb");
8-
for Languages use ("Ada");
9-
for Source_Dirs use ("src");
5+
for Source_Dirs use ("src");
106
for Object_Dir use "obj";
11-
for Create_Missing_Dirs use "True";
7+
for Main use ("main.adb");
128

139
package Compiler is
14-
for Switches ("ada") use ("-g", "-O0");
10+
for Switches ("ada") use ("-gnat2022", "-gnateDPROFILING=false", "-g");
1511
end Compiler;
1612

1713
package Ide is
14+
for Connection_Tool use "pyocd";
1815
for Program_Host use ":1234";
1916
for Communication_Protocol use "remote";
20-
for Connection_Tool use "pyocd";
2117
end Ide;
2218

19+
for Target use "arm-eabi";
20+
for Runtime ("ada") use "embedded-nrf52833";
21+
22+
package Builder is
23+
for Switches ("ada") use ("-g");
24+
end Builder;
25+
26+
package Linker is
27+
for Switches ("ada") use ("-g", "-Wl,--print-memory-usage");
28+
end Linker;
29+
2330
end BLE_Beacon;
2431

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"AdaCore.ada",
4+
"EditorConfig.EditorConfig",
5+
"marus25.cortex-debug",
6+
"ms-vscode.cpptools",
7+
"ms-vscode.vscode-serial-monitor"
8+
]
9+
}

0 commit comments

Comments
 (0)