关闭

Inserting an updater for DSP binaries

297人阅读 评论(0) 收藏 举报

    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.

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:9715次
    • 积分:229
    • 等级:
    • 排名:千里之外
    • 原创:13篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章存档