fixed memory allocation in linker script but still have a panic error :(
This commit is contained in:
@@ -29,6 +29,6 @@ SECTIONS {
|
||||
|
||||
. = ALIGN(4096);
|
||||
__free_ram = .;
|
||||
. += 64 * 1024 * 1048; /* 64MB */
|
||||
. += 64 * 1024 * 1024; /* 64MB */
|
||||
__free_ram_end = .;
|
||||
}
|
||||
|
11
shell.c
11
shell.c
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user