Skip to content

Commit 6e03c78

Browse files
Safer default codal.json for users & create codal.dev.json for development (#65)
1 parent c6a39e8 commit 6e03c78

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ You will find a simple main.cpp in the `source` folder which you can edit. CODAL
5252

5353
The `samples` folder contains a number of simple sample programs that utilise you may find useful.
5454

55+
## Developer codal.json
56+
57+
There is an example `coda.dev.json` file which enables "developer builds" (clones dependencies from the latest commits, instead of the commits locked in the `codal-microbit-v2` tag), and adds extra CODAL flags that enable debug data to be printed to serial.
58+
To use it, simply copy the additional json entries into your `codal.json` file, or you can replace the file completely (`mv coda.dev.json codal.json`).
59+
5560
# Debugging
5661
If you are using Visual Studio Code, there is a working debugging environment already set up for you, allowing you to set breakpoints and observe the micro:bit's memory. To get it working, follow these steps:
5762

codal.ble.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"name": "codal-microbit-v2",
44
"url": "https://github.com/lancaster-university/codal-microbit-v2",
55
"branch": "master",
6-
"type": "git",
7-
"test_ignore": true,
8-
"dev": true
6+
"type": "git"
97
} ,
108
"config":{
119
"DEVICE_BLE": 1,
@@ -14,7 +12,7 @@
1412
"MICROBIT_BLE_DFU_SERVICE": 1,
1513
"MICROBIT_BLE_DEVICE_INFORMATION_SERVICE": 1,
1614
"MICROBIT_BLE_EVENT_SERVICE" : 1,
17-
"MICROBIT_BLE_PARTIAL_FLASHING" : 0,
15+
"MICROBIT_BLE_PARTIAL_FLASHING" : 1,
1816
"MICROBIT_BLE_SECURITY_LEVEL": "SECURITY_MODE_ENCRYPTION_NO_MITM"
1917
}
2018
}

codal.dev.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"target": {
3+
"name": "codal-microbit-v2",
4+
"url": "https://github.com/lancaster-university/codal-microbit-v2",
5+
"branch": "master",
6+
"type": "git",
7+
"dev": true
8+
},
9+
"config":{
10+
"DEVICE_DMESG": 1,
11+
"DEVICE_DMESG_BUFFER_SIZE": 1024,
12+
"DMESG_SERIAL_DEBUG": 1,
13+
"CODAL_DEBUG": 1,
14+
"MICROBIT_BLE_ENABLED" : 0,
15+
"MICROBIT_BLE_PAIRING_MODE": 0,
16+
"CONFIG_MICROBIT_ERASE_USER_DATA_ON_REFLASH": 1
17+
}
18+
}

codal.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@
33
"name": "codal-microbit-v2",
44
"url": "https://github.com/lancaster-university/codal-microbit-v2",
55
"branch": "master",
6-
"type": "git",
7-
"test_ignore": true,
8-
"dev": true
6+
"type": "git"
97
},
108
"config":{
11-
"DEVICE_DMESG": 0,
12-
"DMESG_SERIAL_DEBUG": 0,
13-
"CODAL_DEBUG": 0,
149
"MICROBIT_BLE_ENABLED" : 0,
1510
"MICROBIT_BLE_PAIRING_MODE": 0,
1611
"CONFIG_MICROBIT_ERASE_USER_DATA_ON_REFLASH": 1

0 commit comments

Comments
 (0)