-
Clone the ARA Module FDK:
$ git clone https://github.com/projectara/ara-module-fdk.git -
Go into the directory:
$ cd ./ara-module-fdk -
Switch to stable release:
By default, the FDK will be initialized with the development branch. The latest tagged release is
mdk-v0.4.0. To switch to a stable release:$ git checkout mdk-0.4.0 -
Initialize the submodules:
$ make submoduleThis command will download compatible versions of the submodules bootrom, bootrom-tools, manifest and nuttx.
-
Build the default skeleton module:
$ makeOnce built, you will find the following file in the newly generated
build/module-examples/skeleton/tftfdirectory:ara_00000126_00001000_00000000_00000000_02.tftf: a signed TFTF image
{MODULE_NAME} should be replaced by the name of your module. No space is
allowed in the module name.
-
Copy the skeleton module directory:
$ cp -r module-examples/skeleton {MODULE_NAME} -
Optionally add new C files for your module support and update the
modules.mkaccordingly:board-files += new_c_file.c -
Optionally make changes to the configuration file:
$ make MODULE={MODULE_NAME} menuconfigIn order to use make menuconfig, you need to have installed on your system the package Kconfig-frontends (see next section).
-
Compile:
$ make MODULE={MODULE_NAME} -
The following generated files are in
build/{MODULE_NAME}/nuttx_build/imageand can be flashed to the GPBridge:
nuttx.elf: Firmware ELF imagenuttx.bin: Firmware BIN image (raw binary) extended to 2MSystem.map: Map linking each function of the firmware to its
In order to clean the repository, there are two possible commands:
make clean: deletesbuild/{MODULE_NAME}make distclean: deletes the wholebuilddirectory
Tips: to avoid having to define the variable MODULE each time you run the
Makefile, you can edit the main Makefile and directly update MODULE with the
name of your module.
-
In your module directory, edit the
module.mkfile and update thevendor_idandproduct_idwith appropriate values (you can keep the default value of0x00000000if unsure). -
Build the S1 bootloader image:
$ make MODULE={MODULE_NAME} es2boot -
Flash the resulting image located at
build/{MODULE_NAME}/bootrom/bootrom.binon the module using the Dediprog SF-100:$ flashrom --programmer dediprog -w build/{MODULE_NAME}/bootrom/bootrom.bin -
Build the TFTF firmware image:
$ make MODULE={MODULE_NAME} tftf -
Copy the resulting image located at
build/{MODULE_NAME}/tftf/ara_..._02.tftfto the Android filesystem:$ adb push build/{MODULE_NAME}/tftf/*.tftf /data/firmwareYou might have to create
/data/firmwarebefore on the Android filesystem:$ adb shell Android$ su Android$ mkdir -p /data/firmware Android$ chmod 777 /data/firmware -
If everything goes fine, the firmware image should be automatically transfered to the module after the module is hot-plugged.
To use the latest unstable version of the FDK and submodules:
$ git checkout master
$ git submodule update --remote