From 46c2da693c209e1004e69abc7aea0752ef249940 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 6 Jun 2018 16:18:49 +0200 Subject: tools: Remove nios2gen All tools should be removed from the RTEMS source repository at some point in time. Tools with a BSD-style license will be moved to the RTEMS tools repository. Unfortunately, the this tool is RTEMS GPL licensed. If users of this tool still exist, they can reimplement the functionality using a BSD-style license and add it to the RTEMS tools. Close #3444. --- tools/cpu/nios2/linkcmds.c | 120 --------------------------------------------- 1 file changed, 120 deletions(-) delete mode 100644 tools/cpu/nios2/linkcmds.c (limited to 'tools/cpu/nios2/linkcmds.c') diff --git a/tools/cpu/nios2/linkcmds.c b/tools/cpu/nios2/linkcmds.c deleted file mode 100644 index 8ed0ddbff7..0000000000 --- a/tools/cpu/nios2/linkcmds.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#include -#include -#include - -#include "ptf.h" -#include "devices.h" -#include "output.h" /* is_not_connected, fwrite_value, etc */ -#include "memory.h" -#include "linkcmds.h" - -typedef struct -{ - FILE *file; - struct ptf *cfg, *cpu; - device_desc *devices; - memory_desc *memory; -} -lcmd_desc; - -void fwrite_lcmds_section(struct ptf_item *pi, void *arg) -{ - lcmd_desc *li = (lcmd_desc *)arg; - struct ptf *p; - struct ptf_item lpi; - char *location = NULL; - char *section_name = pi->item[1]->value; - - if(section_name == 0) - { - fprintf(stderr, "Found a LINKER/SECTION without name, ignoring it.\n"); - return; - }; - - p = ptf_find(pi->item[1]->sub, &lpi, item, "LOCATION", 0); - if(p) - { - location = p->value; - } - else - { - if(strcmp(section_name, "entry") == 0) - { - p = ptf_find(li->cpu, &lpi, item, "reset_slave", 0); - } - else if(strcmp(section_name, "exceptions") == 0) - { - p = ptf_find(li->cpu, &lpi, item, "exc_slave", 0); - }; - if(p) location = p->value; - /* TODO: This doesn't work yet, parse full slave address, translate into our naming */ - } - - if(location == 0) - { - fprintf(stderr, "No LOCATION configured for section '%s'!\n", pi->item[1]->value); - return; - }; - - fprintf(li->file, " .%s :\n {\n", pi->item[1]->value); - fprintf(li->file, pi->item[2]->value); - fprintf(li->file, " } > %s\n\n", location); -} - -void fwrite_linkcmds_file(FILE *file, struct ptf *cfg, struct ptf *cpu, device_desc *devices, memory_desc *memory) -{ - struct ptf *p; - struct ptf_item pi; - memory_desc *tmd; - lcmd_desc linfo; - - struct ptf ptlink = { section, "LINKCMDS", 0, 0, 0 }; - struct ptf ptleadtext = { item, "LEADTEXT", 0, 0, 0 }; - struct ptf ptepilog = { item, "EPILOG", 0, 0, 0 }; - struct ptf_item malihead = { 2, &ptlink, &ptleadtext }; - struct ptf_item maliepil = { 2, &ptlink, &ptepilog }; - - struct ptf ptsect = { section, "SECTION", 0, 0, 0 }; - struct ptf ptcmds = { item, "COMMANDS", 0, 0, 0 }; - struct ptf ptstabs = { item, "STABS", 0, 0, 0 }; - struct ptf_item malisect = { 3, &ptlink, &ptsect, &ptcmds }; - struct ptf_item malistabs = { 2, &ptlink, &ptstabs }; - - linfo.cfg = cfg; - linfo.cpu = cpu; - linfo.file = file; - linfo.devices = devices; - linfo.memory = memory; - - ptf_match(cfg, &malihead, fwrite_value, file); - - fprintf(file, "MEMORY\n{\n"); - for(tmd = linfo.memory; tmd; tmd = tmd->next) - { - fprintf(file, " %s : ORIGIN = 0x%08X, LENGTH = 0x%08X\n", tmd->dev->cfgname, tmd->base, tmd->size); - } - fprintf(file, "}\n\nSECTIONS\n{\n"); - - ptf_match(cfg, &malisect, fwrite_lcmds_section, &linfo); - ptf_match(cfg, &malistabs, fwrite_value, file); - - for(tmd = linfo.memory; tmd; tmd = tmd->next) - { - fprintf(file, " %s : ORIGIN = 0x%08X, LENGTH = 0x%08X\n", tmd->dev->cfgname, tmd->base, tmd->size); - } - - - fprintf(file, "}\n\n"); - - ptf_match(cfg, &maliepil, fwrite_value, file); -} - - -- cgit v1.2.3