.fota not generated after building the code

Hi,

I have successfully build the ble_peripheral_server_hrp_fota sample code. But ble_peripheral_server_hrp_fota.fota is not generated. Could you please suggest your opinion on this.

@reshma9464

Would you please provide print _ screen of your Debug window similar to this:

Example: ble_peripheral_server_hrp

The same is for ble_peripheral_server_hrp_sleep

It might help to clear or refresh your workspace from older projects entirely.

Thank you for using our community forum.

@martin.bela

please find the below attachment for the debug window of the mentioned sample code.fota|690x202

@reshma9464 Would you please re-attach your project files cause I am not able to download them ? Alternatively, please use my e mail : onhelp@onsemi.com and copy the subject : .fota not generated after building the code
Thank you,

@martin.bela

Please find the attachment. I have mailed the same to the mentioned e mail.

@reshma9464 . Please try to clean up your workspace, from any other previous projects and their files so the only project in your workspace will be ble_peripheral_server_hrp_fota.

Another option is to create new workspace and build the new project. After successful build, you should see ble_peripheral_server_hrp_fota.fota file as below:

image

Thank you for using our community forum !

@martin.bela

I tried as you suggested. Still am not getting. Could you please suggest any other options.

Hi @reshma9464

What do you see in the build console window after you build the application?
Maybe you are missing python or some other dependency.

You should have 3 lines near the end related to the FOTA post-build step.
Something like this. No error messages.

make --no-print-directory post-build
Invoking: Cross ARM GNU Create FOTA Image
arm-none-eabi-objcopy -O binary "smartshot_demo_cam.elf" "smartshot_demo_cam.bin" && "C:/Users/user/Workspaces/ON_IDE_35/test/smartshot_demo_cam/RTE/Device/RSL10/mkfotaimg.py" -o "smartshot_demo_cam.fota" "C:/Users/user/Workspaces/ON_IDE_35/test/smartshot_demo_cam/RTE/Device/RSL10/fota.bin" "smartshot_demo_cam.bin"

The build engine does not seem to care if the post build step fails or not and always shows that build finished without errors.

Best regards,
Lukas

Hi,

I have tried again and .fota is generated now. I tried loading FOTA image through UART with the following steps:

1.Initially loaded bootloader with bootloader.hex file.
2.Then pressed Reset button followed with DIO5.
3.Released reset initially then DIO5. LED is continuosly ON now
4.Given the command- python updater.py COM4 ble_peripheral_server_fota.fota.

But I am getting Assertion error as no data received as shown below. could you please suggest any solution.
C:\Users\zoyar\onsemi_fota\bootloader\scripts>python updater.py COM4 ble_peripheral_server_hrp_fota.fota
Image : PSHRP ver=2.4.1 / FOTA ver=2.4.1
AssertionError: no data received

Hello,
I have same problem. Did you solve this problem?
If so , can you explain it to me?

Thank you

I have the same problem…anybody solved it?

Hi @ceran.omur & @user7 ,

It sounds like your .fota image is not being generated as expected. This image is generated using a python script that is automatically called by the Eclipse post-build steps. When building the project, you should get a log to the console that will explain anything that goes wrong, including what errors are being returned by the Python script. Can you please share the build log with us? Specifically the last portion that relates to the post-build steps.

In either case, one approach to addressing this issue is:

  1. Deleting the ‘\RTE’ directory from your project files
  2. Refreshing the project (this should automatically pull in the latest ‘/RTE/’ directory)
  3. Re-Build the project index
  4. Build the project and check if the .fota image is generated successfully

Hi,
I did the following:
copied the example of ble_peripheral_server_hrp_fota and build project:

make --no-print-directory post-build
Invoking: Cross ARM GNU Create FOTA Image
arm-none-eabi-objcopy -O binary “ble_peripheral_server_hrp_fota.elf” “ble_peripheral_server_hrp_fota.bin” && “C:/Users/Ordit/rsl10/ble_peripheral_server_hrp_fota/RTE/Device/RSL10/mkfotaimg.py” -o “ble_peripheral_server_hrp_fota.fota” “C:/Users/Ordit/rsl10/ble_peripheral_server_hrp_fota/RTE/Device/RSL10/fota.bin” “ble_peripheral_server_hrp_fota.bin”

Invoking: Cross ARM GNU Create Flash Image
Invoking: Cross ARM GNU Print Size
arm-none-eabi-objcopy -O ihex “ble_peripheral_server_hrp_fota.elf” “ble_peripheral_server_hrp_fota.hex”
arm-none-eabi-size --format=berkeley “ble_peripheral_server_hrp_fota.elf”
text data bss dec hex filename
31256 176 2600 34032 84f0 ble_peripheral_server_hrp_fota.elf
Finished building: ble_peripheral_server_hrp_fota.hex
Finished building: ble_peripheral_server_hrp_fota.siz

i copied the .fota file to the same folder as updater.py, ran the command and got the same error of 'no data received’

Then i build the fota program (source/firmware/fota) and copied the .bin and libfota.a to the under lib/release folder. i deleted the RTE folder of the ble_peripheral_hrp_fota, refreshed and then built again and saw the following:
make --no-print-directory post-build
Invoking: Cross ARM GNU Create FOTA Image
arm-none-eabi-objcopy -O binary “ble_peripheral_server_hrp_fota.elf” “ble_peripheral_server_hrp_fota.bin” && “C:/Users/Ordit/rsl10/ble_peripheral_server_hrp_fota/RTE/Device/RSL10/mkfotaimg.py” -o “ble_peripheral_server_hrp_fota.fota” “C:/Users/Ordit/rsl10/ble_peripheral_server_hrp_fota/RTE/Device/RSL10/fota.bin” “ble_peripheral_server_hrp_fota.bin”
AssertionError: Wrong image start address (0x00100000/0x00129000)

make[1]: [makefile:70: post-build] Error 1 (ignored)

Thanks

Hi,
I changed a devboard and then it worked, thanks

3 Likes

There are two known cases that can cause problems trying to build a .fota image.

Case 1: SDK service pack upgrade

In this case the reference to libfota.a is updated to point to the newly upgraded library. However, the fota.bin file used in post-build “Create FOTA Image” step is local to the project and therefore an older version.

This results in an AssertionError: Wrong image start address (<actual_image_start_address>/<expected_image_start_address>) error with the <actual_image_start_address> greater than 0x0010000.

To fix this, copy fota.bin from the CMSIS pack installation directory (e.g. ${cmsis_pack_root}\ONSemiconductor<device><version>\lib\Release) into the project’s RTE/Device/RSL15 directory.

Case 2: Deletion of RTE directory followed by a project Refresh

In this case the required files are not all copied into the project’s RTE/Device/RSL15 directory including a linker script file.

This results in multiple build issues, one possibly being an AssertionError: Wrong image start address (<actual_image_start_address>/<expected_image_start_address>) error with the <actual_image_start_address> equal to 0x0010000.

To fix this, copy RTE_Device.h, sections.ld, and startup.S from ${cmsis_pack_root}\ON_Semiconductor\PACK\ONSemiconductor<device><version>\firmware\source\samples\gcc\blinky_fota\RTE\Device\RSL15\ into the project’s RTE/Device/RSL15 directory. In addition you may need to copy fota.bin as in Case 1.

2 Likes

I am getting Assertion error as no data received as shown below. could you please suggest any solution.
C:\Users\zoyar\onsemi_fota\bootloader\scripts>python updater.py COM4 ble_peripheral_server_hrp_fota.fota
Image : PSHRP ver=2.4.1 / FOTA ver=2.4.1
AssertionError: no data received

Check that the .fota image you are using is longer than 0 bytes. If the image creation process failed to complete successfully then the image is 0 bytes long and that will cause the updater to fail.

2 Likes