Skip to content

Commit

Permalink
some renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
yhzhang0128 committed Jan 20, 2022
1 parent f59df47 commit 744d24a
Show file tree
Hide file tree
Showing 74 changed files with 5 additions and 198 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ loc:
clean:
rm -rf $(DEBUG_DIR) $(RELEASE_DIR) $(BUILD_DIR)/mkfs $(BUILD_DIR)/disk.img

EARTH_SRCS = earth/*.c earth/sdlib/*.c shared/*.c
EARTH_SRCS = earth/*.c earth/sd/*.c shared/*.c
EARTH_LAYOUT = -Tearth/layout.lds

GRASS_SRCS = grass/enter.S grass/*.c shared/*.c
Expand All @@ -38,7 +38,7 @@ INCLUDE = -Ishared/include
CFLAGS = -march=rv32imac -mabi=ilp32 -mcmodel=medlow
CFLAGS += -ffunction-sections -fdata-sections

ARTY_FLAGS = -Linstall/metal -Iearth/include
ARTY_FLAGS = -Linstall/arty -Iinstall/arty
LDFLAGS = -Wl,--gc-sections -nostartfiles -nostdlib

DEFAULT_LDLIBS = -lc -lgcc
Expand Down
2 changes: 1 addition & 1 deletion earth/dev_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


#include "earth.h"
#include "sdlib/sdlib.h"
#include "sd/sd.h"

enum {
SD_CARD,
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 2 additions & 8 deletions earth/sdlib/sdinit.c → earth/sd/sdinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


#include <stdio.h>
#include "sdlib.h"
#include "sd.h"
#include "sdutil.h"

static int sd_spi_reset(struct metal_spi*);
Expand Down Expand Up @@ -253,13 +253,7 @@ static int sd_spi_configure(struct metal_spi *spi) {
/* Set CS line */
METAL_SPI_REGW(METAL_SIFIVE_SPI0_CSID) = config->csid;

/* Toggle off memory-mapped SPI flash mode, toggle on programmable IO mode
* It seems that with this line uncommented, the debugger cannot have access
* to the chip at all because it assumes the chip is in memory-mapped mode.
* I have to compile the code with this line commented and launch gdb,
* reset cores, reset $pc, set *((int *) 0x20004060) = 0, (set the flash
* interface control register to programmable I/O mode) and then continue
* Alternative, comment out the "flash" line in openocd.cfg */
/* Toggle off memory-mapped SPI flash mode, toggle on programmable IO mode */
METAL_SPI_REGW(METAL_SIFIVE_SPI0_FCTRL) = METAL_SPI_CONTROL_IO;

return 0;
Expand Down
File renamed without changes.
File renamed without changes.
187 changes: 0 additions & 187 deletions earth/sdlib/sdrw.c

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 744d24a

Please sign in to comment.