Skip to content

Commit dddca33

Browse files
committed
files-needed-by-factory: Move to separate document
These are instructions for maintainers, and should be in a separate document.
1 parent 27c241c commit dddca33

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Fast open-source firmware for the [PineTime smartwatch](https://www.pine64.org/p
6464
- [Versioning](doc/versioning.md)
6565
- [Project branches](doc/branches.md)
6666
- [Files included in the release notes](doc/filesInReleaseNotes.md)
67+
- [Files needed by the factory](doc/files-needed-by-factory.md)
6768

6869
## Licenses
6970

doc/buildAndProgram.md

-38
Original file line numberDiff line numberDiff line change
@@ -89,41 +89,3 @@ Binary files are generated into the folder `src`:
8989
- **pinetime-mcuboot-ap-dfu** : DFU file of the firmware
9090
9191
The same files are generated for **pinetime-recovery** and **pinetime-recoveryloader**
92-
93-
### How to generate files needed by the factory
94-
95-
These files are needed by the Pine64 factory to flash InfiniTime as the default firmware on the PineTimes.
96-
97-
Two files are needed: an **HEX (.hex)** file that contains the content of the internal flash memory (bootloader + InfiniTime) and a **binary (.bin)** file that contains the content of the external flash memory (recovery firmware).
98-
99-
#### merged-internal.hex
100-
101-
First, convert the bootloader to hex:
102-
103-
```
104-
<ARM TOOLCHAIN>/bin/arm-none-eabi-objcopy -I binary -O ihex ./bootloader.bin ./bootloader.hex
105-
```
106-
107-
where `bootloader.bin` is the [last stable version](https://github.com/JF002/pinetime-mcuboot-bootloader/releases) of the [bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader).
108-
109-
Then, convert the MCUBoot image of InfiniTime:
110-
111-
```
112-
<ARM TOOLCHAIN>/bin/arm-none-eabi-objcopy -I binary -O ihex --change-addresses 0x8000 ./pinetime-mcuboot-app-image-1.6.0.bin ./pinetime-mcuboot-app-image-1.6.0.hex
113-
```
114-
115-
where `pinetime-mcuboot-app-image-1.6.0.bin` is [the bin of the last MCUBoot image](https://github.com/InfiniTimeOrg/InfiniTime/releases) of [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime).
116-
117-
Pay attention to the parameter `--change-addresses 0x8000`. It's needed to ensure the image will be flashed at the offset expected by the bootloader (0x8000).
118-
119-
Finally, merge them together with **mergehex**:
120-
121-
```
122-
/opt/mergehex/mergehex -m ./bootloader.hex ./pinetime-mcuboot-app-image-1.6.0.hex -o merged-internal.hex
123-
```
124-
125-
This file must be flashed at offset **0x00** of the internal memory of the NRF52832.
126-
127-
#### spinor.bin
128-
129-
This file is the MCUBoot image of the last stable version of the recovery firmware. It must be flashed at offset **0x00** of the external SPINOR flash memory.

doc/files-needed-by-factory.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# How to generate files needed by the factory
2+
3+
These files are needed by the Pine64 factory to flash InfiniTime as the default firmware on the PineTimes.
4+
5+
Two files are needed: an **HEX (.hex)** file that contains the content of the internal flash memory (bootloader + InfiniTime) and a **binary (.bin)** file that contains the content of the external flash memory (recovery firmware).
6+
7+
#### merged-internal.hex
8+
9+
First, convert the bootloader to hex:
10+
11+
```
12+
<ARM TOOLCHAIN>/bin/arm-none-eabi-objcopy -I binary -O ihex ./bootloader.bin ./bootloader.hex
13+
```
14+
15+
where `bootloader.bin` is the [last stable version](https://github.com/JF002/pinetime-mcuboot-bootloader/releases) of the [bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader).
16+
17+
Then, convert the MCUBoot image of InfiniTime:
18+
19+
```
20+
<ARM TOOLCHAIN>/bin/arm-none-eabi-objcopy -I binary -O ihex --change-addresses 0x8000 ./pinetime-mcuboot-app-image-1.6.0.bin ./pinetime-mcuboot-app-image-1.6.0.hex
21+
```
22+
23+
where `pinetime-mcuboot-app-image-1.6.0.bin` is [the bin of the last MCUBoot image](https://github.com/InfiniTimeOrg/InfiniTime/releases) of [InfiniTime](https://github.com/InfiniTimeOrg/InfiniTime).
24+
25+
Pay attention to the parameter `--change-addresses 0x8000`. It's needed to ensure the image will be flashed at the offset expected by the bootloader (0x8000).
26+
27+
Finally, merge them together with **mergehex**:
28+
29+
```
30+
/opt/mergehex/mergehex -m ./bootloader.hex ./pinetime-mcuboot-app-image-1.6.0.hex -o merged-internal.hex
31+
```
32+
33+
This file must be flashed at offset **0x00** of the internal memory of the NRF52832.
34+
35+
#### spinor.bin
36+
37+
This file is the MCUBoot image of the last stable version of the recovery firmware. It must be flashed at offset **0x00** of the external SPINOR flash memory.

0 commit comments

Comments
 (0)