Inserting an updater for DSP binaries

    Here I want describe inserting a program to do auto update for applications running on DSP.


1. condition:

    The platform is a bare DSP board which have no OS running on it, and programming language is C in CCS, which would compile C and assemble into binaries for the target. The binaries resides in Nor Flash, and they will be executed inplace(XIP). By default, the binaries could be downloaded to flash by JTAG in CCS or external programmer, what I need to do, is update the flash program by serial port. The user would only take the binaries need to be updated and plug in the serial port to change the binaries, which will allow non-developer to do software update when the product is installed at field.


2.how to:

    This is quite like what uboot does. It need some basic functions to communicate with host device such, to write the binaries to specified flash sector, and to jump to specified address starting the kernel or the main application binaries, and these functions should be stored in a protected zone always being executed first when system boot up.

    graph 1. software components

    As graph 1 shows, there are several sections of NOR FLASH which have a size of 512KB. If the hardware was configured to boot from flash, it will jump to an address on FLASH A, where I burned my program--"updater". In updater it will listen on the serial port for several seconds to see if host request an update operation. If yes, then it will ask host to transfer binaries and related target address, then write it to the place. I used time slot based protocol to simplify the communication, and each binaries it received would have a strict check about the correctness. Also I wrote the program running on the host provide UI, load binary files, answer the request. The binary files comes from the output of CCS, which contain code with address, but CCS is not need on the host.

    After the "updater" procedure is done, it will execute a "long jump" to the application address, which holds the real application codes. The Flash A served only in booting stage, like a shadow which the really application can't see.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值