Skip to content

Commit 1255534

Browse files
committed
Merge remote-tracking branch 'upstream/master' into microbit_features
# Conflicts: # records/tools/version.yaml Resolved using DAPLink version 256 from master
2 parents f3d9350 + 0052c4b commit 1255534

29 files changed

+674
-143
lines changed

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ Porting DAPLink to new systems:
2424
* [Adding a new target device](PORT_TARGET_FAMILY.md)
2525
* [Adding a new HIC](PORT_HIC.md)
2626

27+
### Troubleshooting
28+
29+
* [micro:bit maintenence mode](TROUBLESHOOTING.md)
30+
2731

docs/TROUBLESHOOTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Troubleshooting DAPLink
2+
3+
## Maintenence mode on micro:bit (KL26Z)
4+
5+
If you have a BBC micro:bit, or other Mbed hardware, and it is connecting as a drive called MAINTENANCE instead of MICROBIT, then you are in the maintenance mode provided for updating the DAPLink software (see below).
6+
7+
The way you access maintenance mode is by pluging in your board to your computer's USB port while holding down the reset button. If you are in maintenance mode by mistake, this might be how it happened.
8+
9+
![Microbit button press](images/daplink_pressed.0ff1832a4c87.png)
10+
11+
To leave maintenance mode, unplug the board from USB, make sure the Reset button is not pressed, and plug the board back in.
12+
13+
![Microbit unplug](images/daplink_unpressed.9fa419e5fc93.png)
14+
15+
The board should now show up with the correct name (for example, MICROBIT). If this fails to work, please follow the [firmware update steps](https://microbit.org/get-started/user-guide/firmware/) outlined on the micro:bit website.
27.5 KB
Loading
26.2 KB
Loading

projects.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ projects:
178178
- *module_if
179179
- *module_hic_kl26z
180180
- records/board/nina_b1.yaml
181+
kl26z_artemis_dk_if:
182+
- *module_if
183+
- *module_hic_kl26z
184+
- records/board/artemis_dk.yaml
181185
k20dx_frdmk20dx_if:
182186
- *module_if
183187
- *module_hic_k20dx
@@ -298,6 +302,10 @@ projects:
298302
- *module_if
299303
- *module_hic_k20dx
300304
- records/board/ep_agora.yaml
305+
k20dx_ep_kairos_if:
306+
- *module_if
307+
- *module_hic_k20dx
308+
- records/board/ep_kairos.yaml
301309
k26f_frdmk32w042_if:
302310
- *module_if
303311
- *module_hic_k26f

records/board/artemis_dk.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
common:
2+
macros:
3+
- IO_CONFIG_OVERRIDE
4+
- HID_LED_DEF=GPIO_LED_ON
5+
- CDC_LED_DEF=GPIO_LED_ON
6+
- MSC_LED_DEF=GPIO_LED_ON
7+
- USB_PROD_STR="SparkFun Artemis Dev Kit CMSIS-DAP"
8+
includes:
9+
- source/board/override_mkl26z_reset
10+
sources:
11+
board:
12+
- source/board/artemis_dk.c
13+
family:
14+
- source/family/ambiq/ama3b1kk/target.c
15+
- source/family/ambiq/ama3b1kk/target_reset.c

records/board/ep_kairos.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
common:
2+
sources:
3+
board:
4+
- source/board/ep_kairos.c
5+
family:
6+
- source/family/nxp/lpc55S6X/target.c
7+
- source/family/nxp/lpc55S6X/target_reset.c

records/tools/version.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
common:
22
macros:
3-
- DAPLINK_VERSION=255
3+
- DAPLINK_VERSION=256

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
project_generator==0.9.13
1+
project_generator==0.10.*
22
mbed-ls==1.6.2
33
pyserial
4-
pyOCD==0.16.0
4+
pyOCD==0.28.*
55
requests
66
intelhex
77
six

source/board/artemis_dk.c

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* @file microbit.c
3+
* @brief board ID for the BBC Microbit board
4+
*
5+
* DAPLink Interface Firmware
6+
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
7+
* SPDX-License-Identifier: Apache-2.0
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
10+
* not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*/
21+
#include "fsl_device_registers.h"
22+
#include "IO_Config.h"
23+
#include "DAP.h"
24+
#include "target_family.h"
25+
#include "target_board.h"
26+
27+
const char *const board_id_artemis_dk_v10 = "A127";
28+
29+
typedef enum
30+
{
31+
BOARD_VERSION_v10 = 0,
32+
} artemis_dk_version_t;
33+
34+
static void set_board_id(artemis_dk_version_t board_version)
35+
{
36+
switch (board_version)
37+
{
38+
case BOARD_VERSION_v10:
39+
target_device.rt_board_id = board_id_artemis_dk_v10;
40+
break;
41+
default:
42+
target_device.rt_board_id = board_id_artemis_dk_v10;
43+
break;
44+
}
45+
}
46+
47+
// Called in main_task() to init before USB and files are configured
48+
static void prerun_board_config(void)
49+
{
50+
// in the future you could auto-detect board version here
51+
artemis_dk_version_t board_version = (artemis_dk_version_t)BOARD_VERSION_v10;
52+
set_board_id(board_version);
53+
}
54+
55+
// USB HID override function return 1 if the activity is trivial or response is null
56+
uint8_t usbd_hid_no_activity(uint8_t *buf)
57+
{
58+
if (buf[0] == ID_DAP_Vendor3 && buf[1] == 0)
59+
return 1;
60+
else
61+
return 0;
62+
}
63+
64+
const board_info_t g_board_info = {
65+
.info_version = 0x1,
66+
.family_id = kAmbiq_ama3b1kk_FamilyID,
67+
.daplink_url_name = "ARTEMIS_HTM",
68+
.daplink_drive_name = "ARTEMIS ",
69+
.daplink_target_url = "https://www.sparkfun.com/artemis",
70+
.prerun_board_config = prerun_board_config,
71+
.target_cfg = &target_device,
72+
};

0 commit comments

Comments
 (0)