You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build.md
+21-52
Original file line number
Diff line number
Diff line change
@@ -35,19 +35,19 @@ When building firmware, it's a good idea to build from `main`, since this offers
35
35
additional features compared to building in the root directory, such as `program-dfu` to flash
36
36
the produced firmware to the device.
37
37
38
-
## Updating System Firmware (Photon)
38
+
## Updating System Firmware (Boron)
39
39
40
-
When building locally on the photon from the develop branch, it is necessary
40
+
When building locally on the boron from the develop branch, it is necessary
41
41
to update the system firmware to the latest version:
42
42
43
-
- put the Photon in DFU mode
43
+
- put the Boron in DFU mode
44
44
-`cd modules`
45
-
-`make PLATFORM=photon clean all program-dfu`
45
+
-`make clean all -s PLATFORM=boron program-dfu`
46
46
- You can optionally add `APP`/`APPDIR`/`TEST` values to the command above to build a specific application as you would when building `main`.
47
47
48
48
This will flash the latest system modules and the application to your device.
49
49
50
-
A key indicator that this is necessary is that the Photon doesn't run your application
50
+
A key indicator that this is necessary is that the Boron doesn't run your application
51
51
after flashing, due to a version mismatch. The onboard LED will breathe magenta
52
52
to indicate Safe Mode when the application firmware isn't run.
53
53
@@ -103,13 +103,11 @@ common are listed here:
103
103
| Name | PLATFORM_ID |
104
104
|----------|:-----------:|
105
105
| gcc | 3 |
106
-
| photon | 6 |
107
-
| p1 | 8 |
108
-
| electron | 10 |
109
106
| argon | 12 |
110
107
| boron | 13 |
111
108
| bsom | 23 |
112
109
| b5som | 25 |
110
+
| tracker | 26 |
113
111
114
112
The platform is specified on the command line using the platform ID
115
113
@@ -126,23 +124,23 @@ PLATFORM=name
126
124
For example
127
125
128
126
```
129
-
make PLATFORM=photon
127
+
make PLATFORM=boron
130
128
```
131
-
Would build the firmware for the Photon / P0.
129
+
Would build the firmware for the Boron.
132
130
133
131
To avoid repeatedly specifying the platform on the command line, it can be set
134
132
as an environment variable.
135
133
136
134
Linux/OS X:
137
135
138
136
```
139
-
export PLATFORM=photon
137
+
export PLATFORM=boron
140
138
```
141
139
142
140
Windows
143
141
144
142
```
145
-
set PLATFORM=photon
143
+
set PLATFORM=boron
146
144
```
147
145
148
146
In the commands that follow, we avoid listing the PLATFORM explicitly to keep
@@ -351,7 +349,7 @@ External Particle libraries can be compiled and linked with firmware. To add one
351
349
2. remove the `examples` directory if it exists
352
350
```
353
351
cd /particle/libs/neopixel
354
-
rm -rf firmware/examples
352
+
rm -rf device-os/examples
355
353
```
356
354
357
355
3. Rename `firmware` to be the same as the library name.
@@ -427,31 +425,6 @@ the device will then automatically enter DFU mode and flash the firmware.
427
425
(Tested on OS X. Should work on other platforms that provide the `stty` command.)
428
426
429
427
430
-
## Flashing the firmware to the device via ST-Link
431
-
432
-
The `st-flash` target can be used to flash all executable code (bootloader, main and modules)
433
-
to the device. The flash uses the `st-flash` tool, which should be in your system path.
434
-
435
-
# Debugging
436
-
437
-
To enable JTAG debugging, add this to the command line:
438
-
439
-
```
440
-
USE_SWD_JTAG=y
441
-
```
442
-
443
-
and perform a clean build.
444
-
445
-
To enable SWD debugging only (freeing up 2 pins) add:
446
-
447
-
```
448
-
USE_SWD=y
449
-
```
450
-
451
-
and perform a clean build. For more details on SWD-only debugging
452
-
see https://github.com/spark/firmware/pull/337
453
-
454
-
455
428
## Building the `develop` branch
456
429
457
430
Before the 0.4.0 firmware was released, we recommended the develop branch for early adopters to obtain the code. This is still fine for early adopters, and people that want the bleeding edge, although please keep in mind the code is untested and unreleased.
@@ -464,36 +437,32 @@ Pre-releases are available in `release/vx.x.x-rc.x` branches. Default released
464
437
- The variables passed to make can also be provided as environment variables,
465
438
so you avoid having to type them out for each build. The environment variable value can be overridden
466
439
by passing the variable on the command line.
467
-
-`PLATFORM` set in the environment if you mainly build for one platform, e.g. the Photon.
440
+
-`PLATFORM` set in the environment if you mainly build for one platform, e.g. the Boron.
468
441
469
-
### Photon
442
+
### Boron
470
443
471
-
Here are some common recipes when working with the photon. Note that `PLATFORM=photon` doesn't need to be present if you have `PLATFORM=photon` already defined in your environment.
444
+
Here are some common recipes when working with the boron. Note that `PLATFORM=boron` doesn't need to be present if you have `PLATFORM=boron` already defined in your environment.
472
445
473
446
```
474
447
# Complete rebuild and DFU flash of latest system and application firmware
475
-
firmware/modules$ make clean all program-dfu PLATFORM=photon
448
+
device-os/modules$ make clean all program-dfu PLATFORM=boron
476
449
477
450
# Incremental build and flash of latest system and application firmware
478
-
firmware/modules$ make all program-dfu PLATFORM=photon
479
-
480
-
# Build system and application for use with debugger (Programmer Shield)
481
-
# APP/APPDIR can also be specified here to build the non-default application
482
-
firmware/modules$ make clean all program-dfu PLATFORM=photon USE_SWD_JTAG=y
451
+
device-os/modules$ make all program-dfu PLATFORM=boron
483
452
484
-
# Incremental build and flash user application.cpp only (note the directory)
485
-
firmware/main$ make all program-dfu PLATFORM=photon
453
+
# Incremental build and flash user application.cpp only (note the main/ directory)
454
+
device-os/main$ make all program-dfu PLATFORM=boron
486
455
487
456
# Build an external application
488
-
firmware/modules$ make all PLATFORM=photon APPDIR=~/my_app
457
+
device-os/modules$ make all PLATFORM=boron APPDIR=~/my_app
489
458
```
490
459
491
460
For system firmware developers:
492
461
493
462
```
494
463
# Rebuild and flash the primary unit test application
495
-
firmware/main$ make clean all program-dfu TEST=wiring/no_fixture PLATFORM=photon
464
+
device-os/main$ make clean all -s TEST=wiring/no_fixture PLATFORM=boron program-dfu
496
465
497
466
# Build the compilation test (don't flash on device)
498
-
firmware/main$ make TEST=wiring/api PLATFORM=photon
467
+
device-os/main$ make clean all -s TEST=wiring/api PLATFORM=boron
Copy file name to clipboardExpand all lines: docs/debugging.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,6 @@ The firmware includes a debugging aid that enables debug output, from the system
6
6
To create a debug build, add `DEBUG_BUILD=y` to the `make` command line. If the previous build was not a debug build then
7
7
you should add `clean` to perform a clean build.
8
8
9
-
On the photon, the system modules must also be rebuilt also with `DEBUG_BUILD` set.
9
+
On the device, the system module(s) must also be rebuilt also with `DEBUG_BUILD` set.
10
10
11
11
Since 0.6.0 the firmware includes newer logging framework. The system API is described in the services/inc/logging.h file. The application API is described in the firmware reference: docs/reference/firmware.md
Copy file name to clipboardExpand all lines: docs/gettingstarted.md
+8-7
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Open up a terminal window, and switch branch to 'release/stable'
40
40
Navigate to the `modules` folder under firmware
41
41
(i.e. `cd firmware/modules`) and type:
42
42
43
-
make clean all PLATFORM=photon -s program-dfu
43
+
make clean all -s PLATFORM=boron program-dfu
44
44
45
45
This will clean build the system firmware and the default main application (`firmware/user/src/application.cpp`) which contains Tinker, but you may overwrite this with your own application and add any required dependencies. The `-s` silences the verbose output, so be patient while it builds. If your device is in DFU mode, it will then download the 3 binaries one at a time. For more custom application location solutions, see the [makefile documentation](build.md) and learn how to use the `APP=myapp` option.
46
46
@@ -80,7 +80,7 @@ the various libraries that make up the firmware.
80
80
|**wiring**| the Wiring API |
81
81
|**user**| contains the default application code (Tinker) and your own applications |
82
82
|**main**| top-level project to build the firmware for a device |
83
-
|**modules**| dynamically linked modules for the Photon/PØ/P1 |
83
+
|**modules**| dynamically linked modules |
84
84
85
85
Within each library, the structure is
86
86
@@ -115,14 +115,15 @@ A flash of white then flashing green can happen when you get this wrong. You wan
115
115
2. Open up a terminal window on your computer and type this command to find out if the device indeed being detected correctly.
116
116
117
117
`dfu-util -l`
118
-
you should get something similar to this in return:
118
+
you should get something similar to this in return (e.g. for Boron):
119
119
```
120
-
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/20*001Ka,108*001Kg"
- Windows users will need to use the Zatig utility to replace the USB driver as described earlier
125
-
- Linux users who encounter someting like: `dfu-util: Cannot open DFU device 2b04:d00a` can try `sudo dfu-util -l` or if you use the Particle CLI command `particle flash --usb` or `particle update` it will add the device udev rules automatically for you.
126
+
- Linux users who encounter someting like: `dfu-util: Cannot open DFU device 2b04:d00d` can try `sudo dfu-util -l` or if you use the Particle CLI command `particle flash --usb` or `particle update` it will add the device udev rules automatically for you.
126
127
127
128
128
129
3. Now, from the `main/` folder in your firmware repository and use the following command to transfer the *.bin* file into the device.
@@ -138,4 +139,4 @@ the `dfu-util` command. You can ignore this message for now. We're not sure wha
138
139
139
140
* If you are having trouble with dfu-util, (like invalid dfuse address), try a newer version of dfu-util. v0.7 works well.
140
141
141
-
**Still having troubles?** Checkout our [resources page](https://www.particle.io/resources), hit us up on IRC, etc.
142
+
**Still having troubles?** Checkout our [Docs](https://docs.particle.io/).
0 commit comments