Some Directions in the ABCD Proto-Kernel™ Distribution




The current ABCD Proto-Kernel™ distribution is a comprehensive, yet focused, set of free software source files and documentation files. The focus is on embedded software development. You'll find below some of the important “side issues” that are covered by the ABCD Proto-Kernel™ distribution.

Note:   Many of these issues are tailored to the PPCMB/850 hardware, but the source code porting to other target environments is expected, since the source code is distributed as free software.


In-System Programming Options


The memory within an embedded system needs to be initialized with a software image before the system can run. The whole software image creation process is described in the document ABCD Proto-Kernel™ Software Link and Load Process.

 

Note:   The ABCD Proto-Kernel™ in-system programming procedures are highly integrated. Accordingly, a specific software utility converts the linker output (using the ELF format specification) to a software image format tailored to the PPCMB/850 actual memory organization details. This utility is called elf_post_ld and its creation is driven by a makefile, namely the distribution file source/projects/utils/elf_post_ld/linux/makefile.


In-System Programming with the “Embedded Loader”


The “embedded loader” is itself an application based on the ABCD Proto-Kernel™. As such, its creation is driven by a makefile, namely the distribution file source/projects/masters/ppcmb850_devloader/makefile. Within this embedded application, the protocol logic for binary file transfer is implemented in source files found in the directory source/utils/abcd_bin_file_tx/. The embedded loader receives a software image from a host system (e.g. a Linux-based PC that runs the lab-comm utility) that implements the transmitter portion of the same protocol, normally implemented with the source files from the same directory. The instructions for downloading software are found in section 8.7.2 of the ABCD Proto-Kernel™ Version 1.x Distribution Overview.


In-System Programming Tools, a Fail-Safe Mechanism


In order for the embedded loader to start a software download operation, it must be invoked by the already loaded application, using a command or triggering condition that is totally under application control. If an application is loaded into the flash memory but lacks such an embedded loader triggering capability (e.g. the application crashes before reaching the point where it can trigger the embedded loader), there is a fail-safe condition (a momentary wire jumper connection) that the embedded loader will detect upon a system reset. This is explained in section 5.6 in the PPCMB/850 Hardware User's Guide.


In-System Programming Tools, a DBM Adapter Solution.

 

Note:   If you read this document section because you have problem loading a software image into a PPCMB/850 because you previously loaded a buggy software image and you can't start the embedded loader any more, you should read the previous section before considering the purchase of a BDM adapter solution.


The native in-system programming mechanism for the Motorola MPC8xx processor family is the BDM interface (Background Debug Monitor). When everything else fails, or with a new assembled PCB unit, the BDM port is the only mechanism for loading a software image. Before shipment, the PPCMB/850 units are loaded with the embedded loader image through theIR BDM port. The PPCMB/850 BDM interface is described in section 5.5 in the PPCMB/850 Hardware User's Guide.


It is difficult to find a compatible BDM adapter hardware module that is both reasonably priced and supported by free software. In addition, some developers reported hardware reliability problems with BDM adapters provided with ambiguous specifications about the powering sequence.


For to use the BDM loading mechanism for a “broken” PPCMB/850, the ABCD Proto-Kernel™ distribution allows a “valid” PPCMB/850 to be used as the BDM adapter.


The BDM adapter function is an application based on the ABCD Proto-Kernel™. As such, its creation is driven by a makefile and a companion file, namely the distribution files source/projects/masters/ppcmb850_bdm/makefile and the file source/projects/masters/ppcmb850_bdm/ppcmb850_bdm.mak. The valid PPCMB/850 must be already loaded with an operational embedded loader, that is first used to load the BDM adapter function application software.


To be used as a BDM adapter hardware, the PPCMB/850 is hosted on a modified PPCBM/850 minimal host circuit (CONNOTECH part number 950-0003-01 with the modifications 961-0002-01 that turn a minimal host circuit into a BDM adapter). This hardware modification is documented in the Annex A in the ABCD Proto-Kernel™ Version 1.x Distribution Overview.


For the developer, the access to the BDM adapter function relies on the same lab-comm utility as the embedded loader.


The FlashCnL Library.


The FlashCnL library is a simple and robust solution for system configuration storage and service history (log) recording. It provides a limited set of data recording functions tailored to the expected requirements in typical embedded system applications (“typical” in the context of the ABCD Proto-Kernel™, other small kernels, or even embedded system applications without a kernel).


The FlashCnL library is covered in a dedicated document, The FlashCnL API, A Flash Memory Configuration and Log Application Programming Interface. The current source code is in the ABCD Proto-Kernel™ distribution directory source/flashcnl/.


It is not the whole flash memory that is controlled by the FlashCnL library. Notably, the software images are not stored inside the memory portions controlled by the FlashCnL. This is explained in sections 4.1 and 4.2.2 of ABCD Proto-Kernel™ Software Link and Load Process. If a critical raw data recording function is part of an application requirements, it is perhaps wise to implement it outside of the FlashCnL library, and a software design decision can be made after looking more closely at the FlashCnL organization.

 

Note:   A full-featured “flash file system” is much more complex than the FlashCnl library. Issues such as application control over when a flash sector erase operation may take place, and forward compatibility between flash file system and future software upgrades of are more complex with a full-featured flash file system.


Software Development Console Monitor Support


The console access to an embedded application is among “useful additions” to the ABCD Proto-Kernel™. This term is used to stress the optional nature of console monitor support in a software application based on the ABCD Proto-Kernel™.


No reserved communications port is needed for the console monitor support. The console monitor support shares a packet transmission capability with a specific protocol identifier among other protocol identifiers (at the link layer for the readers familiar with the protocol stack organization). This is specified as part of an embedded system connectivity architecture. A possible system connectivity architecture is explained in The ABCD Proto-Kernel Networking Specifications, including the LAB-COM Utility Guide. Other arrangements are possible if the console support is needed on another connectivity architecture (e.g. based on IP ports at the network layer), but that would jeopardize the compatibility with the current lab-comm utility.


In order to understand the implementation of the console monitor support, the recommended starting point is the sample application based on the ABCD Proto-Kernel™, of which the creation is driven by a makefile and a companion file, namely the distribution files source/projects/masters/ppcmb850_init/makefile and the file source/projects/masters/ppcmb850_init/ppcmb850_init.mak.


The lab-comm Utility


The lab-comm utility is the host side implementation of the console monitor support. But nothing prevents the lab-comm utility from being used with target systems unrelated to the ABCD Proto-Kernel™.


The lab-comm utility creation is driven by a makefile, namely the distribution file source/projects/utils/lab-comm/linux/makefile. It is explained in The ABCD Proto-Kernel Networking Specifications, including the LAB-COM Utility Guide.


The lab-comm utility embeds the required commands and protocol logic for downloading software images to a PPCMB/850 unit, either using the embedded loader or the BDM adapter function.


Simple Monitor Commands


The ABCD Proto-Kernel™ monitor commands is a “useful addition” available to application software developers for commands typically used by service personnel for system configuration, test, and diagnostics. The generic command syntax is somehow rudimentary, but the ease with which new commands can be added is an attractive feature.


The monitor command mechanism can be used outside of an embedded application based on the ABCD Proto-Kernel™. They are indeed used in the lab-comm utility, and this creates uniform command syntax rules when the lab-comm utility is used with an ABCD Proto-Kernel™-based target.


This monitor command mechanism described in section 5.4.2 of The ABCD Proto-Kernel™ Guide. The source files for these are in the directory source/abcd/utils, plus some application-specific files as the case may be.


MPC8xx Clock Configuration Utility


In highly integrated microprocessors, a few external clock sources (often a single one) drives a larger set of timing and clocking functions (e.g. baud rate generators) in hardware timers and other integrated peripherals. This leads to a kind of “clock distribution tree” that requires parameter configuration items to be set with interdependencies that are not documented in a single place.


For the MPC8xx processor family, the ABCD Proto-Kernel™ distribution comes with a developer productivity tool that computes the derived configuration items from hardware and software design decisions, in a manner similar to a spreadsheet form. This developer productivity tool takes the form of the clock_mpc8xx utility, of which the creation is driven by a makefile, namely the distribution file source/projects/utils/clock_cfg/linux/makefile. The use of the clock_mpc8xx utility in the target software image creation procedures is covered in sections 3.1.2.2 and 3.2.3 of ABCD Proto-Kernel™ Software Link and Load Process.


There is an on-line version of the MPC850 clock configuration utility. It works like an interactive spreadsheet form from any web browser.






[ CONNOTECH home page: http://www.connotech.com | e-mail to: info@connotech.com ]




CONNOTECH Experts-conseils Inc.

9130 Place de Montgolfier

Montréal, Québec, Canada, H2M 2A1

Tél.: +1-514-385-5691

Fax: +1-514-385-5900