fixed memory allocation in linker script but still have a panic error :(

This commit is contained in:
2025-07-31 13:05:09 +03:00
parent cfffd14b4b
commit b65dc62257
2 changed files with 6 additions and 7 deletions

View File

@@ -29,6 +29,6 @@ SECTIONS {
. = ALIGN(4096);
__free_ram = .;
. += 64 * 1024 * 1048; /* 64MB */
. += 64 * 1024 * 1024; /* 64MB */
__free_ram_end = .;
}

11
shell.c
View File

@@ -3,13 +3,13 @@
void main(void) {
while (1) {
prompt:
printf("# > ");
printf("> ");
char cmdline[128];
for (int i = 0;; i++) {
char ch = getchar();
putchar(ch);
if (i == sizeof(cmdline) - 1) {
printf("too much yapping bro :(\n");
printf("too much yapping bro\n");
goto prompt;
} else if (ch == '\r') {
printf("\n");
@@ -20,10 +20,9 @@ prompt:
}
}
if (strcmp(cmdline, "hello") == 0) {
if (strcmp(cmdline, "hello") == 0)
printf("Hellow :3\n");
} else {
printf("I don't know what is %s yet :(", cmdline);
}
else
printf("I don't know what is %s yet :(\n", cmdline);
}
}