Skip to content

Commit

Permalink
Enhanced ROM Management and WiFi Network Integration
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoparrilla authored Sep 13, 2023
2 parents 74bf555 + 5637675 commit 4645c66
Show file tree
Hide file tree
Showing 19 changed files with 943 additions and 256 deletions.
18 changes: 11 additions & 7 deletions configurator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ODIR = ./obj
SOURCES_DIR = ./src
BUILD_DIR = ./build
DIST_DIR = ./dist
EXE = ROMLOAD.TOS
EXE = SIDECART.TOS

# VASM PARAMETERS
# _DEBUG: 1 to enable debug, 0 to disable them
Expand Down Expand Up @@ -52,12 +52,12 @@ prepare: clean
clean-compile : clean main.o screen.o

# All C files
main.o: prepare
$(CC) $(CFLAGS) $(SOURCES_DIR)/main.c -o $(BUILD_DIR)/main.o

screen.o: prepare
$(CC) $(CFLAGS) $(SOURCES_DIR)/screen.c -o $(BUILD_DIR)/screen.o

helper.o: prepare
$(CC) $(CFLAGS) $(SOURCES_DIR)/helper.c -o $(BUILD_DIR)/helper.o

romselector.o: prepare
$(CC) $(CFLAGS) $(SOURCES_DIR)/romselector.c -o $(BUILD_DIR)/romselector.o

Expand All @@ -67,16 +67,20 @@ config.o: prepare
reset.o: prepare
$(CC) $(CFLAGS) $(SOURCES_DIR)/reset.c -o $(BUILD_DIR)/reset.o

helper.o: prepare
$(CC) $(CFLAGS) $(SOURCES_DIR)/helper.c -o $(BUILD_DIR)/helper.o
network.o: prepare
$(CC) $(CFLAGS) $(SOURCES_DIR)/network.c -o $(BUILD_DIR)/network.o

main.o: prepare
$(CC) $(CFLAGS) $(SOURCES_DIR)/main.c -o $(BUILD_DIR)/main.o

main: main.o screen.o romselector.o config.o reset.o helper.o
main: screen.o helper.o network.o config.o reset.o romselector.o main.o
$(CC) $(LIBCMINI)/lib/crt0.o \
$(BUILD_DIR)/screen.o \
$(BUILD_DIR)/romselector.o \
$(BUILD_DIR)/config.o \
$(BUILD_DIR)/reset.o \
$(BUILD_DIR)/helper.o \
$(BUILD_DIR)/network.o \
$(BUILD_DIR)/main.o \
-o $(BUILD_DIR)/$(EXE) $(LINKFLAGS);

Expand Down
13 changes: 0 additions & 13 deletions configurator/src/commands.h

This file was deleted.

8 changes: 6 additions & 2 deletions configurator/src/config.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "config.h"
#include "include/config.h"

static void print_table(ConfigData *configData)
{
Expand Down Expand Up @@ -54,7 +54,7 @@ ConfigData load_all_entries()
.count = 0,
};
currentAddress += sizeof(__uint32_t);
while (configData.count < MAX_ENTRIES)
while (1)
{
ConfigEntry entry;
memcpy(&entry, (void *)currentAddress, sizeof(ConfigEntry));
Expand Down Expand Up @@ -172,6 +172,8 @@ __uint8_t configuration()

please_wait("Loading configuration...", WAIT_TIME);

printf("\r\n");

ConfigData configData = load_all_entries();

while (1)
Expand All @@ -195,6 +197,7 @@ __uint8_t configuration()
// Save the stuff to the flash
send_command(SAVE_CONFIG, NULL, 0);
please_wait("Saving configuration...", WAIT_TIME);
printf("\r\n");
return 1; // Positive is OK
}

Expand Down Expand Up @@ -223,6 +226,7 @@ __uint8_t configuration()
break;
}
please_wait("Saving configuration...", WAIT_TIME);
printf("\r\n");

free(input);
}
Expand Down
Loading

0 comments on commit 4645c66

Please sign in to comment.