From 06f9cfee3bec868e2034645293f8479833a5641d Mon Sep 17 00:00:00 2001 From: Philip Smart Date: Sat, 14 Aug 2021 22:23:21 +0100 Subject: [PATCH 1/2] Updates --- apps/tzflupd/tzflupd.c.orig | 503 ++++++++++++++++++++++++++++++++ buildall | 156 ++++++++++ libraries/include/optparse.h | 403 +++++++++++++++++++++++++ libraries/lib/libimath2-k64f.a | Bin 12504 -> 12504 bytes libraries/lib/libumansi-k64f.a | Bin 124218 -> 124218 bytes libraries/lib/libummath-k64f.a | Bin 2660 -> 2660 bytes libraries/lib/libummathf-k64f.a | Bin 63972 -> 63972 bytes libraries/lib/libummisc-k64f.a | Bin 6222 -> 6222 bytes libraries/lib/libumstdio-k64f.a | Bin 80138 -> 80050 bytes 9 files changed, 1062 insertions(+) create mode 100644 apps/tzflupd/tzflupd.c.orig create mode 100755 buildall create mode 100644 libraries/include/optparse.h diff --git a/apps/tzflupd/tzflupd.c.orig b/apps/tzflupd/tzflupd.c.orig new file mode 100644 index 0000000..4f6e440 --- /dev/null +++ b/apps/tzflupd/tzflupd.c.orig @@ -0,0 +1,503 @@ +///////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// Name: tzdump.c +// Created: Jan 2021 +// Author(s): Philip Smart +// Description: A TranZPUter helper utility to update the program in the K64F ARM Processor. This +// application takes a binary and flashes it into the K64F Flash Memory in order to +// update zOS/ZPUTA or flash any other program (NB. flashing any other program may +// need an external OpenSDA programmer to reprogram the K64F with zOS). +// Credits: +// Copyright: (c) 2019-2021 Philip Smart +// +// History: Jan 2021 - Initial write of the TranZPUter software using NXP/Freescale flash +// driver source. +// Feb 2021 - Getopt too buggy with long arguments so replaced with optparse. +// Mar 2021 - Change sector size to K64F default and fixed some bugs. +// +// Notes: See Makefile to enable/disable conditional components +// +///////////////////////////////////////////////////////////////////////////////////////////////////////// +// This source file is free software: you can redistribute it and#or modify +// it under the terms of the GNU General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This source file is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// For the Freescale driver code, please see the license at the top of the driver source file. +///////////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus + extern "C" { +#endif + +#if defined(__K64F__) + #include + #include + #include + #include + #include + #include + #include "k64f_soc.h" + #include <../../libraries/include/stdmisc.h> +#elif defined(__ZPU__) + #include + #include + #include "zpu_soc.h" + #include + #include + #include +#else + #error "Target CPU not defined, use __ZPU__ or __K64F__" +#endif +#include "interrupts.h" +#include "ff.h" /* Declarations of FatFs API */ +//#include "utils.h" +// +#if defined __ZPUTA__ + #include "zputa_app.h" +#elif defined __ZOS__ + #include "zOS_app.h" +#else + #error OS not defined, use __ZPUTA__ or __ZOS__ +#endif + +// Getopt_long is buggy so we use optparse. +#define OPTPARSE_IMPLEMENTATION +#define OPTPARSE_API static +#include + +// +#include + +#if defined(__K64F__) +#include +#include "tzflupd.h" +#include "fsl_flash.h" +#endif + +// Utility functions. +//#include + +// Version info. +#define VERSION "v1.2" +#define VERSION_DATE "11/03/2021" +#define APP_NAME "TZFLUPD" + +// Global scope variables. +FATFS diskHandle; +char buffer[FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE]; +uint8_t FLASH_PROTECTION_SIGNATURE[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xde, 0xf9, 0xff, 0xff}; + +// Simple help screen to remmber how this utility works!! +// +void usage(void) +{ + printf("%s %s\n", APP_NAME, VERSION); + printf("\nCommands:-\n"); + printf(" -h | --help This help text.\n"); + printf(" -f | --file Binary file to upload and flash into K64F.\n"); + printf("\nOptions:-\n"); + printf(" -d | --debug Add debug steps to programming.\n"); + printf(" -v | --verbose Output more messages.\n"); + + printf("\nExamples:\n"); + printf(" tzflupd -f zOS_22012021_001.bin --verbose # Upload and program the zOS_22012021_001.bin file into the K64F flash memory.\n"); +} + +// Method to initialise the SD card and mount the first partition. The file we need to upload into the K64F Flash RAM is stored on this card. +// +FRESULT initSDCard(void) +{ + // Locals. + // + FRESULT result = FR_NOT_ENABLED; + + // Make a complete initialisation as we are using a new Fat FS instance. + // + if(!disk_initialize(0, 1)) + { + sprintf(buffer, "0:"); + result = f_mount(&diskHandle, buffer, 0); + } + + return(result); +} + +// Local memory dump routine for debug purposes. +// +int dumpMemory(uint32_t memaddr, uint32_t memsize, uint32_t memwidth, uint32_t dispaddr, uint8_t dispwidth) +{ + uint8_t displayWidth = dispwidth;; + uint32_t pnt = memaddr; + uint32_t endAddr = memaddr + memsize; + uint32_t addr = dispaddr; + uint32_t i = 0; + //uint32_t data; + int8_t keyIn; + char c = 0; + + // If not set, calculate output line width according to connected display width. + // + if(displayWidth == 0) + { + switch(getScreenWidth()) + { + case 40: + displayWidth = 8; + break; + case 80: + displayWidth = 16; + break; + default: + displayWidth = 32; + break; + } + } + + while (1) + { + printf("%08lX", addr); // print address + printf(": "); + + // print hexadecimal data + for (i=0; i < displayWidth; ) + { + switch(memwidth) + { + case 16: + if(pnt+i < endAddr) + printf("%04X", *(uint16_t *)(pnt+i)); + else + printf(" "); + //printf(" "); + i+=2; + break; + + case 32: + if(pnt+i < endAddr) + printf("%08lX", *(uint32_t *)(pnt+i)); + else + printf(" "); + i+=4; + break; + + case 8: + default: + if(pnt+i < endAddr) + printf("%02X", *(uint8_t *)(pnt+i)); + else + printf(" "); + i++; + break; + } + fputc((char)' ', stdout); + } + + // print ascii data + printf(" |"); + + // print single ascii char + for (i=0; i < displayWidth; i++) + { + c = (char)*(uint8_t *)(pnt+i); + if ((pnt+i < endAddr) && (c >= ' ') && (c <= '~')) + fputc((char)c, stdout); + else + fputc((char)' ', stdout); + } + + puts("|"); + + // Move on one row. + pnt += displayWidth; + addr += displayWidth; + + // User abort (ESC), pause (Space) or all done? + // + keyIn = getKey(0); + if(keyIn == ' ') + { + do { + keyIn = getKey(0); + } while(keyIn != ' ' && keyIn != 0x1b); + } + // Escape key pressed, exit with 0 to indicate this to caller. + if (keyIn == 0x1b) + { + return(0); + } + + // End of buffer, exit the loop. + if(pnt >= (memaddr + memsize)) + { + break; + } + } + + // Normal exit, return -1 to show no key pressed. + return(-1); +} + + +// Main entry and start point of a zOS/ZPUTA Application. Only 2 parameters are catered for and a 32bit return code, additional parameters can be added by changing the appcrt0.s +// startup code to add them to the stack prior to app() call. +// +// Return code for the ZPU is saved in _memreg by the C compiler, this is transferred to _memreg in zOS/ZPUTA in appcrt0.s prior to return. +// The K64F ARM processor uses the standard register passing conventions, return code is stored in R0. +// +uint32_t app(uint32_t param1, uint32_t param2) +{ + // Initialisation. + // + int argc = 0; + int help_flag = 0; + int uploadFNLen = 0; + int debug_flag = 0; + int verbose_flag = 0; + int opt; + int updateFNLen = 0; + long val = 0; + char *argv[20]; + char *ptr = strtok((char *)param1, " "); + char updateFile[32]; + uint32_t fileSize; + uint32_t readSize; + uint32_t sizeToRead; + uint32_t bytesProcessed; + flash_config_t flashDriver; // Flash driver Structure + status_t flashResult; // Return code from each flash driver function + FRESULT fResult; // Fat FS result. + FIL fileHandle; // File Handle. + + // If the invoking command is given, add it to argv at the start. + // + if(param2 != 0) + { + argv[argc++] = (char *)param2; + } + + // Now convert the parameter line into argc/argv suitable for getopt to use. + while (ptr && argc < 20-1) + { + argv[argc++] = ptr; + ptr = strtok(0, " "); + } + argv[argc] = 0; + + // Define parameters to be processed. + struct optparse options; + static struct optparse_long long_options[] = + { + {"help", 'h', OPTPARSE_NONE}, + {"file", 'f', OPTPARSE_REQUIRED}, + {"debug", 'd', OPTPARSE_NONE}, + {"verbose", 'v', OPTPARSE_NONE}, + {0} + }; + + // Parse the command line options. + // + optparse_init(&options, argv); + while((opt = optparse_long(&options, long_options, NULL)) != -1) + { + switch(opt) + { + case 'h': + help_flag = 1; + break; + + case 'f': + strcpy(updateFile, options.optarg); + updateFNLen = strlen(updateFile); + break; + + case 'd': + debug_flag = 1; + break; + + case 'v': + verbose_flag = 1; + break; + + case '?': + printf("%s: %s\n", argv[0], options.errmsg); + return(1); + } + } + + // Validate the input. + if(help_flag == 1) + { + usage(); + return(0); + } + if(updateFNLen == 0) + { + printf("Update file needs to be specified.\n"); + return(1); + } + + //--------------------------------------------------------------------------------------------------------------------------------------------------------------- + // As the kernel will be erased we need to assume kernel functionality so initialise kernel features, such as the SD card here as we use them locally. + //--------------------------------------------------------------------------------------------------------------------------------------------------------------- + if((fResult=initSDCard()) != FR_OK) + { + printf("ERROR: Failed to re-initialise the SD card, cannot continue.\n"); + return(10); + } + + // Initialise the flash driver. + memset(&flashDriver, 0, sizeof(flash_config_t)); + flashResult = FLASH_Init(&flashDriver); + if (kStatus_FLASH_Success != flashResult) + { + printf("Error: Failed to initialize Flash memory driver!\n"); + return(11); + } + + // Try and open the source file. + fResult = f_open(&fileHandle, updateFile, FA_OPEN_EXISTING | FA_READ); + + // Get the size of the file. + if(fResult == FR_OK) + fResult = f_lseek(&fileHandle, f_size(&fileHandle)); + if(fResult == FR_OK) + fileSize = (uint32_t)f_tell(&fileHandle); + if(fResult == FR_OK) + fResult = f_lseek(&fileHandle, 0); + + // Verify that the binary is a K64F program. Do this by comparing the protection area which is static and non changing. + // + fResult = f_lseek(&fileHandle, FLASH_PROTECTION_START_ADDR); + if(fResult == FR_OK) + fResult = f_read(&fileHandle, buffer, FLASH_PROTECTION_SIZE, &readSize); + if(fResult == FR_OK) + { + for(int idx=0; idx < FLASH_PROTECTION_SIZE; idx++) + { + if(buffer[idx] != FLASH_PROTECTION_SIGNATURE[idx]) + { + printf("Error: Update file doesnt look like a valid K64F program binary, aborting!\n"); + return(12); + } + } + fResult = f_lseek(&fileHandle, 0); + } + + // If all ok, indicate file has been opened then prepare to read and flash. + if(fResult == FR_OK) + { + // Indicate file, size and that it has been verified using the security flags. + printf("%s %s\n\n", APP_NAME, VERSION); + printf("Firmware update file: %s, size=%ld bytes\n\n", updateFile, fileSize); + + printf("*******************************************************************************************************************\n"); + printf("Flash will now commence, no further output will be made until the flash is successfully programmed.\n"); + printf("If no further output is seen within 30 seconds, please assume the programming failed and make a hard reset.\n"); + printf("If device doesnt restart use an OpenSDA or JTAG programmer to reprogram the OS.\n"); + printf("*******************************************************************************************************************\n"); + + // Slight delay to allow the output to flush to the user serial console. + uint32_t startTime = *G->millis; + while((*G->millis - startTime) < 1000) {}; + + // Enter a loop, interrupts disabled, reading sector at a time from the SD card and flashing it into the Flash RAM. + // + __disable_irq(); + bytesProcessed = 0; + do { + sizeToRead = (fileSize-bytesProcessed) > FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE ? FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE : fileSize - bytesProcessed; + fResult = f_read(&fileHandle, buffer, sizeToRead, &readSize); + if (fResult || readSize == 0) break; /* error or eof */ + + // If a sector isnt full, ie. last sector, pad with 0xFF. + // + if(readSize != FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE) + { + for(uint16_t idx=readSize; idx < FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE; idx++) { buffer[idx] = 0xFF; } + } + + // Flash the sector into the correct location governed by the bytes already processed. We flash a K64F programming sector at a time with unused space set to 0xFF. + // + flashResult = FLASH_Erase(&flashDriver, bytesProcessed, FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE, kFLASH_ApiEraseKey); + // If no previous errors, program the next sector. + if(flashResult == kStatus_FLASH_Success) + { + flashResult = FLASH_Program(&flashDriver, bytesProcessed, (uint32_t*)buffer, FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE); + } + + // Update the address/bytes processed count. + bytesProcessed += FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE; + } while(bytesProcessed < fileSize && flashResult == kStatus_FLASH_Success); + __enable_irq(); + + // Verbose output. + if(verbose_flag) + printf("Bytes processed:%ld, exit status:%s\n", bytesProcessed, flashResult == kStatus_FLASH_Success ? "Success" : "Fail"); + + // Success in programming, clear rest of flash RAM. + if(flashResult == kStatus_FLASH_Success) + { + // Move to the next full sector as erase operates on sector boundaries. + bytesProcessed = bytesProcessed + (bytesProcessed % FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE); + + // Verbose output. + if(verbose_flag) + printf("Clearing remainder of flash:%ld bytes\n", ((uint32_t)flashDriver.PFlashTotalSize-bytesProcessed)); + + // Erase remainder of the device, caters for previous image being larger than update. + __disable_irq(); + flashResult = FLASH_Erase(&flashDriver, bytesProcessed, ((uint32_t)flashDriver.PFlashTotalSize-bytesProcessed), kFLASH_ApiEraseKey); + __enable_irq(); + } + + // Any errors, report (assuming kernel still intact) and hang. + if (flashResult != kStatus_FLASH_Success) + { + // This message may not be seen if the kernel has been wiped. put here in-case of error before erase. + printf("Error: Failed to program new upgrade into Flash memory area!\n"); + printf(" Reset device. If device doesnt restart use an OpenSDA or JTAG programmer to reprogram.\n\n"); + while(1) {}; + } + + // Debug - place a message in an unused sector which can be checked to see if programming worked. + if(debug_flag) + { + sprintf(buffer, "FLASH PROGRAMMING CHECK MESSAGE"); + for(uint16_t idx=strlen(buffer); idx < FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE; idx++) { buffer[idx] = 0x00; } + __disable_irq(); + flashResult = FLASH_Erase(&flashDriver, bytesProcessed+FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE, FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE, kFLASH_ApiEraseKey); + flashResult = FLASH_Program(&flashDriver, bytesProcessed+FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE, (uint32_t*)buffer, FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE); + __enable_irq(); + printf("Wrote check string at: %08lx\n", bytesProcessed+FSL_FEATURE_FLASH_PFLASH_BLOCK_SECTOR_SIZE); + } + + // Just in case we have output connectivity. If the update doesnt change too much then we should maintain connectivity with the USB. + if(flashResult != kStatus_FLASH_Success) + { + printf("Error: Flash programming failed, addr:%ld, result:%d\n", bytesProcessed, flashResult); + } + + // Tidy up for exit. + f_close(&fileHandle); + } else + { + printf("Error: Failed to read update file:%s, aborting!\n", updateFile); + return(13); + } + + printf("Programming successful, please reset the device to activate update!\n"); + return(0); +} + +#ifdef __cplusplus +} +#endif diff --git a/buildall b/buildall new file mode 100755 index 0000000..c1f99d9 --- /dev/null +++ b/buildall @@ -0,0 +1,156 @@ +#!/bin/bash + +# Not used: Target machine, used to select the right software for the SD card. +# TARGET=MZ-700 +# TARGET=MZ-80A + +TARGET=MZ-80A +ZPU_SHARPMZ_BUILD=0 +#ZPU_SHARPMZ_APPADDR=0x100000 +#ZPU_SHARPMZ_APPSIZE=0x70000 +#ZPU_SHARPMZ_HEAPSIZE=0x8000 +#ZPU_SHARPMZ_STACKSIZE=0x3D80 + +ZPU_SHARPMZ_APPADDR=0x100000 +ZPU_SHARPMZ_APPSIZE=0x70000 +ZPU_SHARPMZ_HEAPSIZE=0x8000 +ZPU_SHARPMZ_STACKSIZE=0x3D80 + +ZPU_E115_BUILD=0 +ZPU_E115_APPADDR=0x10000 +ZPU_E115_APPSIZE=0x8000 +ZPU_E115_HEAPSIZE=0x4000 +ZPU_E115_STACKSIZE=0x3D80 + +# NB: When setting this variable, see lower section creating the SD card image which uses a hard coded value and will need updating. +ROOT_DIR=/dvlp/Projects/dev/github/ +# NB: This clean out is intentionally hard coded as -fr is dangerous, if a variable failed to be set if could see your source base wiped out. +rm -fr /dvlp/Projects/dev/github/zSoft/SD/K64F/* + +( +# Ensure the zOS target directories exist. +cd ${ROOT_DIR}/zSoft +mkdir -p SD/SharpMZ +mkdir -p SD/Dev +mkdir -p SD/K64F/ZOS + +if [ "${ZPU_SHARPMZ_BUILD}x" != "x" -a ${ZPU_SHARPMZ_BUILD} = 1 ]; then + echo "Building ZPU for Sharp MZ" + ./build.sh -C EVO -O zos -o 0 -M 0x1FD80 -B 0x0000 -S ${ZPU_SHARPMZ_STACKSIZE} -N ${ZPU_SHARPMZ_HEAPSIZE} -A ${ZPU_SHARPMZ_APPADDR} -a ${ZPU_SHARPMZ_APPSIZE} -n 0x0000 -s 0x0000 -d -Z + if [ $? != 0 ]; then + echo "Error building Sharp MZ Distribution..." + exit 1 + fi + # Copy the BRAM ROM templates to the build area for the FPGA. + cp rtl/TZSW_* ../tranZPUter/FPGA/SW700/v1.3/devices/sysbus/BRAM/ + # Copy the newly built files into the staging area ready for copying to an SD card. + cp -r build/SD/* SD/SharpMZ/ + # The K64F needs a copy of the zOS ROM for the ZPU so that it can load it into the FPGA. + cp build/SD/ZOS/* SD/K64F/ZOS/ +fi + +if [ "${ZPU_E115_BUILD}x" != "x" -a ${ZPU_E115_BUILD} = 1 ]; then + echo "Building ZPU for Dev board" + ./build.sh -C EVO -O zos -o 0 -M 0x1FD80 -B 0x0000 -S ${ZPU_E115_STACKSIZE} -N ${ZPU_E115_HEAPSIZE} -A ${ZPU_E115_APPADDR} -a ${ZPU_E115_APPSIZE} -n 0x0000 -s 0x0000 -d + if [ $? != 0 ]; then + echo "Error building Dev board Distribution..." + exit 1 + fi + cp rtl/zOS_* rtl/IOCP* rtl/ZPUTA* ../zpu/devices/sysbus/BRAM/ + cp -r build/SD/* SD/Dev/ +fi + +if [ "${TARGET}x" != "x" -a "${TARGET}" = "MZ-80A" ]; then + echo "Building for K64F on MZ-80A" + ./build.sh -C K64F -O zos -N 0x10000 -d -T + if [ $? != 0 ]; then + echo "Error building K64F Distribution..." + exit 1 + fi +else + echo "Building for K64F" + ./build.sh -C K64F -O zos -N 0x18000 -d -T + if [ $? != 0 ]; then + echo "Error building K64F Distribution..." + exit 1 + fi +fi +cp -r build/SD/* SD/K64F/ + +# Ensure the TZFS target directories exist +k64fsddir=${ROOT_DIR}/zSoft/SD/K64F +tzfsdir=${ROOT_DIR}/tranZPUter/software +#mkdir -p $k64fsddir/TZFS/ +#mkdir -p $k64fsddir/MZF/ +#mkdir -p $k64fsddir/CPM/ +#mkdir -p $k64fsddir/BAS +#mkdir -p $k64fsddir/CAS + +( +cd $tzfsdir +tools/assemble_tzfs.sh +if [ $? != 0 ]; then + echo "TZFS assembly failed..." + exit 1 +fi +tools/assemble_roms.sh +if [ $? != 0 ]; then + echo "ROMS assembly failed..." + exit 1 +fi +tools/assemble_cpm.sh +if [ $? != 0 ]; then + echo "CPM assembly failed..." + exit 1 +fi +tools/make_cpmdisks.sh +if [ $? != 0 ]; then + echo "CPM disks assembly failed..." + exit 1 +fi +) +if [ $? != 0 ]; then + exit 1 +fi + +# Copy the files to the remote build server. +cd ${ROOT_DIR}/zSoft +rsync -avh * psmart@192.168.15.205:${ROOT_DIR}/zSoft/ +if [ $? != 0 ]; then + echo "Error syncing K64F Distribution..." + exit 1 +fi +# Simple mechanism to prevent remote build and programming of the K64F. +diff ${ROOT_DIR}/zSoft/zOS/main.bin ${ROOT_DIR}/zSoft/zOS/main.bak +if [ $? -ne 0 ]; then + cd ${ROOT_DIR}/zSoft + echo "GO" > ${ROOT_DIR}/zSoft/.dobuild + rsync -avh .dobuild psmart@192.168.15.205:${ROOT_DIR}/zSoft/ + if [ $? != 0 ]; then + echo "Error syncing K64F Distribution..." + exit 1 + fi +fi +cp ${ROOT_DIR}/zSoft/zOS/main.bin ${ROOT_DIR}/zSoft/zOS/main.bak +) +if [ $? != 0 ]; then + exit 1 +fi + +# Use copytosd.sh to transfer files to an SD card. Still need to copy the k64F files manually. +# --------------- +# Copy across all the Z80/TZFS software into the target, keep it in one place for placing onto an SD card! +#cp $tzfsdir/roms/tzfs.rom $k64fsddir/TZFS/ +#cp $tzfsdir/roms/monitor_SA1510.rom $k64fsddir/TZFS/SA1510.rom +#cp $tzfsdir/roms/monitor_80c_SA1510.rom $k64fsddir/TZFS/SA1510-8.rom +#cp $tzfsdir/roms/monitor_1Z-013A.rom $k64fsddir/TZFS/1Z-013A.rom +#cp $tzfsdir/roms/monitor_80c_1Z-013A.rom $k64fsddir/TZFS/1Z-013A-8.rom +#cp $tzfsdir/roms/monitor_1Z-013A-KM.rom $k64fsddir/TZFS/1Z-013A-KM.rom +#cp $tzfsdir/roms/monitor_80c_1Z-013A-KM.rom $k64fsddir/TZFS/1Z-013A-KM-8.rom +#cp $tzfsdir/roms/MZ80B_IPL.rom $k64fsddir/TZFS/MZ80B_IPL.rom +#cp $tzfsdir/roms/cpm22.bin $k64fsddir/CPM/ +#cp $tzfsdir/CPM/SDC16M/RAW/* $k64fsddir/CPM/ +#cp $tzfsdir/MZF/Common/*.MZF $k64fsddir/MZF/ +#cp $tzfsdir/MZF/${TARGET}/* $k64fsddir/MZF/ +#cp $tzfsdir/BAS/* $k64fsddir/BAS/ +#cp $tzfsdir/CAS/* $k64fsddir/CAS/ diff --git a/libraries/include/optparse.h b/libraries/include/optparse.h new file mode 100644 index 0000000..f96184a --- /dev/null +++ b/libraries/include/optparse.h @@ -0,0 +1,403 @@ +/* Optparse --- portable, reentrant, embeddable, getopt-like option parser + * + * This is free and unencumbered software released into the public domain. + * + * To get the implementation, define OPTPARSE_IMPLEMENTATION. + * Optionally define OPTPARSE_API to control the API's visibility + * and/or linkage (static, __attribute__, __declspec). + * + * The POSIX getopt() option parser has three fatal flaws. These flaws + * are solved by Optparse. + * + * 1) Parser state is stored entirely in global variables, some of + * which are static and inaccessible. This means only one thread can + * use getopt(). It also means it's not possible to recursively parse + * nested sub-arguments while in the middle of argument parsing. + * Optparse fixes this by storing all state on a local struct. + * + * 2) The POSIX standard provides no way to properly reset the parser. + * This means for portable code that getopt() is only good for one + * run, over one argv with one option string. It also means subcommand + * options cannot be processed with getopt(). Most implementations + * provide a method to reset the parser, but it's not portable. + * Optparse provides an optparse_arg() function for stepping over + * subcommands and continuing parsing of options with another option + * string. The Optparse struct itself can be passed around to + * subcommand handlers for additional subcommand option parsing. A + * full reset can be achieved by with an additional optparse_init(). + * + * 3) Error messages are printed to stderr. This can be disabled with + * opterr, but the messages themselves are still inaccessible. + * Optparse solves this by writing an error message in its errmsg + * field. The downside to Optparse is that this error message will + * always be in English rather than the current locale. + * + * Optparse should be familiar with anyone accustomed to getopt(), and + * it could be a nearly drop-in replacement. The option string is the + * same and the fields have the same names as the getopt() global + * variables (optarg, optind, optopt). + * + * Optparse also supports GNU-style long options with optparse_long(). + * The interface is slightly different and simpler than getopt_long(). + * + * By default, argv is permuted as it is parsed, moving non-option + * arguments to the end. This can be disabled by setting the `permute` + * field to 0 after initialization. + */ +#ifndef OPTPARSE_H +#define OPTPARSE_H + +#ifndef OPTPARSE_API +# define OPTPARSE_API +#endif + +struct optparse { + char **argv; + int permute; + int optind; + int optopt; + char *optarg; + char errmsg[64]; + int subopt; +}; + +enum optparse_argtype { + OPTPARSE_NONE, + OPTPARSE_REQUIRED, + OPTPARSE_OPTIONAL +}; + +struct optparse_long { + const char *longname; + int shortname; + enum optparse_argtype argtype; +}; + +/** + * Initializes the parser state. + */ +OPTPARSE_API +void optparse_init(struct optparse *options, char **argv); + +/** + * Read the next option in the argv array. + * @param optstring a getopt()-formatted option string. + * @return the next option character, -1 for done, or '?' for error + * + * Just like getopt(), a character followed by no colons means no + * argument. One colon means the option has a required argument. Two + * colons means the option takes an optional argument. + */ +OPTPARSE_API +int optparse(struct optparse *options, const char *optstring); + +/** + * Handles GNU-style long options in addition to getopt() options. + * This works a lot like GNU's getopt_long(). The last option in + * longopts must be all zeros, marking the end of the array. The + * longindex argument may be NULL. + */ +OPTPARSE_API +int optparse_long(struct optparse *options, + const struct optparse_long *longopts, + int *longindex); + +/** + * Used for stepping over non-option arguments. + * @return the next non-option argument, or NULL for no more arguments + * + * Argument parsing can continue with optparse() after using this + * function. That would be used to parse the options for the + * subcommand returned by optparse_arg(). This function allows you to + * ignore the value of optind. + */ +OPTPARSE_API +char *optparse_arg(struct optparse *options); + +/* Implementation */ +#ifdef OPTPARSE_IMPLEMENTATION + +#define OPTPARSE_MSG_INVALID "invalid option" +#define OPTPARSE_MSG_MISSING "option requires an argument" +#define OPTPARSE_MSG_TOOMANY "option takes no arguments" + +static int +optparse_error(struct optparse *options, const char *msg, const char *data) +{ + unsigned p = 0; + const char *sep = " -- '"; + while (*msg) + options->errmsg[p++] = *msg++; + while (*sep) + options->errmsg[p++] = *sep++; + while (p < sizeof(options->errmsg) - 2 && *data) + options->errmsg[p++] = *data++; + options->errmsg[p++] = '\''; + options->errmsg[p++] = '\0'; + return '?'; +} + +OPTPARSE_API +void +optparse_init(struct optparse *options, char **argv) +{ + options->argv = argv; + options->permute = 1; + options->optind = 1; + options->subopt = 0; + options->optarg = 0; + options->errmsg[0] = '\0'; +} + +static int +optparse_is_dashdash(const char *arg) +{ + return arg != 0 && arg[0] == '-' && arg[1] == '-' && arg[2] == '\0'; +} + +static int +optparse_is_shortopt(const char *arg) +{ + return arg != 0 && arg[0] == '-' && arg[1] != '-' && arg[1] != '\0'; +} + +static int +optparse_is_longopt(const char *arg) +{ + return arg != 0 && arg[0] == '-' && arg[1] == '-' && arg[2] != '\0'; +} + +static void +optparse_permute(struct optparse *options, int index) +{ + char *nonoption = options->argv[index]; + int i; + for (i = index; i < options->optind - 1; i++) + options->argv[i] = options->argv[i + 1]; + options->argv[options->optind - 1] = nonoption; +} + +static int +optparse_argtype(const char *optstring, char c) +{ + int count = OPTPARSE_NONE; + if (c == ':') + return -1; + for (; *optstring && c != *optstring; optstring++); + if (!*optstring) + return -1; + if (optstring[1] == ':') + count += optstring[2] == ':' ? 2 : 1; + return count; +} + +OPTPARSE_API +int +optparse(struct optparse *options, const char *optstring) +{ + int type; + char *next; + char *option = options->argv[options->optind]; + options->errmsg[0] = '\0'; + options->optopt = 0; + options->optarg = 0; + if (option == 0) { + return -1; + } else if (optparse_is_dashdash(option)) { + options->optind++; /* consume "--" */ + return -1; + } else if (!optparse_is_shortopt(option)) { + if (options->permute) { + int index = options->optind++; + int r = optparse(options, optstring); + optparse_permute(options, index); + options->optind--; + return r; + } else { + return -1; + } + } + option += options->subopt + 1; + options->optopt = option[0]; + type = optparse_argtype(optstring, option[0]); + next = options->argv[options->optind + 1]; + switch (type) { + case -1: { + char str[2] = {0, 0}; + str[0] = option[0]; + options->optind++; + return optparse_error(options, OPTPARSE_MSG_INVALID, str); + } + case OPTPARSE_NONE: + if (option[1]) { + options->subopt++; + } else { + options->subopt = 0; + options->optind++; + } + return option[0]; + case OPTPARSE_REQUIRED: + options->subopt = 0; + options->optind++; + if (option[1]) { + options->optarg = option + 1; + } else if (next != 0) { + options->optarg = next; + options->optind++; + } else { + char str[2] = {0, 0}; + str[0] = option[0]; + options->optarg = 0; + return optparse_error(options, OPTPARSE_MSG_MISSING, str); + } + return option[0]; + case OPTPARSE_OPTIONAL: + options->subopt = 0; + options->optind++; + if (option[1]) + options->optarg = option + 1; + else + options->optarg = 0; + return option[0]; + } + return 0; +} + +OPTPARSE_API +char * +optparse_arg(struct optparse *options) +{ + char *option = options->argv[options->optind]; + options->subopt = 0; + if (option != 0) + options->optind++; + return option; +} + +static int +optparse_longopts_end(const struct optparse_long *longopts, int i) +{ + return !longopts[i].longname && !longopts[i].shortname; +} + +static void +optparse_from_long(const struct optparse_long *longopts, char *optstring) +{ + char *p = optstring; + int i; + for (i = 0; !optparse_longopts_end(longopts, i); i++) { + if (longopts[i].shortname && longopts[i].shortname < 127) { + int a; + *p++ = longopts[i].shortname; + for (a = 0; a < (int)longopts[i].argtype; a++) + *p++ = ':'; + } + } + *p = '\0'; +} + +/* Unlike strcmp(), handles options containing "=". */ +static int +optparse_longopts_match(const char *longname, const char *option) +{ + const char *a = option, *n = longname; + if (longname == 0) + return 0; + for (; *a && *n && *a != '='; a++, n++) + if (*a != *n) + return 0; + return *n == '\0' && (*a == '\0' || *a == '='); +} + +/* Return the part after "=", or NULL. */ +static char * +optparse_longopts_arg(char *option) +{ + for (; *option && *option != '='; option++); + if (*option == '=') + return option + 1; + else + return 0; +} + +static int +optparse_long_fallback(struct optparse *options, + const struct optparse_long *longopts, + int *longindex) +{ + int result; + char optstring[96 * 3 + 1]; /* 96 ASCII printable characters */ + optparse_from_long(longopts, optstring); + result = optparse(options, optstring); + if (longindex != 0) { + *longindex = -1; + if (result != -1) { + int i; + for (i = 0; !optparse_longopts_end(longopts, i); i++) + if (longopts[i].shortname == options->optopt) + *longindex = i; + } + } + return result; +} + +OPTPARSE_API +int +optparse_long(struct optparse *options, + const struct optparse_long *longopts, + int *longindex) +{ + int i; + char *option = options->argv[options->optind]; + if (option == 0) { + return -1; + } else if (optparse_is_dashdash(option)) { + options->optind++; /* consume "--" */ + return -1; + } else if (optparse_is_shortopt(option)) { + return optparse_long_fallback(options, longopts, longindex); + } else if (!optparse_is_longopt(option)) { + if (options->permute) { + int index = options->optind++; + int r = optparse_long(options, longopts, longindex); + optparse_permute(options, index); + options->optind--; + return r; + } else { + return -1; + } + } + + /* Parse as long option. */ + options->errmsg[0] = '\0'; + options->optopt = 0; + options->optarg = 0; + option += 2; /* skip "--" */ + options->optind++; + for (i = 0; !optparse_longopts_end(longopts, i); i++) { + const char *name = longopts[i].longname; + if (optparse_longopts_match(name, option)) { + char *arg; + if (longindex) + *longindex = i; + options->optopt = longopts[i].shortname; + arg = optparse_longopts_arg(option); + if (longopts[i].argtype == OPTPARSE_NONE && arg != 0) { + return optparse_error(options, OPTPARSE_MSG_TOOMANY, name); + } if (arg != 0) { + options->optarg = arg; + } else if (longopts[i].argtype == OPTPARSE_REQUIRED) { + options->optarg = options->argv[options->optind]; + if (options->optarg == 0) + return optparse_error(options, OPTPARSE_MSG_MISSING, name); + else + options->optind++; + } + return options->optopt; + } + } + return optparse_error(options, OPTPARSE_MSG_INVALID, option); +} + +#endif /* OPTPARSE_IMPLEMENTATION */ +#endif /* OPTPARSE_H */ diff --git a/libraries/lib/libimath2-k64f.a b/libraries/lib/libimath2-k64f.a index 3bd215f83410209477d22e6cc362154122fd3daa..ac080a813c6c78ffe753bbf740ce57c6fba92ac9 100644 GIT binary patch delta 81 zcmcbScq4Iw6o-+8rLno8iRnb88aR9MI!W=3duQ^&1vba=dvGCm>m+M<;JnFk{NkHE H)%v*r$^{mK delta 81 zcmcbScq4Iw6o-MSk(r^Xsli008aR9MI!W=3duQ^&1vba=dvGCm>m+M<;JnFk{NkHE H)%v*ry=N9U diff --git a/libraries/lib/libumansi-k64f.a b/libraries/lib/libumansi-k64f.a index 414c8503362603d20c2c4a340411012fd675a34f..560a8d89ba69ff17a03a7d734b807955b44fce98 100644 GIT binary patch delta 855 zcmdmWihb89_6brPMi!RF=7uIF8oF$Ri=Z$2&d zmjkB8c=HAM1qj~s1-BR_Hc!yV;DRgIWNd<>Ut)8J%?&gWAGaMyA{W+3ZdMI=jwB+$ zoVB?wDhNsBf_%beixdZh&6^u?dIaE>f?cjtdjX+ilCi{Qnf3%^0m;pCCx{~ifO@hv ztIa~PWpl$~4}|>Y3v2!$c#|*4OH3B{t~EVRh*55`fdb2Bi|sxL=YRuh@qSJu4Ity? zP9hmUdBcCn%@Z%JM^m%u4zikt9P!P{&(0!w4QTOZf$uXAc5UA9{|u5Dz@XXwgp&~| zY+!EP4s>fCLLbnLlH31EF)l~eyhdXC5fw%oMErq#vRz)E@gz4qbhm%7VtjzmH2uLm zM)B?MT^Lz;;7TB3!hwvv{BSXlf43h@U_|rq_D5Na$UeRxFS$Lmgs~an(CrUu81Eq2 z2TEky@3b*aK)4cOU-v{tUtYL<+kx&9KyZPfkgz>s4RXM2U$BKS0%7pBeT)kbyy-w& dowmO^&NvG$W&#e3#TOaB!X0O_9q5`_Tmb1J_PziB delta 855 zcmdmWihb89_6brP2Bt=4hNdQ#8aJBEI>w*k2B~ zn#~vF7a(}k7u;f$*gQcagA1-;ld%bkeu>Q?HaE~jeB5>*iCkDCxmh*fIg*F~bJpg% zs30Vf3-Sq@Em9m1Hg9go=@Eci3U;|p?FEF6NyZYJW!e*v1td4mogj`70P4xwtTqeD zmdy=|JrMGnFRb~4;7z_DFELr*yVmqPAx62$1_~^jEw=k0oC7pWeDmV{oJbl##><^V zGJf)g|B{<0URn=VV+nS`raK5VmXjND#5XHHI}7)kCCK8<0^euA?Xujw;r|&VGk`&} z{Rt-{B5c4~KyKX*bZZ_$AJ8_*?SG{hmm_OlBeDI63Zo4?{y=UL-!8Auc#<0yx|Z8N zSTR08Xqx_D9;5j7_b!aAJa8otG2uYQUVgY3$iLeUCNQFTc>AL)Mr0pfkeA#ZTEf_j zaOn02HH>$V>;omT?RVN3Cm>u2v9Eg~qc1PqzU@GF2_U$@fJ@jOu?9I{wlCPi7=bW& j+djqx2;Ov{txnrt9cP?{5CaFs;){%5ksJqf%`7ee6SVcW diff --git a/libraries/lib/libummath-k64f.a b/libraries/lib/libummath-k64f.a index 4f471fc72fabb34d3e29b2e0c27d12530855f8f4..b478a6e6a73a3056365ef85b6c7b3ed9c4a99945 100644 GIT binary patch delta 31 fcmaDN@Hh7{d4)ji_rTo$N<5ceD0RSX1@duB-L@52TO^SbqG5Pq9%ry;qy xdS5Y;4v>%dPADLW*l8@;eCy&H4ul!!Zs{P&%UL^Zc6l-lNdy$CKi|IQ1^~>FbrJvo delta 381 zcmaFznfb|Q<_S_92Bt=4hNdQ#8Hh7{d4)ji_rTo$N<5ceD0RSX1@duB-L@52TO^SbqG5Pq9%ry;qy xdS5Y;4v>%dPADLW*l8@;eCy&H4ul!!Zs{P&%UL^Zc6l-lNdy$CKi|IQ1^{2sbcg@| diff --git a/libraries/lib/libummisc-k64f.a b/libraries/lib/libummisc-k64f.a index 7896a26a1d8cb152887abf35da971774b1cf990a..fb99e415b7a03b9cf0fa546d1d78d8e6821d8140 100644 GIT binary patch delta 45 mcmX?SaL!raeCE7v47iUe7TfmkD^ z%jXX5T9WwN#x#mX(U%&ZNn2N9TAxuspN&35eS4po`va@%owa86 zKIhE9%s1cu_CDv<-ZnSgGOvqPGjnoBWM^bOUY9Vm=DH-sv`SJ+i2o?;CrRF8@LRva~B{5XG`H`Oj0FVC8>@=Y!)wlB|6sNh;?B zEas(7^vq^yESc}|M2;lMX7(W(Hg_Z(1~4jHqrhOb*8h3sW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n%8(O*a2FioK2+C7q*{Fh~m=3&!4 zj>HRWn!}C0CGfZPne8CX-b9V?h_5zli@5$ck&bH6PJK%|$fg8;s~x;*;klD-_ksQq za2R+B`3}?Pz>X;Rzzl=*%=QFLvtHXC^1!W|;-Hh*FO!=-AP#JzvysmpQ|@|Cs!Yw( z*80XcG7D+c6e?MADK7B!IiICV<$)=ZC6v+5A(qk}p1kfWJYUP-kcA#fRFcQDY{{>A(uyiHm z`TD?tL|AWzE0oim`hq0Lg^yT&a$qNGPcj$@?I#~WV7yFdb%yZJf*mEaV>F)p3GJj5 zo|80;41UZ_ZV6BnK8qQkUrUCi`5L`@$YFZqQrdY7n8JL@xXhw9pIz+8fslV55iat> z`~D=6@2#mj`4r9in%bbq_H6*e_yUGB@%4%|B?R%P&KbX From 5a59ff2f96064433b95b8489dbe7e9b175b0accc Mon Sep 17 00:00:00 2001 From: Philip Smart Date: Sat, 21 Aug 2021 16:37:28 +0100 Subject: [PATCH 2/2] Updates to ignore --- .gitignore | 13 +++++++++++++ libraries/lib/libimath2-k64f.a | Bin 12504 -> 12504 bytes libraries/lib/libumansi-k64f.a | Bin 124218 -> 124218 bytes libraries/lib/libummath-k64f.a | Bin 2660 -> 2660 bytes libraries/lib/libummathf-k64f.a | Bin 63972 -> 63972 bytes libraries/lib/libummisc-k64f.a | Bin 6222 -> 6222 bytes libraries/lib/libumstdio-k64f.a | Bin 80050 -> 80050 bytes 7 files changed, 13 insertions(+) diff --git a/.gitignore b/.gitignore index a0fc8e1..7a3cae8 100644 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,17 @@ zputa/*.i zputa/*.ii zputa/*.s zOS/main.save +.dobuild +SD/ +common/osd.sav.c +frdm/ +frdmk64f_usb_msd_host_bootloader_mcux.zip +frdmk64f_usb_msd_host_bootloader_mcux/ +getopt_long.c +minicom.cap +rrrr +startup/app_zos_zpu.tmpl2 +startup/app_zos_zpu.tmpl3 +tzio/ +zOS/main.bak diff --git a/libraries/lib/libimath2-k64f.a b/libraries/lib/libimath2-k64f.a index ac080a813c6c78ffe753bbf740ce57c6fba92ac9..6286f93d9afcd2f6ea4d0a0f10e12aa5b165ece8 100644 GIT binary patch delta 76 zcmcbScq4IwG`pp#skwoLOHbvGeu{p%%CaQps+fIbQg*B3!RRdli1O%9~ zHrGW3BLptUCv3JzafDmBxgn=l0A?H5xjMBM;mRi&OKg^DPekHNZk{_q0?r3&$l9zn z3t|4|hQ*$6+07T${DpHSUyzrWEbv`xdY%xY+++gwZH~c?~&<_lX?N2xv5n%yy z;&z}D^WmC+PLtgJSBh~3lFl^}+mEO)+QOp=OHbvGeu{p%%CaQps+fIbQg*B3!RRdli1O%9~ zHrGW3BLptUCv3JzafDmBxgn=l0A?H5xjMBM;mRi&OKg^DPekHNZk{_q0?r3&$l9zn z3t|4|hQ*$6+07T${DpHSUyzrWEbv`xdY%xY+++gwZH~c?~&<_lX?N2xv5n%yy z;&z}D^WmC+PLtgJSBh~3lFl^}+mEO)+QOp=rt!fA)~%P={D}W3TwwD$xlT@) z>}ETSiEz&3b#fA$-x+Gc1vblB-$Zc!x%}jX>-!gE2bcS~ZkUjipWXU_S+Emx8_M`$hE0~Ume|ZRVJTe2=5;fl!Z~2&8yA1$hAH2?Zv9%gZzkJmNN%p) vSAtLu@&w-rMTCHz#*)pqF23b}>pyo(7a=QW?X=nD$#jGOC;)%Hea#I3`loRo delta 358 zcmaFznfb|Q<_Xg57M8~5h9)K(m1G%V?8*OJ#5cz>rt!fA)~%P={D}W3TwwD$xlT@) z>}ETSiEz&3b#fA$-x+Gc1vblB-$Zc!x%}jX>-!gE2bcS~ZkUjipWXU_S+Emx8_M`$hE0~Ume|ZRVJTe2=5;fl!Z~2&8yA1$hAH2?Zv9%gZzkJmNN%p) vSAtLu@&w-rMTCHz#*)pqF23b}>pyo(7a=QW?X=nD$#jGOC;)%Hea#I3ng?){ diff --git a/libraries/lib/libummisc-k64f.a b/libraries/lib/libummisc-k64f.a index fb99e415b7a03b9cf0fa546d1d78d8e6821d8140..a4bec12f6bc083a08b417ff1937419d4742cafc3 100644 GIT binary patch delta 42 lcmX?SaL!1AmZqlW1{RhZm5LdmY>UYsf+aR@Vf5rh5)j`k&3}joNkC%rA8A!& z6=Iw1G@rxF1DPSd+1Yg&A56>U55Z{4jS|ge;Iaj^bGcz0uwL!XG-T_dCfmudZT>O! zC``~2tm^inZKwk4*B^s93Zi22-ctw_1+@~JYfeps*#uFceN7Fa0_5!cM@6V+{C_Wm uszU!y5Q@O|`5cT$N(ySlx1SebRN{jA2yD-GetE_+WL*;5muNHc@d5zm27XQe delta 394 zcmdn=k!90ImI>1A7M8~5h9;&Pm5LdmY?H|!f+aR@Vf5rh5)j`k&3}joNkC%rA8A!& z6=Iw1G@rxF1DPSd+1Yg&A56>U55Z{4jS|ge;Iaj^bGcz0uwL!XG-T_dCfmudZT>O! zD6*jV=G%+5p$e>De+=1C;+rS$J%vzFP%E*y=F~(qo35!LRDhhF|ELJnjQ{V2U@A<( tj?@1Wgd(tgJ_jR`l7d?C?dL@pmAIfj0&CjNFV9$ptV?415^Y94UI2EeeZ2qx