first steps to make Makefile machine independent
This commit is contained in:
2
Makefile
2
Makefile
@@ -129,7 +129,7 @@ $(BASFLASH_EXEC): MAPFILE=basflash.map
|
||||
|
||||
# the final link stage (BaS in RAM and BaS in flash)
|
||||
$(FLASH_EXEC) $(RAM_EXEC): $(LIBBAS) $(LDCSRC)
|
||||
$(CPP) -P -DTARGET_ADDRESS=$(TARGET_ADDRESS) -DFORMAT=$(FORMAT) $(LDCSRC) -o $(LDCFILE)
|
||||
$(CPP) $(INCLUDE) -P -DTARGET_ADDRESS=$(TARGET_ADDRESS) -DFORMAT=$(FORMAT) -DMACHINE_M5484LITE $(LDCSRC) -o $(LDCFILE)
|
||||
$(LD) --oformat $(FORMAT) -Map $(MAPFILE) --cref -T $(LDCFILE) -o $@
|
||||
ifeq ($(COMPILE_ELF),Y)
|
||||
$(OBJCOPY) -O srec $@ $@.s19
|
||||
|
||||
16
bas.lk.in
16
bas.lk.in
@@ -1,10 +1,19 @@
|
||||
#ifdef MACHINE_FIREBEE
|
||||
#include "firebee.h"
|
||||
#endif /* MACHINE_FIREBEE */
|
||||
|
||||
#ifdef MACHINE_M5484LITE
|
||||
#include "m5484l.h"
|
||||
#endif /* MACHINE_M5484LITE */
|
||||
|
||||
|
||||
MEMORY
|
||||
{
|
||||
bas_rom (RX) : ORIGIN = TARGET_ADDRESS, LENGTH = 0x00100000
|
||||
/*
|
||||
* target to copy BaS data segment to. 20k should be enough for now
|
||||
*/
|
||||
bas_ram (WX) : ORIGIN = 0x1FFFC000, LENGTH = 0x005000
|
||||
bas_ram (WX) : ORIGIN = 0x1FFFB000, LENGTH = 0x005000
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
@@ -13,6 +22,7 @@ SECTIONS
|
||||
.text :
|
||||
{
|
||||
objs/startcf.o(.text) /* this one is the entry point so it must be the first */
|
||||
|
||||
objs/sysinit.o(.text)
|
||||
objs/fault_vectors.o(.text)
|
||||
objs/init_fpga.o(.text)
|
||||
@@ -90,8 +100,8 @@ SECTIONS
|
||||
*/
|
||||
|
||||
/* SDRAM Initialization @ 0000_0000 - 1FFF_FFFF 512Mbytes */
|
||||
___SDRAM = 0x00000000;
|
||||
___SDRAM_SIZE = 0x20000000;
|
||||
___SDRAM = SDRAM_START;
|
||||
___SDRAM_SIZE = SDRAM_SIZE;
|
||||
_SDRAM_VECTOR_TABLE = ___SDRAM;
|
||||
|
||||
/* ST-RAM */
|
||||
|
||||
@@ -1,8 +1,37 @@
|
||||
#ifndef _FIREBEE_H_
|
||||
#define _FIREBEE_H_
|
||||
|
||||
/*
|
||||
* firebee.h
|
||||
*
|
||||
* preprocessor definitions for the Firebee machine. This file should contain nothing but preprocessor
|
||||
* definition that evaluate to numbers. It is intended for use in C sources as well as in linker control
|
||||
* files, so care must be taken to not break the syntax of either one.
|
||||
*
|
||||
* This file is part of BaS_gcc.
|
||||
*
|
||||
* BaS_gcc is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* BaS_gcc is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with BaS_gcc. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Created on: 26.02.2013
|
||||
* Author: Markus Fröschle
|
||||
*/
|
||||
|
||||
#define BOOTFLASH_BASE_ADDRESS 0xE0000000
|
||||
#define BOOTFLASH_SIZE 0x800000
|
||||
#define BOOTFLASH_BAM (BOOTFLASH_SIZE - 1)
|
||||
|
||||
#define SDRAM_START 0x00000000 /* start at address 0 */
|
||||
#define SDRAM_SIZE 0x20000000 /* 512 kb on the Firebee */
|
||||
|
||||
#endif /* _FIREBEE_H_ */
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
#define _M5484L_H_
|
||||
|
||||
#define BOOTFLASH_BASE_ADDRESS 0xE0000000
|
||||
#define BOOTFLASH_SIZE 0x400000 /* LITEKIT has 4Mb flash */
|
||||
#define BOOTFLASH_SIZE 0x400000 /* LITEKIT has 4MB flash */
|
||||
#define BOOTFLASH_BAM (BOOTFLASH_SIZE - 1)
|
||||
|
||||
#define SDRAM_START 0x00000000 /* start at address 0 */
|
||||
#define SDRAM_SIZE 0x4000000 /* 64 MB on the LITEKIT */
|
||||
|
||||
#endif /* _M5484L_H_ */
|
||||
|
||||
Reference in New Issue
Block a user