From: Florent Kermarrec Date: Wed, 20 May 2020 07:55:19 +0000 (+0200) Subject: software/bios: cleanup includes and specify the lib in the include. X-Git-Tag: 24jan2021_ls180~318 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e91c3171395f118bac30a70761a6f037d7c148af;p=litex.git software/bios: cleanup includes and specify the lib in the include. This ease understanding from which lib the file is included and also allow having simple filenames in the libs. --- diff --git a/litex/soc/software/bios/boot.c b/litex/soc/software/bios/boot.c index a85bca2d..639d1266 100644 --- a/litex/soc/software/bios/boot.c +++ b/litex/soc/software/bios/boot.c @@ -20,17 +20,15 @@ #include #include -#ifdef CSR_ETHMAC_BASE -#include -#include -#endif +#include "sfl.h" +#include "boot.h" -#ifdef CSR_SPIFLASH_BASE #include -#endif -#include "sfl.h" -#include "boot.h" +#include +#include + +#include extern void boot_helper(unsigned long r1, unsigned long r2, unsigned long r3, unsigned long addr); @@ -497,7 +495,6 @@ void romboot(void) // SPI HARDWARE BITBANG #ifdef CSR_SPISDCARD_BASE -#include "spisdcard.h" void spisdcardboot(void) { diff --git a/litex/soc/software/bios/cmds/cmd_bios.c b/litex/soc/software/bios/cmds/cmd_bios.c index bbca856c..cf555ef0 100644 --- a/litex/soc/software/bios/cmds/cmd_bios.c +++ b/litex/soc/software/bios/cmds/cmd_bios.c @@ -2,12 +2,12 @@ #include #include - #include -#include #include #include +#include + #include "../command.h" #include "../helpers.h" diff --git a/litex/soc/software/bios/cmds/cmd_litedram.c b/litex/soc/software/bios/cmds/cmd_litedram.c index 0b9ea228..b9a9f225 100644 --- a/litex/soc/software/bios/cmds/cmd_litedram.c +++ b/litex/soc/software/bios/cmds/cmd_litedram.c @@ -5,7 +5,7 @@ #include -#include "sdram.h" +#include #include "../command.h" #include "../helpers.h" diff --git a/litex/soc/software/bios/cmds/cmd_liteeth.c b/litex/soc/software/bios/cmds/cmd_liteeth.c index f9df1d24..e8702f67 100644 --- a/litex/soc/software/bios/cmds/cmd_liteeth.c +++ b/litex/soc/software/bios/cmds/cmd_liteeth.c @@ -5,7 +5,7 @@ #include -#include "mdio.h" +#include #include "../command.h" #include "../helpers.h" diff --git a/litex/soc/software/bios/cmds/cmd_litesdcard.c b/litex/soc/software/bios/cmds/cmd_litesdcard.c index d5d1651f..4cac68f2 100644 --- a/litex/soc/software/bios/cmds/cmd_litesdcard.c +++ b/litex/soc/software/bios/cmds/cmd_litesdcard.c @@ -5,7 +5,7 @@ #include -#include "sdcard.h" +#include #include "../command.h" #include "../helpers.h" diff --git a/litex/soc/software/bios/cmds/cmd_mem.c b/litex/soc/software/bios/cmds/cmd_mem.c index 8c63d4c4..01c607e1 100644 --- a/litex/soc/software/bios/cmds/cmd_mem.c +++ b/litex/soc/software/bios/cmds/cmd_mem.c @@ -3,6 +3,8 @@ #include #include +#include + #include "../command.h" #include "../helpers.h" diff --git a/litex/soc/software/bios/main.c b/litex/soc/software/bios/main.c index 9d1dc85b..dc2117ad 100644 --- a/litex/soc/software/bios/main.c +++ b/litex/soc/software/bios/main.c @@ -25,30 +25,26 @@ #include #include +#include "boot.h" +#include "readline.h" +#include "helpers.h" +#include "command.h" + #include #include #include #include -#ifdef CSR_ETHMAC_BASE -#include "udp.h" -#endif - -#ifdef CSR_SPIFLASH_BASE #include -#endif -#ifdef CSR_ETHPHY_MDIO_W_ADDR -#include "mdio.h" -#endif +#include -#include "sdram.h" -#include "sdcard.h" -//#include "spi.h" -#include "boot.h" -#include "readline.h" -#include "helpers.h" -#include "command.h" +#include +#include + +#include + +#include static void boot_sequence(void) { diff --git a/litex/soc/software/common.mak b/litex/soc/software/common.mak index 1431ad55..802a48b8 100644 --- a/litex/soc/software/common.mak +++ b/litex/soc/software/common.mak @@ -47,12 +47,9 @@ DEPFLAGS += -MD -MP # INCLUDES = -I$(SOC_DIRECTORY)/software/include/base \ -I$(SOC_DIRECTORY)/software/include \ - -I$(SOC_DIRECTORY)/common \ + -I$(SOC_DIRECTORY)/software \ -I$(BUILDINC_DIRECTORY) \ - -I$(CPU_DIRECTORY) \ - -I$(SOC_DIRECTORY)/software/liblitedram \ - -I$(SOC_DIRECTORY)/software/libliteeth \ - -I$(SOC_DIRECTORY)/software/liblitesdcard + -I$(CPU_DIRECTORY) COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES) CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding