⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makelo.c

📁 AT91所有开发板的资料 AT91所有开发板的资料
💻 C
📖 第 1 页 / 共 2 页
字号:
/* -*-C-*- * * Copyright (c) 1996 Advanced RISC Machines Limited * All Rights Reserved * * $Revision: 1.4 $ *   $Author: asims $ *     $Date: 1999/11/12 15:38:09 $ * * makelo.c - This file is part of the Angel build world. It is used * to construct the assembler manifests source file. This ensures that * we only need to maintain a single copy of important definitions, * with this program being used to automatically build the target * header, if the 'C' source headers change. * * It is unfortunate that we need to keep this file up-to-date by * hand. However, the assembler values will always match the 'C' * definitions... and the build will fail if a definition required by * assembler code has not been added to this file. */#include <stdio.h>#include <time.h>#include <errno.h>/* The following are the Angel headers from which we take information: */#include "angel.h"#include "devconf.h"#include "adp.h"#include "arm.h"#include "devices.h"#include "serlock.h"#include "serial.h"#include "support.h"#include "logging.h"#include "evaluator.h"#define maxstring       (256)int main(int argc, char **argv){    time_t tval = time(NULL);   /* seconds since "January 1st 1970 GMT" */    struct tm *timeptr;         /* full time structure */    FILE *outfile = stdout;     /* in-case we want to add code to write                                 * to a specified file */    char buffer[maxstring];     /* temporary string construction buffer */    char *tptr;                 /* temporary string pointer */    int index;                  /* general index counter */    timeptr = gmtime(&tval);    /*     * some sanity checks on configuration parameters     */    if (DE_NUM_INT_HANDLERS != IH_NUM_DEVICES)    {        fprintf(stderr,                "ERROR: DE_NUM_INT_HANDLERS (%d) != IH_NUM_DEVICES (%d)\n",                DE_NUM_INT_HANDLERS, IH_NUM_DEVICES);        return 1;    }    /* Check for a command line parameter, and if so, use as the output file */    if (argc > 1)    {        if ((outfile = fopen(argv[1], "w")) <= (FILE *) 0)            outfile = stdout;    }    /*     * output the file header     */    fprintf(outfile, "\tTTL Automatically generated by \"%s\"\n", argv[0]);    fprintf(outfile, "\t; Do not edit this file directly. Changes made to the 'C' header\n");    fprintf(outfile, "\t; files will force this file to be re-built by the make process.\n");    fprintf(outfile, "\tASSERT\t(listopts_s)\t; ensure listopt.s included\n");    fprintf(outfile, "old_opt\tSETA\t{OPT}\n");    fprintf(outfile, "\tOPT\t(opt_off)\n\n");    fprintf(outfile, "\t\tGBLL\tlolevel_s\n");    fprintf(outfile, "lolevel_s\tSETL\t{TRUE}\n\n");    /* need platform.s includes */    fprintf(outfile, "\n\t\tGET\tbits.s\n");    fprintf(outfile, "\n\t\tGET\tsizes.s\n");    fprintf(outfile, "\n\t\tGET\tmmu_h.s\n");    fprintf(outfile, "\n\t\tGET\tplatform.s\n");    fprintf(outfile, "\nIRQDisable\t\tEQU\t0x%08X\n", IRQDisable);    fprintf(outfile, "FIQDisable\t\tEQU\t0x%08X\n", FIQDisable);    fprintf(outfile, "InterruptMask\t\tEQU\t0x%08X\n", InterruptMask);    fprintf(outfile, "ModeMask\t\tEQU\t0x%08X\n", ModeMask);    fprintf(outfile, "ModeMaskUFIS\t\tEQU\t0x%08X\n", ModeMaskUFIS);    fprintf(outfile, "USRmode\t\t\tEQU\t0x%08X\n", USRmode);    fprintf(outfile, "SYSmode\t\t\tEQU\t0x%08X\n", SYSmode);    fprintf(outfile, "SVCmode\t\t\tEQU\t0x%08X\n", SVCmode);    fprintf(outfile, "IRQmode\t\t\tEQU\t0x%08X\n", IRQmode);    fprintf(outfile, "FIQmode\t\t\tEQU\t0x%08X\n", FIQmode);    fprintf(outfile, "ABTmode\t\t\tEQU\t0x%08X\n", ABTmode);    fprintf(outfile, "UNDmode\t\t\tEQU\t0x%08X\n", UNDmode);    fprintf(outfile, "USR26mode\t\tEQU\t0x%08X\n", USR26mode);    fprintf(outfile, "IRQ26mode\t\tEQU\t0x%08X\n", IRQ26mode);    fprintf(outfile, "SVC26mode\t\tEQU\t0x%08X\n", SVC26mode);    fprintf(outfile, "cond_EQ\t\t\tEQU\t0x%08X\n", cond_EQ);    fprintf(outfile, "cond_mask\t\tEQU\t0x%08X\n", cond_mask);    fprintf(outfile, "Tbit\t\t\tEQU\t0x%08X\n\n", Tbit);    fprintf(outfile, "vec_reset\t\t\tEQU\t0x%08X\n", vec_reset);    fprintf(outfile, "vec_undefined_instruction\tEQU\t0x%08X\n",            vec_undefined_instruction);    fprintf(outfile, "vec_SWI\t\t\t\tEQU\t0x%08X\n", vec_SWI);    fprintf(outfile, "vec_prefetch_abort\t\tEQU\t0x%08X\n", vec_prefetch_abort);    fprintf(outfile, "vec_data_abort\t\t\tEQU\t0x%08X\n", vec_data_abort);    fprintf(outfile, "vec_unused\t\t\tEQU\t0x%08X\n", vec_unused);    fprintf(outfile, "vec_IRQ\t\t\t\tEQU\t0x%08X\n", vec_IRQ);    fprintf(outfile, "vec_FIQ\t\t\t\tEQU\t0x%08X\n", vec_FIQ);    fprintf(outfile, "\nangel_BreakPointInstruction_ARM\t\tEQU\t0x%08X\n",            angel_BreakPointInstruction_ARM);    fprintf(outfile, "angel_BreakPointInstruction_THUMB\tEQU\t0x%08X\n",            angel_BreakPointInstruction_THUMB);    fprintf(outfile, "angel_SWI_ARM\t\t\t\tEQU\t0x%08X\n", angel_SWI_ARM);    fprintf(outfile, "angel_SWI_THUMB\t\t\t\tEQU\t0x%08X\n", angel_SWI_THUMB);    fprintf(outfile, "angel_SWIreason_CLibBase\t\tEQU\t0x%08X\n",            angel_SWIreason_CLibBase);    fprintf(outfile, "angel_SWIreason_CLibLimit\t\tEQU\t0x%08X\n",            angel_SWIreason_CLibLimit);    fprintf(outfile, "angel_SWIreasonLimit\t\t\tEQU\t0x%08X\n",            angel_SWIreasonLimit);    fprintf(outfile, "angel_SWIreason_EnterSVC\t\tEQU\t0x%08X\n",            angel_SWIreason_EnterSVC);    fprintf(outfile, "angel_SWIreason_ReportException\t\tEQU\t0x%08X\n",            angel_SWIreason_ReportException);    fprintf(outfile, "angel_SWIreason_ApplDevice\t\tEQU\t0x%08X\n",            angel_SWIreason_ApplDevice);    fprintf(outfile, "angel_SWIreason_LateStartup\t\tEQU\t0x%08X\n",            angel_SWIreason_LateStartup);    fprintf(outfile, "angel_SWIreason_SysElapsed\t\tEQU\t0x%08X\n",            SYS_ELAPSED);    fprintf(outfile, "angel_SWIreason_SysTickFreq\t\tEQU\t0x%08X\n",            SYS_TICKFREQ);    fprintf(outfile, "AL_CONTINUE\t\tEQU\t0x%08X\n", AL_CONTINUE);    fprintf(outfile, "AL_BLOCK\t\tEQU\t0x%08X\n", AL_BLOCK);    /* Debug DRAM Area defines for Assembler *///    fprintf(outfile, "DEBUG_BASE\t\tEQU\t0x%08X\n", DEBUG_BASE);//    fprintf(outfile, "DEBUG_SIZE\t\tEQU\t0x%08X\n", DEBUG_SIZE);    fprintf(outfile, "BRANCH_TO_HIGH_ROM_ON_RESET\t\tEQU\t0x%08X\n",            BRANCH_TO_HIGH_ROM_ON_RESET);    fprintf(outfile, "Angel_RegBlockSize\t\tEQU\t0x%08X\n", sizeof(angel_RegBlock));    fprintf(outfile, "RB_NumRegblocks\t\t\tEQU\t0x%08X\n", RB_NumRegblocks);    fprintf(outfile, "AngelInterruptMask\t\t\tEQU\t0x%08X\n", AngelInterruptMask);    fprintf(outfile, "NotAngelInterruptMask\t\t\tEQU\t0x%08X\n", NotAngelInterruptMask);    {        angel_TaskQueueItem *tqi = 0;        fprintf(outfile, "TQI_Type\t\t\tEQU\t%8d\n", (int)(&(tqi->type)));        /* fprintf(outfile, "TQI_Priority\t\t\tEQU\t%8d\n", (int)(& (tqi->priority))  ); */        fprintf(outfile, "TQI_Name\t\tEQU\t%8d\n", (int)(&(tqi->n.n_name)));        fprintf(outfile, "TQI_SignalWaiting\t\tEQU\t%8d\n", (int)(&(tqi->signalWaiting)));        fprintf(outfile, "TQI_State\t\tEQU\t%8d\n", (int)(&(tqi->state)));        fprintf(outfile, "TQI_RB\t\tEQU\t%8d\n", (int)(&(tqi->rb)));    }    fprintf(outfile, "TS_Undefined\t\t\tEQU\t0x%08X\n", (int)TS_Undefined);    fprintf(outfile, "TS_Defined\t\t\tEQU\t0x%08X\n", (int)TS_Defined);    fprintf(outfile, "TS_Runnable\t\t\tEQU\t0x%08X\n", (int)TS_Runnable);    fprintf(outfile, "TS_Running\t\tEQU\t0x%08X\n", (int)TS_Running);    fprintf(outfile, "TS_Blocked\t\tEQU\t0x%08X\n", (int)TS_Blocked);    fprintf(outfile, "LOG_SERLASM\t\t\tEQU\t0x%08X\n", (int)LOG_SERLASM);    fprintf(outfile, "LOG_EXCEPT\t\t\tEQU\t0x%08X\n", (int)LOG_EXCEPT);    /* regblock array indexes */    fprintf(outfile, "RB_Interrupted\t\t\tEQU\t0x%08X\n", (int)RB_Interrupted);    fprintf(outfile, "RB_SWI\t\t\t\tEQU\t0x%08X\n", (int)RB_SWI);    fprintf(outfile, "RB_UNDEF\t\t\tEQU\t0x%08X\n", (int)RB_UNDEF);    fprintf(outfile, "RB_ABORT\t\t\t\tEQU\t0x%08X\n", (int)RB_ABORT);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -