From e94becff75f4527bdef7b101f35c724e3e061b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Tue, 22 Apr 2014 10:44:56 +0000 Subject: [PATCH] added to QtCreator --- BaS_gcc.config | 1 + BaS_gcc.creator | 1 + BaS_gcc.files | 230 +++++++++++++++++++++++++++++++++++++++++++++++ BaS_gcc.includes | 2 + sys/cache.c | 82 ++++++++++------- sys/interrupts.c | 6 +- sys/sysinit.c | 2 +- 7 files changed, 290 insertions(+), 34 deletions(-) create mode 100644 BaS_gcc.config create mode 100644 BaS_gcc.creator create mode 100644 BaS_gcc.files create mode 100644 BaS_gcc.includes diff --git a/BaS_gcc.config b/BaS_gcc.config new file mode 100644 index 0000000..8cec188 --- /dev/null +++ b/BaS_gcc.config @@ -0,0 +1 @@ +// ADD PREDEFINED MACROS HERE! diff --git a/BaS_gcc.creator b/BaS_gcc.creator new file mode 100644 index 0000000..e94cbbd --- /dev/null +++ b/BaS_gcc.creator @@ -0,0 +1 @@ +[General] diff --git a/BaS_gcc.files b/BaS_gcc.files new file mode 100644 index 0000000..6b516fa --- /dev/null +++ b/BaS_gcc.files @@ -0,0 +1,230 @@ +dma/dma.c +dma/MCD_dmaApi.c +dma/MCD_tasks.c +dma/MCD_tasksInit.c +exe/basflash.c +exe/basflash_start.c +firebee/bas.elf +firebee/bas.lk +firebee/bas.map +firebee/bas.s19 +firebee/basflash.elf +firebee/basflash.map +firebee/basflash.s19 +firebee/bashflash.lk +firebee/depend +firebee/libbas.a +firebee/ram.elf +firebee/ram.lk +firebee/ram.map +firebee/ram.s19 +flash/flash.c +flash/s19reader.c +fs/cc932.c +fs/cc936.c +fs/cc949.c +fs/cc950.c +fs/ccsbcs.c +fs/ff.c +fs/unicode.c +if/driver_vec.c +include/acia.h +include/am79c874.h +include/arp.h +include/ati_ids.h +include/bas_printf.h +include/bas_string.h +include/bas_types.h +include/bas_utils.h +include/bcm5222.h +include/bootp.h +include/cache.h +include/diskio.h +include/dma.h +include/driver_mem.h +include/driver_vec.h +include/edid.h +include/ehci.h +include/eth.h +include/exceptions.h +include/fb.h +include/fec.h +include/fecbd.h +include/ff.h +include/ffconf.h +include/firebee.h +include/i2c-algo-bit.h +include/i2c.h +include/icmp.h +include/ikbd.h +include/interrupts.h +include/ip.h +include/m54455.h +include/m5484l.h +include/MCD_dma.h +include/mcd_initiators.h +include/MCD_progCheck.h +include/MCD_tasksInit.h +include/MCF5475.h +include/MCF5475_CLOCK.h +include/MCF5475_CTM.h +include/MCF5475_DMA.h +include/MCF5475_DSPI.h +include/MCF5475_EPORT.h +include/MCF5475_FBCS.h +include/MCF5475_FEC.h +include/MCF5475_GPIO.h +include/MCF5475_GPT.h +include/MCF5475_I2C.h +include/MCF5475_INTC.h +include/MCF5475_MMU.h +include/MCF5475_PAD.h +include/MCF5475_PCI.h +include/MCF5475_PCIARB.h +include/MCF5475_PSC.h +include/MCF5475_SDRAMC.h +include/MCF5475_SEC.h +include/MCF5475_SIU.h +include/MCF5475_SLT.h +include/MCF5475_SRAM.h +include/MCF5475_USB.h +include/MCF5475_XLB.h +include/mmu.h +include/mod_devicetable.h +include/nbuf.h +include/net.h +include/net_timer.h +include/nif.h +include/ohci.h +include/part.h +include/pci.h +include/pci_ids.h +include/queue.h +include/radeon_reg.h +include/radeonfb.h +include/s19reader.h +include/screen.h +include/sd_card.h +include/startcf.h +include/sysinit.h +include/tftp.h +include/udp.h +include/usb.h +include/usb_defs.h +include/user_io.h +include/util.h +include/version.h +include/videl.h +include/video.h +include/wait.h +include/x86debug.h +include/x86decode.h +include/x86emu.h +include/x86emui.h +include/x86fpu.h +include/x86fpu_regs.h +include/x86ops.h +include/x86pcibios.h +include/x86prim_asm.h +include/x86prim_ops.h +include/x86regs.h +include/xhdi_sd.h +kbd/ikbd.c +m54455/bas.elf +m54455/bas.lk +m54455/bas.map +m54455/bas.s19 +m54455/basflash.elf +m54455/basflash.map +m54455/basflash.s19 +m54455/bashflash.lk +m54455/depend +m54455/libbas.a +m54455/ram.elf +m54455/ram.lk +m54455/ram.map +m54455/ram.s19 +m5484lite/bas.elf +m5484lite/bas.lk +m5484lite/bas.map +m5484lite/bas.s19 +m5484lite/basflash.elf +m5484lite/basflash.map +m5484lite/basflash.s19 +m5484lite/bashflash.lk +m5484lite/depend +m5484lite/libbas.a +m5484lite/ram.elf +m5484lite/ram.lk +m5484lite/ram.map +m5484lite/ram.s19 +net/am79c874.c +net/arp.c +net/bcm5222.c +net/bootp.c +net/fec.c +net/fecbd.c +net/ip.c +net/nbuf.c +net/net_timer.c +net/nif.c +net/queue.c +net/tftp.c +net/udp.c +nutil/s19header +nutil/s19header.c +pci/ehci-hcd.c +pci/ohci-hcd.c +pci/pci.c +radeon/radeon_accel.c +radeon/radeon_base.c +radeon/radeon_cursor.c +radeon/radeon_monitor.c +spi/dspi.c +spi/mmc.c +spi/sd_card.c +sys/BaS.c +sys/cache.c +sys/driver_mem.c +sys/exceptions.S +sys/fault_vectors.c +sys/init_fpga.c +sys/interrupts.c +sys/mmu.c +sys/startcf.S +sys/sysinit.c +usb/usb.c +usb/usb_mouse.c +util/bas_printf.c +util/bas_string.c +util/printf_helper.S +util/wait.c +video/fbmem.c +video/fbmodedb.c +video/fbmon.c +video/fnt_st_8x16.c +video/offscreen.c +video/vdi_fill.c +video/videl.c +video/video.c +x86emu/x86biosemu.c +x86emu/x86debug.c +x86emu/x86decode.c +x86emu/x86fpu.c +x86emu/x86ops.c +x86emu/x86ops2.c +x86emu/x86pcibios.c +x86emu/x86prim_ops.c +x86emu/x86sys.c +xhdi/xhdi_interface.c +xhdi/xhdi_sd.c +xhdi/xhdi_vec.S +bas.lk.in +bas_firebee.bdm +bas_m5484.bdm +basflash.lk.in +check.bdm +COPYING +COPYING.LESSER +dump.bdm +mcf5474.gdb \ No newline at end of file diff --git a/BaS_gcc.includes b/BaS_gcc.includes new file mode 100644 index 0000000..14c8de5 --- /dev/null +++ b/BaS_gcc.includes @@ -0,0 +1,2 @@ +~/Dokumente/Development/workspace/BaS_gcc/include +/usr/m68k-elf/include diff --git a/sys/cache.c b/sys/cache.c index 3130ab7..69326ea 100644 --- a/sys/cache.c +++ b/sys/cache.c @@ -81,25 +81,35 @@ void flush_icache_range(void *address, size_t size) if (start_set > end_set) { /* from the begining to the lowest address */ for (set = 0; set <= end_set; set += (0x10 - 3)) { - asm volatile("cpushl ic,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl ic,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl ic,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl ic,(%0)" : "=a" (set) : "a" (set)); + __asm__ __volatile__( + " cpushl ic,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl ic,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl ic,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl ic,(%[set]) \n\t" + : /* output parameters */ + : [set] "a" (set) /* input parameters */ + : + ); } /* next loop will finish the cache ie pass the hole */ end_set = LAST_ICACHE_ADDR; } for (set = start_set; set <= end_set; set += (0x10 - 3)) { - asm volatile("cpushl ic,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl ic,(%0)\n\t" - "addq%.l #1,%0\n\t" - "cpushl ic,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl ic,(%0)" : "=a" (set) : "a" (set)); + __asm__ __volatile__( + " cpushl ic,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl ic,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl ic,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl ic,(%[set])" + : /* output parameters */ + : [set] "a" (set) + : + ); } } @@ -121,25 +131,37 @@ void flush_dcache_range(void *address, size_t size) if (start_set > end_set) { /* from the begining to the lowest address */ - for (set = 0; set <= end_set; set += (0x10 - 3)) { - asm volatile("cpushl dc,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl dc,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl dc,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl dc,(%0)" : "=a" (set) : "a" (set)); + for (set = 0; set <= end_set; set += (0x10 - 3)) + { + __asm__ __volatile__( + " cpushl dc,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl dc,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl dc,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl dc,(%[set]) \n\t" + : /* output parameters */ + : [set] "a" (set) + : /* clobbered registers */ + ); } /* next loop will finish the cache ie pass the hole */ end_set = LAST_DCACHE_ADDR; } - for (set = start_set; set <= end_set; set += (0x10 - 3)) { - asm volatile("cpushl dc,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl dc,(%0)\n\t" - "addq%.l #1,%0\n\t" - "cpushl dc,(%0)\n\t" - "addq.l #1,%0\n\t" - "cpushl dc,(%0)" : "=a" (set) : "a" (set)); + for (set = start_set; set <= end_set; set += (0x10 - 3)) + { + __asm__ __volatile__( + " cpushl dc,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl dc,(%[set]) \n\t" + " addq%.l #1,%[set] \n\t" + " cpushl dc,(%[set]) \n\t" + " addq.l #1,%[set] \n\t" + " cpushl dc,(%[set]) \n\t" + : /* output parameters */ + : [set] "a" (set) + : /* clobbered registers */ + ); } } diff --git a/sys/interrupts.c b/sys/interrupts.c index eb08184..31f7b44 100644 --- a/sys/interrupts.c +++ b/sys/interrupts.c @@ -313,9 +313,9 @@ void video_addr_timeout(void) MCF_MMU_MMUOR_UAA; NOP(); - dst = 0x60000000 + addr; - src = addr; - while (dst < 0x60000000 + addr + 0x10000) + dst = (uint32_t *) 0x60000000 + addr; + src = (uint32_t *) addr; + while (dst < (uint32_t *) 0x60000000 + addr + 0x10000) { *dst++ = *src++; *dst++ = *src++; diff --git a/sys/sysinit.c b/sys/sysinit.c index 2c18f88..7235d99 100644 --- a/sys/sysinit.c +++ b/sys/sysinit.c @@ -1055,7 +1055,7 @@ void initialize_hardware(void) /* * Determine the processor revision */ - xprintf(" (revision %d)\r\n",((MCF_SIU_JTAGID & MCF_SIU_JTAGID_REV) >> 28)); + xprintf(" (revision %d)\r\n", ((MCF_SIU_JTAGID & MCF_SIU_JTAGID_REV) >> 28)); init_slt(); init_fbcs();