Skip to content
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

Suggestion: Safer codal.json for users & create codal.dev.json for development #65

Merged
merged 2 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ You will find a simple main.cpp in the `source` folder which you can edit. CODAL

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

## Developer codal.json

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.
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`).

# Debugging
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:

Expand Down
6 changes: 2 additions & 4 deletions codal.ble.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"name": "codal-microbit-v2",
"url": "https://github.com/lancaster-university/codal-microbit-v2",
"branch": "master",
"type": "git",
"test_ignore": true,
"dev": true
"type": "git"
} ,
"config":{
"DEVICE_BLE": 1,
Expand All @@ -14,7 +12,7 @@
"MICROBIT_BLE_DFU_SERVICE": 1,
"MICROBIT_BLE_DEVICE_INFORMATION_SERVICE": 1,
"MICROBIT_BLE_EVENT_SERVICE" : 1,
"MICROBIT_BLE_PARTIAL_FLASHING" : 0,
"MICROBIT_BLE_PARTIAL_FLASHING" : 1,
"MICROBIT_BLE_SECURITY_LEVEL": "SECURITY_MODE_ENCRYPTION_NO_MITM"
}
}
18 changes: 18 additions & 0 deletions codal.dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"target": {
"name": "codal-microbit-v2",
"url": "https://github.com/lancaster-university/codal-microbit-v2",
"branch": "master",
"type": "git",
"dev": true
},
"config":{
"DEVICE_DMESG": 1,
microbit-carlos marked this conversation as resolved.
Show resolved Hide resolved
"DEVICE_DMESG_BUFFER_SIZE": 1024,
"DMESG_SERIAL_DEBUG": 1,
"CODAL_DEBUG": 1,
"MICROBIT_BLE_ENABLED" : 0,
"MICROBIT_BLE_PAIRING_MODE": 0,
"CONFIG_MICROBIT_ERASE_USER_DATA_ON_REFLASH": 1
}
}
7 changes: 1 addition & 6 deletions codal.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
"name": "codal-microbit-v2",
"url": "https://github.com/lancaster-university/codal-microbit-v2",
"branch": "master",
"type": "git",
"test_ignore": true,
"dev": true
"type": "git"
},
"config":{
"DEVICE_DMESG": 0,
"DMESG_SERIAL_DEBUG": 0,
"CODAL_DEBUG": 0,
"MICROBIT_BLE_ENABLED" : 0,
"MICROBIT_BLE_PAIRING_MODE": 0,
"CONFIG_MICROBIT_ERASE_USER_DATA_ON_REFLASH": 1
Expand Down