FOTA modify library

Hi,
looking through the documentation for FOTA. I would like to make some changes. Where do I find the source code for the library as below.

Thanks.

“These changes need to be made within the FOTA Library source code that is provided externally in the RSL10 Software CMSIS Package and built to create a new custom FOTA Library file.”

Hi @alex,

FOTA stack source code can be found in the CMSIS Pack, under path:

<cmsis_pack_root>/ONSemiconductor/RSL10//source/firmware/fota

More information can be found in section 6.3 at RSL10_firmware_over_the_air_users_guide available in RSL10 Documentation Package.

Thank you for using our Community Forum.

1 Like

Hi,
thanks for the info provided. I have found the project folder and imported into the eclipse / on-semi workspace. Building the project reports an error:
“make[1]: *** No rule to make target ‘stack/fota_stack.o’, needed by ‘fota.elf’. Stop.”
I have tried using a command prompt (Windows) with the PATH correctly setup for arm binaries and run “buildfotalib.cmd” from the generate Release folder. This reports multiple errors but I’m unsure what the argument “%1” is required. Please could you supply some for details on this.

TIA, Alex.

Hi,
sorry missed this at the top of the console output:
16:56:26 **** Incremental Build of configuration Release for project fota ****
make -j8 all
C:/Program Files (x86)/ON Semiconductor/IDE_V3.4.0.48/arm_tools/bin/make --no-print-directory pre-build
‘Invoking: Build FOTA stack’
“…/tools/buildfotastack.cmd” “C:/Users/XXX/ON_Semiconductor/PACK/ONSemiconductor/RSL10/3.5.285/lib/” Release
‘…’ is not recognized as an internal or external command,
operable program or batch file.
make[1]: [makefile:79: pre-build] Error 1 (ignored)

I have already added the file makefile.init so it gets this far (Windows).

Thanks.

Hi,
almost there!
for any other Windows users change the pre-build steps from:
“…/tools/buildfotastack.cmd”
to:
“…\tools\buildfotastack.cmd”

Hi,
last post I promise!
I now have the following relevant files in the Release folder: libfota.a and fota.bin

The console is reporting this:

Found unknown undefined symbols in fota_stack.o:
cgmc_prf_itf_get
cgms_prf_itf_get

To correct this add matching wrappers to fota_wrapper.c
or if the symbol refers to a side effect free function
add it to the WHITELIST in check.py.

make[1]: [makefile:79: pre-build] Error 1 (ignored)

I presume this is just a warning and the generate library and binary will work ok?

Thanks,
Alex.

Hi @alex,

Glad you have managed to get this all sorted out!

One thing I’d like to note, the lack of CGM wrapper functions in the FOTA Library is an known issue on our end and should be fixed on the next release.

For now, please follow the steps within the Knowledge Base article linked below to add the full CGM support to the FOTA Library you are building:

Hi,
Thanks!
Do you have examples of taking a raw a firmware.fota and sending it to a device. I need to implement this in an iPhone app.

Alex.

Hi @alex,

No problem at all, happy to help!

As for sending a .fota file to a device, there are two approaches that can be used.

The first will be UART based and communicated to the Bootloader portion of the firmware. The ‘updater.py’ script that does this can be found in the ‘Bootloader’ sample project under the scripts folder.

The second option is the DFU Service based method that requires you to have an already function FOTA sample firmware on your device (a full FOTA stack contains: Bootloader, Standalone FOTA DFU & BLE Library, Custom Firmware). The ‘RSL FOTA’ application on Android and iOS is able to communicate this update with the Standalone FOTA DFU. If you wish to implement your own smartphone app, the best place to start is looking at the wireless update process within the ‘fota’ project you have just build.

Hi again,
I need to use BLE for DFU. A quick look at the relevant sources it looks complicated! Encode & decode frames etc. Are the sources available for the iOS application? Or is there a PC equivalent that use a BLE dongle?

Thanks,
Alex.

Hi @alex,

Yes, we offer both the RSL FOTA (iOS) and BLE Explorer FOTA (PC) source file externally.

The BLE Explorer FOTA (PC) source code should be available in the BLE Explorer installation itself as of version 1.6.

The RSL10 FOTA (iOS) source code is only available upon request, at which point it can be distributed through your MyON account.