more configuratble blit rom
This commit is contained in:
parent
417095d2c0
commit
6f04a9bd73
@ -5,8 +5,14 @@
|
||||
*/
|
||||
|
||||
|
||||
#define HRES 1280 // FIXME : should be generated
|
||||
#ifndef HRES
|
||||
#define HRES 1280
|
||||
#warning "Using default HRES"
|
||||
#endif
|
||||
#ifndef VRES
|
||||
#define VRES 1024
|
||||
#warning "Using default VRES"
|
||||
#endif
|
||||
#define BASE_FB 0x8FE00000 // FIXME : should be generated ; 2+ MiB of SDRAM as framebuffer
|
||||
|
||||
#define BASE_ROM 0x00410000 // FIXME : should be generated ; 4-64 KiB of Wishbone ROM ? ; also in the LDS file ; also in the Vex config
|
||||
@ -369,7 +375,7 @@ struct cg6_fbc {
|
||||
void from_reset(void) __attribute__ ((noreturn)); // nothrow,
|
||||
|
||||
static inline void flush_cache(void) {
|
||||
//asm volatile(".word 0x0000500F\n"); // flush the Dcache so that we get updated data
|
||||
asm volatile(".word 0x0000500F\n"); // flush the Dcache so that we get updated data
|
||||
}
|
||||
|
||||
typedef unsigned int unsigned_param_type;
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
HRES=${1:-1280}
|
||||
VRES=${2:-1024}
|
||||
|
||||
GCCDIR=~/LITEX/riscv64-unknown-elf-gcc-10.1.0-2020.08.2-x86_64-linux-ubuntu14
|
||||
GCCPFX=riscv64-unknown-elf-
|
||||
GCCLINK=${GCCDIR}/bin/${GCCPFX}gcc
|
||||
@ -17,8 +20,8 @@ OPT=-Os #-fno-inline
|
||||
ARCH=rv32i_zba_zbb_zbt
|
||||
|
||||
if test "x$1" != "xASM"; then
|
||||
$GCC $OPT -S -o blit.s -march=$ARCH -mabi=ilp32 -mstrict-align -fno-builtin-memset -nostdlib -ffreestanding -nostartfiles blit.c
|
||||
$GCC $OPT -S -o blit.s -DHRES=${HRES} -DVRES=${VRES} -march=$ARCH -mabi=ilp32 -mstrict-align -fno-builtin-memset -nostdlib -ffreestanding -nostartfiles blit.c
|
||||
fi
|
||||
$GCC $OPT -c -o blit.o -march=$ARCH -mabi=ilp32 -mstrict-align -fno-builtin-memset -nostdlib -ffreestanding -nostartfiles blit.s &&
|
||||
$GCCLINK $OPT -o blit -march=$ARCH -mabi=ilp32 -T blit.lds -nostartfiles blit.o &&
|
||||
$GCC $OPT -c -o blit.o -DHRES=${HRES} -DVRES=${VRES} -march=$ARCH -mabi=ilp32 -mstrict-align -fno-builtin-memset -nostdlib -ffreestanding -nostartfiles blit.s &&
|
||||
$GCCLINK $OPT -o blit -DHRES=${HRES} -DVRES=${VRES} -march=$ARCH -mabi=ilp32 -T blit.lds -nostartfiles blit.o &&
|
||||
$OBJCOPY -O binary -j .text -j .rodata blit blit.raw
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user