mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-28 04:23:36 +01:00
cmake: restore options USER_VRAM and STATIC_GRAY
This commit is contained in:
parent
0525b51ba5
commit
8157f4b2ab
3 changed files with 14 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
|||
# Build system for the gint unikernel
|
||||
# TODO: Options for NO_SYSCALLS, STATIC_GRAY, USER_VRAM, ATEXIT_MAX
|
||||
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(Gint VERSION 2.3.0 LANGUAGES C ASM)
|
||||
|
@ -7,7 +6,10 @@ project(Gint VERSION 2.3.0 LANGUAGES C ASM)
|
|||
include(GitVersionNumber)
|
||||
include(Fxconv)
|
||||
|
||||
# Generate <gint/config.h> with commit hash and version name in
|
||||
option(GINT_USER_VRAM "Put all VRAMs into the user stack (fx-CG 50 only)")
|
||||
option(GINT_STATIC_GRAY "Use static memory instead of malloc for gray buffers (fx-9860G only)")
|
||||
|
||||
# Generate <gint/config.h> with commit hash, version name and options
|
||||
git_version_number(SHORT_HASH "GINT_GIT_HASH" TAG_RELATIVE "GINT_GIT_VERSION")
|
||||
configure_file(include/gint/config.h.in include/gint/config.h)
|
||||
|
||||
|
|
|
@ -16,4 +16,12 @@
|
|||
0x03f7c0a0 = Commit 3f7c0a0 */
|
||||
#define GINT_HASH 0x@GINT_GIT_HASH@
|
||||
|
||||
/* GINT_USER_VRAM: Selects whether to store VRAMs in the user stack (occupying
|
||||
350k/512k of the area) or in the system stack (the default). (fx-CG 50) */
|
||||
#cmakedefine GINT_USER_VRAM
|
||||
|
||||
/* GINT_STATIC_GRAY: Selects whether additional gray VRAMs are allocated
|
||||
statically or in the system heap (fx-9860G) */
|
||||
#cmakedefine GINT_STATIC_GRAY
|
||||
|
||||
#endif /* GINT_CONFIG */
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <gint/display.h>
|
||||
#include <gint/hardware.h>
|
||||
#include <gint/config.h>
|
||||
|
||||
#ifdef GINT_USER_VRAM
|
||||
/* We want to put the VRAM in the user section, however we can't use the
|
||||
|
@ -10,7 +11,7 @@
|
|||
GALIGNED(4) GSECTION(".bss.vram") int8_t _gint_vram_buffers[396*224*2];
|
||||
|
||||
/* In this case, we can define pointers to our user stack directly, these will
|
||||
be the physical address associated with _vram_buffers */
|
||||
be the physical address associated with _gint_vram_buffers */
|
||||
static uint16_t *main = (void *)0xac161400;
|
||||
static uint16_t *scnd = (void *)0xac18c900;
|
||||
|
||||
|
|
Loading…
Reference in a new issue