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/platform-specification.md
+45-1Lines changed: 45 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -768,6 +768,50 @@ All the tools launched to compile or upload a sketch will have the following env
768
768
contain multiple space-delimited entries like `"arduino-cli/0.21.0 ArduinoIDE/2.0.0-rc1"` if this information is
769
769
available.
770
770
771
+
### Secure Boot
772
+
Some boards supports the secure boot. Basically the compiled sketch can be signed and encrypted with a [tool](#tools) before being flashed to the target board. The bootloader of the board is then responsible for starting the compiled sketch if the matching keys are used.
773
+
774
+
To be able to correctly carry out all the operations at the end of the build we can leverage the [post build hooks](#pre-and-post-build-hooks-since-arduino-ide-165) to sign and encrypt a binary by using `recipe.hooks.objcopy.postobjcopy.NUMBER.pattern` key in [`platform.txt`](#platformtxt). The security keys used are defined in the boards file, this way there could be different keys for different boards.
By having only `tools.TOOL_NAME.cmd` and `tools.TOOL_NAME.build.pattern`, we can customize the behavior with a [custom board option](#custom-board-options).
790
+
Then in the [`boards.txt`](#boardstxt) we can define the new option to use a different `postbuild.cmd`:
0 commit comments