diff --git a/litex/soc/software/bios/boot.c b/litex/soc/software/bios/boot.c index 3760eaba5..0bb640b66 100644 --- a/litex/soc/software/bios/boot.c +++ b/litex/soc/software/bios/boot.c @@ -10,10 +10,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #include @@ -23,9 +23,9 @@ #include "sfl.h" #include "boot.h" -#include "jsmn.h" +#include -#include +#include #include #include diff --git a/litex/soc/software/bios/cmds/cmd_bios.c b/litex/soc/software/bios/cmds/cmd_bios.c index 873468db2..1e9d76971 100644 --- a/litex/soc/software/bios/cmds/cmd_bios.c +++ b/litex/soc/software/bios/cmds/cmd_bios.c @@ -2,10 +2,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include diff --git a/litex/soc/software/bios/cmds/cmd_i2c.c b/litex/soc/software/bios/cmds/cmd_i2c.c index 0e294397d..cd6d9fa0d 100644 --- a/litex/soc/software/bios/cmds/cmd_i2c.c +++ b/litex/soc/software/bios/cmds/cmd_i2c.c @@ -5,7 +5,7 @@ #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 e8c713f7f..25c76035d 100644 --- a/litex/soc/software/bios/cmds/cmd_litedram.c +++ b/litex/soc/software/bios/cmds/cmd_litedram.c @@ -4,11 +4,11 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/litex/soc/software/bios/cmds/cmd_mem.c b/litex/soc/software/bios/cmds/cmd_mem.c index 2da97e9d9..16687a7e0 100644 --- a/litex/soc/software/bios/cmds/cmd_mem.c +++ b/litex/soc/software/bios/cmds/cmd_mem.c @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include diff --git a/litex/soc/software/bios/helpers.c b/litex/soc/software/bios/helpers.c index c953a27f1..6d60e7f30 100644 --- a/litex/soc/software/bios/helpers.c +++ b/litex/soc/software/bios/helpers.c @@ -3,8 +3,8 @@ // SPDX-License-Identifier: BSD-Source-Code #include -#include -#include +#include +#include #include #include "readline.h" diff --git a/litex/soc/software/bios/isr.c b/litex/soc/software/bios/isr.c index a7fe63aee..00e28bec1 100644 --- a/litex/soc/software/bios/isr.c +++ b/litex/soc/software/bios/isr.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #if defined(__microwatt__) diff --git a/litex/soc/software/bios/main.c b/litex/soc/software/bios/main.c index 42b0c6025..66d0b0082 100644 --- a/litex/soc/software/bios/main.c +++ b/litex/soc/software/bios/main.c @@ -17,13 +17,13 @@ #include #include -#include +#include #include -#include +#include #include -#include +#include #include -#include +#include #include "boot.h" #include "readline.h" @@ -35,7 +35,7 @@ #include #include -#include +#include #include diff --git a/litex/soc/software/bios/readline.c b/litex/soc/software/bios/readline.c index a255ebfaa..edd1259a5 100644 --- a/litex/soc/software/bios/readline.c +++ b/litex/soc/software/bios/readline.c @@ -13,8 +13,8 @@ #include #include -#include -#include +#include +#include #include "readline.h" #include "complete.h" diff --git a/litex/soc/software/common.mak b/litex/soc/software/common.mak index 6d8f3f11e..f2f58a690 100644 --- a/litex/soc/software/common.mak +++ b/litex/soc/software/common.mak @@ -45,12 +45,14 @@ DEPFLAGS += -MD -MP # Toolchain options # -INCLUDES = -I$(SOC_DIRECTORY)/software/include/base \ +INCLUDES = -I$(PICOLIBC_DIRECTORY)/newlib/libc/tinystdio \ + -I$(PICOLIBC_DIRECTORY)/newlib/libc/include \ -I$(SOC_DIRECTORY)/software/include \ -I$(SOC_DIRECTORY)/software \ -I$(BUILDINC_DIRECTORY) \ + -I$(BUILDINC_DIRECTORY)/../libc \ -I$(CPU_DIRECTORY) -COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -nostdinc -fno-stack-protector $(INCLUDES) +COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -g3 -fomit-frame-pointer -Wall -fno-builtin -fno-stack-protector $(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 LDFLAGS = -nostdlib -nodefaultlibs -Wl,--no-dynamic-linker -Wl,--build-id=none -L$(BUILDINC_DIRECTORY) diff --git a/litex/soc/software/libbase/console.c b/litex/soc/software/libbase/console.c index 1eb5b3b39..cb62093c3 100644 --- a/litex/soc/software/libbase/console.c +++ b/litex/soc/software/libbase/console.c @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/litex/soc/software/libbase/crc16.c b/litex/soc/software/libbase/crc16.c index a14d0ed8f..6fc6de761 100644 --- a/litex/soc/software/libbase/crc16.c +++ b/litex/soc/software/libbase/crc16.c @@ -1,4 +1,4 @@ -#include +#include #ifndef SMALL_CRC static const unsigned int crc16_table[256] = { diff --git a/litex/soc/software/libbase/crc32.c b/litex/soc/software/libbase/crc32.c index 68f7b336c..07abbd9b2 100644 --- a/litex/soc/software/libbase/crc32.c +++ b/litex/soc/software/libbase/crc32.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -#include +#include #ifndef SMALL_CRC static const unsigned int crc_table[256] = { diff --git a/litex/soc/software/libbase/div64.c b/litex/soc/software/libbase/div64.c index 98d77480d..dc8447869 100644 --- a/litex/soc/software/libbase/div64.c +++ b/litex/soc/software/libbase/div64.c @@ -18,7 +18,7 @@ #include -#include +#include uint32_t __div64_32(uint64_t *n, uint32_t base) { diff --git a/litex/soc/software/libbase/i2c.c b/litex/soc/software/libbase/i2c.c index 800f926f8..57827c8f6 100644 --- a/litex/soc/software/libbase/i2c.c +++ b/litex/soc/software/libbase/i2c.c @@ -1,5 +1,5 @@ // This file is Copyright (c) 2020 Antmicro -#include +#include #include #ifdef CSR_I2C_BASE diff --git a/litex/soc/software/libbase/id.c b/litex/soc/software/libbase/id.c index d2d7b513a..c572ea2e1 100644 --- a/litex/soc/software/libbase/id.c +++ b/litex/soc/software/libbase/id.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #define DFII_ADDR_SHIFT CONFIG_CSR_ALIGNMENT/8 diff --git a/litex/soc/software/libbase/memtest.c b/litex/soc/software/libbase/memtest.c index b728b18d2..598db5480 100644 --- a/litex/soc/software/libbase/memtest.c +++ b/litex/soc/software/libbase/memtest.c @@ -1,7 +1,7 @@ -#include "memtest.h" +#include #include -#include +#include #include #include diff --git a/litex/soc/software/libbase/progress.c b/litex/soc/software/libbase/progress.c index 2c5bac3b4..35fc8ba72 100644 --- a/litex/soc/software/libbase/progress.c +++ b/litex/soc/software/libbase/progress.c @@ -17,12 +17,12 @@ * */ -#include +#include #include #include -#include -#include +#include +#include #define FILESIZE_MAX 100000000 #define HASHES_PER_LINE 40 diff --git a/litex/soc/software/libbase/sim_debug.c b/litex/soc/software/libbase/sim_debug.c index d7644b90d..30a37a9a6 100644 --- a/litex/soc/software/libbase/sim_debug.c +++ b/litex/soc/software/libbase/sim_debug.c @@ -1,4 +1,4 @@ -#include "sim_debug.h" +#include #include #include diff --git a/litex/soc/software/libbase/spiflash.c b/litex/soc/software/libbase/spiflash.c index c1681c086..936cee303 100644 --- a/litex/soc/software/libbase/spiflash.c +++ b/litex/soc/software/libbase/spiflash.c @@ -2,7 +2,7 @@ #if (defined CSR_SPIFLASH_BASE && defined SPIFLASH_PAGE_SIZE) -#include +#include #define PAGE_PROGRAM_CMD 0x02 #define WRDI_CMD 0x04 diff --git a/litex/soc/software/libbase/system.c b/litex/soc/software/libbase/system.c index e42589a0a..e41da6130 100644 --- a/litex/soc/software/libbase/system.c +++ b/litex/soc/software/libbase/system.c @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/litex/soc/software/libbase/time.c b/litex/soc/software/libbase/time.c index 2d04d719f..4e84652b4 100644 --- a/litex/soc/software/libbase/time.c +++ b/litex/soc/software/libbase/time.c @@ -1,5 +1,5 @@ #include -#include +#include void time_init(void) { diff --git a/litex/soc/software/libbase/uart.c b/litex/soc/software/libbase/uart.c index 0f4b76c82..636e023c3 100644 --- a/litex/soc/software/libbase/uart.c +++ b/litex/soc/software/libbase/uart.c @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -154,4 +154,4 @@ void uart_sync(void) #endif -#endif \ No newline at end of file +#endif diff --git a/litex/soc/software/liblitedram/sdram.c b/litex/soc/software/liblitedram/sdram.c index 2f6821393..50ccdf2b4 100644 --- a/litex/soc/software/liblitedram/sdram.c +++ b/litex/soc/software/liblitedram/sdram.c @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #ifdef CSR_SDRAM_BASE #include diff --git a/litex/soc/software/libliteeth/tftp.c b/litex/soc/software/libliteeth/tftp.c index b976496d8..1a7c247e0 100644 --- a/litex/soc/software/libliteeth/tftp.c +++ b/litex/soc/software/libliteeth/tftp.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include "udp.h" #include "tftp.h" diff --git a/litex/soc/software/liblitespi/spiflash.c b/litex/soc/software/liblitespi/spiflash.c index 54214472e..c463b39b8 100644 --- a/litex/soc/software/liblitespi/spiflash.c +++ b/litex/soc/software/liblitespi/spiflash.c @@ -4,8 +4,8 @@ #include #include #include -#include -#include +#include +#include #include #include