Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumping changes into stable. #296

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions projects/demo_ibex_ss/project.c
Original file line number Diff line number Diff line change
@@ -10,34 +10,22 @@

#include <status.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <terravisor/bootstrap.h>
#include <driver.h>
#include <time.h>
#include <platform.h>

void plug()
{
bootstrap();
driver_setup_all();

printf("Demo Program!\n");
mdelay(1000);
printf("Bye...\n");
exit(EXIT_SUCCESS);
return;
}


void play()
{
static unsigned char i = 0;
char progress[] = "-\\|/";
uint64_t time;
char c = progress[(i++) % strlen(progress)];
get_timestamp(&time);
time /= 1000U;

printf("[%012llu] Running Blinky ... [%c]", time, c);

mdelay(500);

printf("\r");
return;
}
9 changes: 9 additions & 0 deletions src/platform/ibex/simple_system/platform/platform.c
Original file line number Diff line number Diff line change
@@ -19,7 +19,9 @@
#include <terravisor/platform.h>
#include <visor/workers.h>
#include <platform.h>
#include <mmio.h>

static void platform_sim_halt();

void platform_early_setup()
{
@@ -76,6 +78,7 @@ void platform_setup()
cyancore_insignia();
platform_print_cpu_info();
platform_memory_layout();
atexit(&platform_sim_halt);
return;
}

@@ -84,3 +87,9 @@ void platform_cpu_setup()
arch_ei();
return;
}

static void platform_sim_halt()
{
uintptr_t sim_ctrl_base = 0x20000;
MMIO32(sim_ctrl_base + 0x8) = 1;
}