Building the FCC example
Mbed OS
-
Clone the embedded application's GitHub repository to your local computer:
mbed import https://github.com/ARMmbed/factory-configurator-client-example
-
Navigate to the application folder:
cd factory-configurator-client-example
-
Detect and configure the target device:
-
If your device is connected to your local computer:
mbed detect mbed target auto
-
If your device is not connected to your local computer:
mbed target <target>
-
<target>
must beK64F
,K66F
,NUCLEO_F429ZI
,UBLOX_EVK_ODIN_W2
orNUCLEO_F411RE
.
-
-
Set the toolchain:
mbed config <toolchain path> <path to the toolchain binaries> mbed toolchain <toolchain>
<toolchain path>
may beGCC_ARM_PATH
orARM_PATH
. Needed only if toolchain binaries are not in path.<toolchain>
may beGCC_ARM
orARM
.
Note: To work with the ATECC608A secure element, use
GCC_ARM
orARM
. -
Compile the application:
mbed compile -D<INTERFACE>
Where
<INTERFACE>
is:FCE_ETHERNET_INTERFACE
for an Ethernet interface.FCE_SERIAL_INTERFACE
for a serial interface.
Pass the
--app-config
argument to specify a JSON file; by default, the script takes thembed_app.json
file for a non-PSA target:-
To compile for a PSA target, use
mbed_app_psa_conf.json
:mbed compile -D<INTERFACE> --app-config mbed_app_psa_conf.json
-
To compile for the ATECC608A secure element, use
mbed_app_atmel_conf.json
:mbed compile -D<INTERFACE> --app-config mbed_app_atmel_conf.json
-
Flash the binary to the device.
- Connect the device to your computer over USB. It's listed as a mass storage device.
- Drag and drop
BUILD/<target>/<toolchain>/factory-configurator-client-example.hex
to the device. The binary is flashed to the device, and you should see the LED blink rapidly; wait for it to finish. - Press the Reset button to restart the device.
Example of how to build the application for a K64F target (board) using the GCC_ARM toolchain
mbed import https://github.com/ARMmbed/factory-configurator-client-example
cd factory-configurator-client-example
mbed target K64F
mbed toolchain GCC_ARM
mbed compile -DFCE_ETHERNET_INTERFACE
Native Linux
-
Clone the embedded application's GitHub repository to your local computer:
git clone https://github.com/ARMmbed/factory-configurator-client-example
-
Navigate to the application folder:
cd factory-configurator-client-example
-
Remove the
mbed-os.lib
file. -
Deploy the example repository:
mbed deploy
-
Compile the application:
-
For a simple build (compiles for both
Release
andDebug
profiles), run:python pal-platform/pal-platform.py fullbuild --target x86_x64_NativeLinux_mbedtls --toolchain GCC --external ./../<file-name> --name factory-configurator-client-example.elf
-
For a manually configured build, run:
python pal-platform/pal-platform.py deploy --target=x86_x64_NativeLinux_mbedtls generate cd __x86_x64_NativeLinux_mbedtls cmake -G "Unix Makefiles" -DPARSEC_TPM_SE_SUPPORT=<ON|OFF> -DCMAKE_BUILD_TYPE=<build-type> -DCMAKE_TOOLCHAIN_FILE=./../pal-platform/Toolchain/GCC/GCC.cmake -DEXTERNAL_DEFINE_FILE=./../<file-name> make factory-configurator-client-example.elf
Where:
-
<build-type>
may beDebug
orRelease
. -
<file-name>
is:linux-config.cmake
for non-PSA platforms (Parsec support is only available on PSA platforms).linux-psa-config.cmake
for PSA platforms and to use Parsec APIs and a software trusted platform module (TPM).
-
DPARSEC_TPM_SE_SUPPORT
isON
for use with a TPM andOFF
otherwise.
-
Note: The simple build creates binaries under
factory-configurator-client-example/out
, whereas the manual build creates the binaries underfactory-configurator-client-example/__x86_x64_NativeLinux_mbedtls
. In both cases, there areDebug
andRelease
sub-directories, respectively, for the two profiles. -