-
Notifications
You must be signed in to change notification settings - Fork 3
Building ZLoader
ZLoader provides a CLI that makes use of the ZIOS and Zlib utilities to provide an operational environment.
There are two build options:
- Production/Release build. The resulting image is ready to be loaded into Flash (Use the
FP
command). - Development build. The built image will load into RAM and overwrite the RAM loaded image with the current development image.
% cd zloader
% RELEASE=y ./mk.sh
The release build is identical to the development build however it expects to initially be run from Flash and before anything else will enable memory page mapping and copy itself from flash pages 0 and 1 into RAM pages 20h and 21h. Once copied standard initialisation proceeds.
% cd zloader
% ./mk.sh
Once initialisation is complete the development build is operationally identical to the release version. The development version of ZLoader expects to have been loaded into the standard application memory pages (22h and 23h). On initialisation it will overwrite the previous RAM version of ZLoader in RAM pages 20h and 21h and then continue execution from there. Note only pages 22h and 25h are copied!
There are some situations when working on the ZLoader that it's not useful for the image to be copied over the original running image. The most obvious is that on a crash/reset sequence the flash version will overwrite the development version so memory can't be interrogate. In this situation build ZLoader with the DEBUG=y flag. This will leave the system running in pages 22h-23h forcing any application into subsequence RAM pages.
% cd zloader
% DEBUG=y ./mk.sh