Remove unused file

This commit is contained in:
YohannDR 2022-09-24 17:42:25 +02:00
parent 3aed436ebb
commit a5593bb34c
2 changed files with 0 additions and 53 deletions

View File

@ -124,9 +124,6 @@ $(ELF) $(MAP): $(OBJ) linker.ld
$(MSG) CC $@
$Q$(CPP) $(CPPFLAGS) $< | $(CC) -o $@ $(CFLAGS) && printf '\t.align 2, 0 @ dont insert nops\n' >> $@
data/data_0x0808c71c.s: data/data.txt
$(MSG) EXTRACT $@
$Q./tools/gen_data.pl 0x0808c71c 0x08800000 $(BASEROM) <$< >$@
src/sram/%.s: CFLAGS = -O1 -mthumb-interwork -fhex-asm
src/sram/%.s: src/sram/%.c

View File

@ -1,50 +0,0 @@
#!/usr/bin/env perl
use warnings;
use strict;
use constant USAGE => "Usage: $0 START END ROM <data.txt\n";
use constant OFFSET => 0x08000000;
my $start = shift or die(USAGE);
my $end = shift or die(USAGE);
my $rom = shift or die(USAGE);
hex($end) > hex($start)
or die(USAGE);
-f $rom
or die("Cannot find '$rom'\n");
my $first_addr = hex($start) - OFFSET;
my %labels = ($first_addr => "");
while (<>) {
s/^\s+//;
s/\s+$//;
s/\s*#.*$//;
next if /^$/;
/^(0x[\da-fA-F]{8})\s+(\w+)$/
or die("failed to parse line '$_'\n");
my $addr = hex($1);
my $label = $2;
$labels{$addr} = $label;
}
my $last_addr = $first_addr;
for my $addr (sort keys %labels) {
my $label = $labels{$addr};
next if $label eq "";
my $size = $addr - $last_addr;
print(".incbin \"$rom\", $last_addr, $size\n") if $size;
print("$label:\n");
$last_addr = $addr;
}
my $size = hex($end) - OFFSET - $last_addr;
print(".incbin \"$rom\", $last_addr, $size\n");