Update SW via TFTP client

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Update SW via TFTP client

3,433 Views
Kazarian
Contributor III

Hello ,

i want to update the software on my board via TFTP,this will be usefull if the board is enclosed in a plastic or metalic cover, the idea is 

  • PC will run a TFTP server containing all SW files 
  • S32k will run a TFTP client that will ask (by file name) the server for the flash file
  • S32k will receive the flash file and start the SW update (erase all flash memory and write).

 

Is there a code example for that ? I have found this example client on github, but I get always a fail in “failed to open file”.

im using the Tftpd64 as TFTP server.

Best regards.

Tags (1)
0 Kudos
Reply
5 Replies

3,423 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Badre,

I'm afraid the answer is no, we do not have such example. We have only:

 

Application note “S32K1xx Bootloader” using UART:

https://www.nxp.com/docs/en/application-note/AN12218.pdf

https://www.nxp.com/docs/en/application-note-software/AN12218SW.zip

 

Application note “S32K1xx Firmware updates” discussing A/B swap and using CAN:

https://www.nxp.com/docs/en/application-note/AN12323.pdf

https://www.nxp.com/docs/en/application-note-software/AN12323SW.zip

 

And then we have lwip integrated to SDK in S32 Design Studio including SW example:

c:\NXP\S32DS.3.4\S32DS\software\S32SDK_S32K1XX_RTM_4.0.2\examples\S32K148\demo_apps\lwip\

 

Regards,

Lukas

0 Kudos
Reply

3,419 Views
Kazarian
Contributor III

Thank you Lukas,

im not aiming for Bootloader or Firmware update.

the goal is to upgrade the application software (.elf file), once a newer version, bug fix... is released i should be able to transfere and burn the file to the MCU.

Best regards.

0 Kudos
Reply

3,405 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

"the goal is to upgrade the application software (.elf file), once a newer version, bug fix... is released i should be able to transfere and burn the file to the MCU."

Well, this sounds like definition of the bootloader. My recommendation is to read mentioned AN12323 which should be a nice starting point.

Regards,

Lukas

0 Kudos
Reply

3,423 Views
Kazarian
Contributor III

Hello,

i have integrated the code to the project, the S32K148 can start the TFTP client, but i get an issue in "tftp_open_file".

Firewall UPD port 69 is open for both ongoing and outgoing packet.

TFTP server is runing and pointing to the location where the file is.

Kazarian_0-1658318052093.png

attached the source code used.

Thank a lot for the help !

0 Kudos
Reply

3,402 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

lwip is an open source which is integrated to SDK. We can provide only very limited support here.

https://lwip.fandom.com/wiki/Further_lwIP_support

Regards,

Lukas

0 Kudos
Reply