Home/Support/Support Forum/Firmware upgrade via SPI Connect ME 9210
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Firmware upgrade via SPI Connect ME 9210

0 votes
Hello All.
I have a Connect ME 9210 that is connected to its host via SPI.
The host has an SD card that can hold a new image for the 9210.
How do I go about loading a new image.bin "manually"
The SPI communications are working fine so getting the file from the host into the 9210 is easy.
I just need some direction on how to create the image.bin file locally.

I am sure that there is some example code, I just can not find it.

asked Apr 3 in NET+OS by Nevis Automation New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
There is no existing example. You'd have to combine SPI APIs and Filesystem APIs and create a file in the filesystem and write to it data in chunks as you get it from SPI
answered Apr 4 by LeonidM Veteran of the Digi Community (3,557 points)
I guess I did not word that well.
I am looking for some examples on the filesystem and image.bin side of things.
I guess some pointer to the filesystem API doc's
There are two sets of APIs and two examples coming with netos - standard C libary
nafileio: File IO Example Application

This application shows how to use c library file system functions to perform file I/O.
The application demostrate how to use mkdir(), open(), close(), write(), read(), fopen(), fclose(), fread(),
fwrite(), fseek() and remove().

nafilesys: File System Example Application

Netos APIs
This application shows how to use native file system API functions to perform file
I/O.  The BSP_INCLUDE_FILESYSTEM_FOR_CLIBRARY #define constant in bsp_fs.h must be set
to TRUE to have the BSP to mount the default RAM and Flash volumes.
If you turn on this flag you must also be sure to link the filesys library
in your application makefile by adding the line
Thank you very much. I will start this these examples.
Could you possibly point to some information on the image update process?
I believe that I just create a file in Flash0, Once it passes some verification I delete the old image.bin and rename my new file.
Is this correct? Can you point my to documentation.

Thank you very much. (Sorry to pester, there is a lot of documentation to dig through if you don't know what your looking for! )
Please take a look at C:\Netos75\src\apps\DigiESPProject\sys\util\firmware.c