Made compiler more picky by adding -Wall to CFLAGS.
This showed up more warnings where some are already fixed.
This commit is contained in:
@@ -39,14 +39,9 @@
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.linuxtools.internal.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@@ -57,6 +52,9 @@
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.1369935770" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1544284446" isAbstract="false" osList="all"/>
|
||||
<builder buildPath="${workspace_loc:/BaS_GNU}" id="cdt.managedbuild.builder.gnu.cross.2120667679" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1136616288" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.2090138476" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.359669870" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="cdt.managedbuild.toolchain.gnu.cross.base.500844171.756690686.Makefile" name="Makefile" rcbsApplicability="disable" resourcePath="Makefile" toolsToInvoke=""/>
|
||||
|
||||
14
.project
14
.project
@@ -17,10 +17,6 @@
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value></value>
|
||||
@@ -30,8 +26,8 @@
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/BaS_GNU}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
@@ -49,17 +45,13 @@
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
|
||||
2
Makefile
2
Makefile
@@ -18,7 +18,7 @@ CC=$(TCPREFIX)gcc
|
||||
LD=$(TCPREFIX)ld
|
||||
|
||||
INCLUDE=-Iinclude
|
||||
CFLAGS=-mcpu=5474 -Wno-multichar -Os -fomit-frame-pointer
|
||||
CFLAGS=-mcpu=5474 -Wall -Wno-multichar -Os -fomit-frame-pointer
|
||||
|
||||
SRCDIR=sources
|
||||
OBJDIR=objs
|
||||
|
||||
12
flash.lk
12
flash.lk
@@ -4,11 +4,7 @@ MEMORY {
|
||||
|
||||
SECTIONS {
|
||||
_Bas_base = ABSOLUTE(0x1FE00000);
|
||||
|
||||
/* Board Memory map definitions from linker command files:
|
||||
* __SDRAM,__SDRAM_SIZE, __CODE_FLASH, __CODE_FLASH_SIZE
|
||||
* linker symbols must be defined in the linker command file.
|
||||
*/
|
||||
_tos_base = ABSOLUTE(0xe00000);
|
||||
|
||||
/* Init CS0 (BootFLASH @ E000_0000 - E07F_FFFF 8Mbytes) */
|
||||
___BOOT_FLASH = ABSOLUTE(0xE0000000);
|
||||
@@ -20,12 +16,6 @@ SECTIONS {
|
||||
/* VIDEO RAM BASIS */
|
||||
__VRAM = ABSOLUTE(0x60000000);
|
||||
|
||||
/*
|
||||
* MCF5475 Derivative Memory map definitions from linker command files:
|
||||
* __MBAR, __MMUBAR, __RAMBAR0, __RAMBAR0_SIZE, __RAMBAR1, __RAMBAR1_SIZE
|
||||
* linker symbols must be defined in the linker command file.
|
||||
*/
|
||||
|
||||
/* Memory mapped registers */
|
||||
__MBAR = ABSOLUTE(0xFF000000);
|
||||
__MMUBAR = ABSOLUTE(0xFF040000);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "startcf.h"
|
||||
|
||||
extern uint32_t Bas_base[];
|
||||
extern uint8_t tos_base[];
|
||||
|
||||
/* imported routines */
|
||||
extern int mmu_init();
|
||||
@@ -64,9 +65,9 @@ void wait_1us(void)
|
||||
void BaS(void)
|
||||
{
|
||||
int az_sectors;
|
||||
int sd_status,i;
|
||||
int i;
|
||||
uint8_t *src;
|
||||
uint8_t *dst;
|
||||
uint8_t *dst = tos_base;
|
||||
uint32_t *adr;
|
||||
|
||||
az_sectors = sd_card_init();
|
||||
@@ -113,7 +114,7 @@ copy_firetos:
|
||||
}
|
||||
}
|
||||
|
||||
if (!DIP_SWITCH & (1 << 6)) /* switch #6 on ? */
|
||||
if (!(DIP_SWITCH & (1 << 6))) /* switch #6 on ? */
|
||||
{
|
||||
if (MCF_PSC3_PSCRB_8BIT == 0x81)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/********************************************************/
|
||||
/* exception vectoren intialisieren
|
||||
/********************************************************/
|
||||
/*
|
||||
* initialize exception vectors
|
||||
*/
|
||||
|
||||
#include "startcf.h"
|
||||
|
||||
@@ -287,9 +287,9 @@ no_protect_vectors:
|
||||
lea timer0(pc),a1
|
||||
move.l a1,0x1f8(a0)
|
||||
rts
|
||||
/********************************************************/
|
||||
/* exception vector routinen
|
||||
/********************************************************/
|
||||
/*
|
||||
* exception vector routines
|
||||
*/
|
||||
vector_table_start:
|
||||
std_exc_vec:
|
||||
move.w #0x2700,sr // disable interrupt
|
||||
@@ -609,9 +609,10 @@ sev_sup6:
|
||||
movem.l (a7),d0/a5 // register zur<EFBFBD>ck
|
||||
rts
|
||||
blinker:.long 0
|
||||
/**************************************************/
|
||||
/* pseudo dma */
|
||||
/**************************************************/
|
||||
|
||||
/*
|
||||
* pseudo dma */
|
||||
*/
|
||||
acsi_dma: // atari dma
|
||||
move.l a1,-(a7)
|
||||
move.l d1,-(a7)
|
||||
@@ -672,9 +673,9 @@ acsi_dma_end:
|
||||
move.l (a7)+,d1
|
||||
move.l (a7)+,a1
|
||||
rts
|
||||
/**************************************************/
|
||||
/* irq 7 = pseudo bus error */
|
||||
/**************************************************/
|
||||
/*
|
||||
* irq 7 = pseudo bus error */
|
||||
*/
|
||||
irq7:
|
||||
lea -12(sp),sp
|
||||
movem.l d0/a0,(sp)
|
||||
@@ -696,9 +697,9 @@ irq7:
|
||||
move.l (sp)+,a0
|
||||
rts // Forward to the Access Error handler
|
||||
|
||||
/**************************************************/
|
||||
/* psc3 com PIC MCF */
|
||||
/**************************************************/
|
||||
/*
|
||||
* psc3 com PIC MCF */
|
||||
*/
|
||||
psc3:
|
||||
move.w #0x2700,sr // disable interrupt
|
||||
lea -20(a7),a7
|
||||
@@ -734,9 +735,10 @@ psc3_fertig:
|
||||
movem.l (a7),d0-d2/a0/a3 // register zur<EFBFBD>ck
|
||||
lea 20(a7),a7
|
||||
RTE
|
||||
/**************************************************/
|
||||
/* timer 0: video change later also others
|
||||
/**************************************************/
|
||||
|
||||
/*
|
||||
* timer 0: video change later also others
|
||||
*/
|
||||
timer0:
|
||||
move #0x2700,sr
|
||||
// halt
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/********************************************************************/
|
||||
/* INIT ACR und MMU /*
|
||||
/********************************************************************/
|
||||
/*
|
||||
* INIT ACR and MMU
|
||||
*/
|
||||
|
||||
#include "startcf.h"
|
||||
|
||||
@@ -177,9 +177,9 @@ _mmu_init:
|
||||
nop
|
||||
rts
|
||||
|
||||
/********************************************************************/
|
||||
/* MMU table search /*
|
||||
/********************************************************************/
|
||||
/*
|
||||
* MMU table search
|
||||
*/
|
||||
_mmutr_miss:
|
||||
bsr cpusha
|
||||
and.l #0xFFF00000,d0
|
||||
|
||||
@@ -19,7 +19,7 @@ uint8_t sd_com(uint32_t cmd)
|
||||
uint8_t res;
|
||||
|
||||
MCF_DSPI_DTFR = cmd;
|
||||
while (! MCF_DSPI_DSR & (1 << 7));
|
||||
while (! (MCF_DSPI_DSR & (1 << 7)));
|
||||
|
||||
res = MCF_DSPI_DRFR;
|
||||
MCF_DSPI_DSR = -1L;
|
||||
@@ -87,9 +87,10 @@ void sd_card_idle(void)
|
||||
|
||||
int sd_card_init(void)
|
||||
{
|
||||
|
||||
long az_sectors;
|
||||
return 0; /* for now, just to make the compiler happy */
|
||||
#ifdef _NOT_USED_
|
||||
long az_sectors;
|
||||
|
||||
asm
|
||||
{
|
||||
lea MCF_PSC0_PSCTB_8BIT,a1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/********************************************************/
|
||||
/* user/supervisor handler
|
||||
/********************************************************/
|
||||
/*
|
||||
* user/supervisor handler
|
||||
*/
|
||||
|
||||
#include "startcf.h"
|
||||
|
||||
@@ -33,7 +33,7 @@ _privileg_violation:
|
||||
lea _rt_mod,a0 // zugriff setzen
|
||||
tst.b (a0) // vom rt_supervisormodus?
|
||||
bne pv_work // ja->
|
||||
// tats<EFBFBD>chlich privileg violation
|
||||
// tats<EFBFBD>chlich privileg violation
|
||||
mov3q.l #-1,(a0) // sr_mod setzen
|
||||
move.l usp,a5 // usp holen
|
||||
move.l a5,8(a0) // sichern
|
||||
@@ -52,7 +52,7 @@ _privileg_violation:
|
||||
move.l 12(a0),a5 // rt_vbr
|
||||
lea 0x18(a5),a5 // vector
|
||||
move.l (a5),16(a7) // vector privileg violation
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// privileg violation
|
||||
@@ -149,7 +149,7 @@ pv_a7_usp: move.l 4(a0),a5 // rt_ssp -> a5
|
||||
pv_ax_usp:
|
||||
move.l a5,8(a0) // usp -> rt_usp
|
||||
addq.l #2,16(a7) // next
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// usp->a0
|
||||
@@ -175,7 +175,7 @@ pv_usp_a6:
|
||||
move.l a5,a6
|
||||
pv_usp_ax:
|
||||
addq.l #2,16(a7) // next
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// rte
|
||||
@@ -196,7 +196,7 @@ pv_rte:
|
||||
move.l 8(a0),a5 // rt_usp holen
|
||||
pv_rte_sup:
|
||||
move.l a5,usp // usp setzen
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// stop
|
||||
@@ -241,7 +241,7 @@ stop7:
|
||||
stop #0x2700
|
||||
stop_weiter:
|
||||
addq.l #4,16(a7) // next
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// movec ???????
|
||||
@@ -335,7 +335,7 @@ pv_46:
|
||||
move.b 1(a5),d0
|
||||
cmp.b #0xfc,d0 //#d16->sr
|
||||
beq im_sr //ja->
|
||||
//move dx->sr (sr und rt_mod ist supervisor sonst w<EFBFBD>re es privileg violation
|
||||
//move dx->sr (sr und rt_mod ist supervisor sonst w<EFBFBD>re es privileg violation
|
||||
cmp.b #0xc0,d0 //d0->sr?
|
||||
bne d1_sr //nein->
|
||||
move.w 2(a7),d0 //hier ist d0 gesichert
|
||||
@@ -389,7 +389,7 @@ pv_set_sr_end:
|
||||
move.l a5,usp // setzen
|
||||
pv_sre2:
|
||||
move.w d0,14(a7) // sr setzen
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// code 0x40xx *****************************************
|
||||
@@ -442,7 +442,7 @@ nsr_d7:
|
||||
halt
|
||||
sr_dx_end:
|
||||
addq.l #2,16(a7) // next
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
movem.l (a7),d0/a0/a5 // register zur<EFBFBD>ck
|
||||
lea 12(a7),a7
|
||||
rte
|
||||
// strldsr
|
||||
@@ -577,7 +577,7 @@ cfa_setloop:
|
||||
move.l _rt_cacr,d0 // holen
|
||||
movec d0,cacr // setzen
|
||||
move.w d2,sr // alte interrupt maske
|
||||
movem.l (a7),d0-d2/a0 // register zur<EFBFBD>ck
|
||||
movem.l (a7),d0-d2/a0 // register zur<EFBFBD>ck
|
||||
lea 16(a7),a7
|
||||
|
||||
rts
|
||||
|
||||
@@ -223,7 +223,7 @@ void init_fpga(void)
|
||||
MCF_GPIO_PODR_FEC1L |= (1 << 1);
|
||||
MCF_GPIO_PODR_FEC1L |= (1 << 2);
|
||||
|
||||
while ((!MCF_GPIO_PPDSDR_FEC1L & (1 << 0)) && (!MCF_GPIO_PPDSDR_FEC1L & (1 << 5)));
|
||||
while ((! (MCF_GPIO_PPDSDR_FEC1L & (1 << 0))) && (! (MCF_GPIO_PPDSDR_FEC1L & (1 << 5))));
|
||||
|
||||
wait_10us();
|
||||
MCF_GPIO_PODR_FEC1L |= (1 << 2);
|
||||
@@ -273,7 +273,7 @@ void init_fpga(void)
|
||||
MCF_GPIO_PODR_FEC1L |= 1;
|
||||
MCF_GPIO_PODR_FEC1L &= ~1;
|
||||
}
|
||||
} while ((!MCF_GPIO_PPDSDR_FEC1L & (1 << 5)) && (fpga_data < FPGA_FLASH_DATA_END));
|
||||
} while (!(MCF_GPIO_PPDSDR_FEC1L & (1 << 5)) && (fpga_data < FPGA_FLASH_DATA_END));
|
||||
|
||||
if (fpga_data < FPGA_FLASH_DATA_END)
|
||||
{
|
||||
@@ -460,10 +460,10 @@ void init_PCI(void) {
|
||||
|
||||
/* Configure Initiator Windows */
|
||||
/* initiator window 0 base / translation adress register */
|
||||
MCF_PCI_PCIIW0BTAR = PCI_MEMORY_OFFSET + ((PCI_MEMORY_SIZE -1) >> 8) & 0xffff0000;
|
||||
MCF_PCI_PCIIW0BTAR = (PCI_MEMORY_OFFSET + ((PCI_MEMORY_SIZE -1) >> 8)) & 0xffff0000;
|
||||
|
||||
/* initiator window 1 base / translation adress register */
|
||||
MCF_PCI_PCIIW1BTAR = PCI_IO_OFFSET + ((PCI_IO_SIZE - 1) >> 8) & 0xffff0000;
|
||||
MCF_PCI_PCIIW1BTAR = (PCI_IO_OFFSET + ((PCI_IO_SIZE - 1) >> 8)) & 0xffff0000;
|
||||
|
||||
/* initiator window 2 base / translation address register */
|
||||
MCF_PCI_PCIIW2BTAR = 0L; /* not used */
|
||||
@@ -725,6 +725,8 @@ void init_ac97(void) {
|
||||
if ((va & 0x80000fff) == 0x80000800) {
|
||||
vb = MCF_PSC2_PSCTB_AC97;
|
||||
vc = MCF_PSC2_PSCTB_AC97;
|
||||
|
||||
/* FIXME: that looks suspicious */
|
||||
if ((va & 0xE0000fff) == 0xE0000800 & vb == 0x02000000 & vc == 0x00000000) {
|
||||
goto livo;}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user