@@ -21,17 +21,11 @@ This is a basic Mbed OS project for [micro:bit V2](https://microbit.org/new-micr
2121
2222- git
2323- [ Arm GCC] ( https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads )
24-
25- ** Mbed only requirements:**
24+ - v9.3.1 is the last tested version
2625- Python 3
2726- pip (version >= 10.0)
28- - Mercurial
2927- [ Mbed CLI] ( https://github.com/ARMmbed/mbed-cli )
30- - Last tested version is 1.10.2
31-
32- ** Make only requirements:**
33- - srec_cat
34- - Make
28+ - v1.10.2 is last tested version
3529
3630
3731## Using Mbed
@@ -41,7 +35,7 @@ This is a basic Mbed OS project for [micro:bit V2](https://microbit.org/new-micr
4135Install mbed-cli using one of the methods from the official documentation:
4236https://os.mbed.com/docs/mbed-os/v5.12/tools/developing-mbed-cli.html
4337
44- The manual installation (in a Python 2 virtual environment) is the prefer method.
38+ The manual installation (in a Python 3 virtual environment) is the prefer method.
4539
4640### Multiple targets
4741
@@ -65,25 +59,6 @@ targets.
6559The version of the board can be seen on the silkscreen at the back, near the
6660right side of the edge connector.
6761
68- ### Mbed OS Version
69-
70- We are currently locked to
71- [ v5.12.4] ( https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.12.4 ) as
72- this is the last version to support Soft Device, which has been dropped in
73- [ v5.13+] ( https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.13.0 ) :
74-
75- > Default to Cordio BLE stack for NRF52* targets
76- > [ 10709] ( https://github.com/ARMmbed/mbed-os/pull/10709 )
77- >
78- > Starting with mbed-os 5.13 and the introduction of Nordic SDK V15, Nordic
79- > SoftDevice Bluetooth stack is not supported. Bluetooth remains supported with
80- > the help of Arm's Cordio stack.
81-
82- ### Mbed OS RTOS
83-
84- To compile the project without the Mbed OS RTOS edit the ` .mbedignore ` and
85- uncomment all the entries.
86-
8762### Initialise
8863
8964Note that for the ` mbed target ... ` line you should select the right target
@@ -130,73 +105,45 @@ mbed compile -m nrf52_microbit_v2 -t GCC_ARM
130105
131106Build output can be found in: ` ./BUILD/NRF52_MICROBIT_V2/GCC_ARM/mbedos-microbit-v2-starter.hex `
132107
133- If ` mbed ` cannot find the tools directory in mbed-os, then you may have to delete the mbed cache by removing ` ~/.mbed/ ` .
134-
135-
136- ## Using Make (back up option only)
108+ If ` mbed ` cannot find the tools directory in mbed-os, then you may have to
109+ delete the mbed cache by removing ` ~/.mbed/ ` .
137110
138- The use of the Makefile is discouraged, and it is here only as a back up
139- mechanism to compile the Mbed project.
140- As the MakeFile is created based on the mbed project and some manual patches
141- have to be applied, it is likely this method will fall behind compared the mbed
142- method.
143-
144- ### Single target
145-
146- Only the latest target is supported in the Makefile.
147-
148- At the time of writing this would be v1.43.4 boards. Since the v1.44, v1.45,
149- v1.46, v1.47 board updates does not affect the target configuration there was
150- no need to regenerate the Makefile.
151-
152- ### Initialise
153-
154- ```
155- git clone https://github.com/microbit-foundation/mbedos-microbit-v2-starter.git
156- cd mbedos-microbit-v2-starter
157- git clone https://github.com/ARMmbed/mbed-os.git
158- ```
159-
160- Then open the ` mbed-os.lib ` file with a text editor, it should have something
161- like this:
162-
163- ```
164- https://github.com/ARMmbed/mbed-os/#73f096399b4cda1f780b140c87afad9446047432
165- ```
166-
167- The sequence after the ` # ` is the git commit needed of mbed-os, so:
168-
169- ```
170- cd mbed-os
171- git reset --hard <commit_hash_here>
172- ```
173-
174- ### Build
175-
176- From the ` mbedos-microbit-v2-starter ` folder run:
177-
178- ```
179- make
180- ```
111+ ### Mbed OS Version
181112
182- Build output can be found in: ` ./BUILD/mbedos-microbit-v2-starter-combined.hex `
113+ This repo is currently configured Mbed OS to version
114+ [ 6.13.0] ( (https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-6.14.0) ) .
183115
184- ### Regenerate Makefile
116+ The branch ` xxxx ` (commit ` 6adcd80982dbf5c2a2ef876d21d0f4a08db91644 ` ) is
117+ configured to [ v5.12.4] ( https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.12.4 ) ,
118+ as this is the last Mbed OS version to support Soft Device.
185119
186- The Makefile can be regenerated using mbed-cli, however keep in mind that there
187- has been changes applied (the file header contains more information), and
188- some of those changes (and the header info) might need to be preserved in the
189- new regenerated version.
120+ ### Mbed OS RTOS
190121
191- ```
192- mbed-cli export -i GCC_ARM -m nrf52_microbit_v2 --profile develop
122+ This section needs to be updated to work with the Mbed OS v6 bare metal
123+ profile.
124+
125+ mbed_app.json:
126+ ```
127+ {
128+ "requires": [
129+ "bare-metal",
130+ "drivers-usb",
131+ "events"
132+ ],
133+ "target_overrides": {
134+ "*": {
135+ "target.c_lib": "small"
136+ }
137+ }
138+ }
193139```
194140
195141
196142## Visual Studio Code
197143
198144At the moment we have the default config files from the Mbed online compiler
199- project exporter. These are using ` make ` but could be updated to use ` mbed-cli ` .
145+ project exporter. These are using removed ` make ` and have to be updated to use
146+ ` mbed-cli ` .
200147
201148
202149## Using NFC
@@ -207,18 +154,10 @@ as they are exposed via the Edge Connector to be used as normal GPIOs.
207154To change this and use them for NFC you can perform the following changes:
208155- Mbed: Update the ` mbed_app.json ` file to include a remove macro entry in the micro: bit target.
209156 ```
210- "NRF52_MICROBIT_v1_44 ": {
157+ "NRF52_MICROBIT_v2 ": {
211158 "target.macros_remove": ["CONFIG_NFCT_PINS_AS_GPIOS"]
212159 }
213160 ```
214- - Makefile: Remove the following lines from the makefile.
215- ```
216- C_FLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS
217- ...
218- CXX_FLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS
219- ...
220- ASM_FLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS
221- ```
222161
223162
224163## License
0 commit comments