vxkernel - v0.6.0-28 : update vxSDK integration + "on-the-fly" kernel sources fix
*update* > [boards] | [fxcg50] update board-specific header path > [scripts/core] | [cmake] proper support toolchain indication (vxSDK integration) > [vxsdk.toml] | disable verbose per default | update exported flags (WIP) | update linker script dependency for fxcg50 (WIP) *fix* > [kernel/src] | missing return values > [vxsdk.toml] | force expose libmath for SDL2 | fix ENV variable name for linker script
This commit is contained in:
parent
735c8b4103
commit
c7baead8b3
|
@ -76,7 +76,7 @@ endforeach()
|
|||
file(GLOB dir_src kernel/src/*.c kernel/src/*.S kernel/src/*.s)
|
||||
list(APPEND VXKERNEL_SRC_TARGETS ${dir_src})
|
||||
|
||||
list(APPEND VXKERNEL_INC_TARGETS kernel/include)
|
||||
list(APPEND VXKERNEL_INC_TARGETS kernel/include ./)
|
||||
if(EXISTS ${board_prefix}/include)
|
||||
list(APPEND VXKERNEL_INC_TARGETS ${board_prefix}/include)
|
||||
endif()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
//---
|
||||
#include "vhex/driver/mpu/sh/sh7305/pfc.h"
|
||||
#include "vhex/driver/mmu.h"
|
||||
#include "board/fxcg50/hardware.h"
|
||||
#include "boards/fxcg50/include/hardware.h"
|
||||
#include "vhex/hardware.h"
|
||||
|
||||
|
||||
|
|
|
@ -129,6 +129,7 @@ static sh7305_dma_channel_t *sh7305_dma_channel_reserve(void)
|
|||
return ch;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* sh7305_dma_channel_release() : release DMA channel */
|
||||
static int sh7305_dma_channel_release(sh7305_dma_channel_t * ch, int atomic)
|
||||
{
|
||||
|
@ -138,6 +139,7 @@ static int sh7305_dma_channel_release(sh7305_dma_channel_t * ch, int atomic)
|
|||
ch->id.INVALID = 1;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* sh7305_dma_channel_find() : find a channel using the ID */
|
||||
sh7305_dma_channel_t *sh7305_dma_channel_find(sh7305_dma_id_t id)
|
||||
|
|
|
@ -145,6 +145,7 @@ void *sh7305_intc_install_inth_generic(int event_code, vhex_call_t callback)
|
|||
// hardware configuration call
|
||||
//---
|
||||
|
||||
#if 0
|
||||
static bool __intc_hpowered(void)
|
||||
{
|
||||
return (SH7305_POWER.MSTPCR0.INTC == 0);
|
||||
|
@ -161,6 +162,7 @@ static int __intc_hpoweroff(void)
|
|||
SH7305_POWER.MSTPCR0.INTC = 1;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* __intc_configure() : configure the Interrupt Controller
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#define ASM_SOURCE
|
||||
#include <vhex/hardware.h>
|
||||
#include <board/fxcg50/hardware.h>
|
||||
#include "boards/fxcg50/include/hardware.h"
|
||||
.text
|
||||
|
||||
.global _sh7305_inth_callback
|
||||
|
|
|
@ -54,6 +54,7 @@ int sh7305_keycache_init(void)
|
|||
)
|
||||
);
|
||||
sh7305_tmu_start(keyinfo.timer.id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* sh7305_keycache_quit() : quit the keycache */
|
||||
|
@ -63,6 +64,7 @@ int sh7305_keycache_quit(void)
|
|||
free(keyinfo.queue.list);
|
||||
keyinfo.queue.idx = -1;
|
||||
keyinfo.queue.nb_evt_max = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -131,4 +131,5 @@ int sh7305_tmu_prof_quit(timer_prof_t *prof)
|
|||
tmu_prof_counter = 0;
|
||||
}
|
||||
cpu_atomic_end();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -284,6 +284,7 @@ int sh7305_tmu_wait(tid_t id)
|
|||
etmu_t *T = &ETMU[id-3];
|
||||
while(T->TSTR) if(T->TCR.UNIE) cpu_sleep();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* sh7305_tmu_spinwait(): Start a timer and actively wait for UNF */
|
||||
|
|
|
@ -104,8 +104,8 @@ VALIGNED(4) VWEAK int r61524_frame_frag_send(dsurface_t *surface)
|
|||
for (int i = 0; i < size; ++i) {
|
||||
r61524_write(yram[i]);
|
||||
}
|
||||
return (0);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
VALIGNED(4) int r61524_frame_end(dsurface_t *surface)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
int close(int fd)
|
||||
{
|
||||
(void)fd;
|
||||
return -1;
|
||||
#if 0
|
||||
void *data;
|
||||
|
||||
|
|
|
@ -3,4 +3,5 @@
|
|||
int fugue_close(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -5,4 +5,5 @@ off_t fugue_lseek(void *data, off_t offset, int whence)
|
|||
(void)data;
|
||||
(void)offset;
|
||||
(void)whence;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -5,4 +5,5 @@ ssize_t fugue_write(void *data, const void *buf, size_t size)
|
|||
(void)data;
|
||||
(void)buf;
|
||||
(void)size;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -5,4 +5,5 @@ ssize_t fugue_read(void *data, void *buf, size_t size)
|
|||
(void)data;
|
||||
(void)buf;
|
||||
(void)size;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ off_t lseek(int fd, off_t offset, int whence)
|
|||
(void)fd;
|
||||
(void)offset;
|
||||
(void)whence;
|
||||
return -1;
|
||||
#if 0
|
||||
void *data;
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ int open(const char *pathname, int flags, ...)
|
|||
{
|
||||
(void)pathname;
|
||||
(void)flags;
|
||||
return -1;
|
||||
#if 0
|
||||
va_list ap;
|
||||
void *data;
|
||||
|
|
|
@ -18,7 +18,10 @@ __all__ = [
|
|||
|
||||
def cmake_configure(prefix_build, prefix_src):
|
||||
""" Abstract cmake configuration """
|
||||
shell_cmd = f"cmake -B {prefix_build} -S {prefix_src}"
|
||||
toolchain_flag = ''
|
||||
if toolchain_path := os.environ.get('VXSDK_HOOK_CMAKE_TOOLCHAIN'):
|
||||
toolchain_flag = f"-DCMAKE_TOOLCHAIN_FILE={toolchain_path}"
|
||||
shell_cmd = f"cmake {toolchain_flag} -B {prefix_build} -S {prefix_src}"
|
||||
return subprocess.run(shell_cmd.split(), check=False).returncode
|
||||
|
||||
def cmake_build(prefix_build, verbose):
|
||||
|
|
12
vxsdk.toml
12
vxsdk.toml
|
@ -8,7 +8,7 @@ target = [
|
|||
|
||||
[build]
|
||||
configure = './vxdev configure'
|
||||
build = './vxdev build --verbose'
|
||||
build = './vxdev build'
|
||||
install = './vxdev install'
|
||||
uninstall = './vxdev uninstall'
|
||||
|
||||
|
@ -32,9 +32,14 @@ assets_prefix = [
|
|||
]
|
||||
VXSDK_PUBLIC_BUILD_LIBS = [
|
||||
'@COMMON@',
|
||||
'-Wl,--whole-archive',
|
||||
'-lvxkernel',
|
||||
'-Wl,--no-whole-archive',
|
||||
'@sh-elf-vhex@'
|
||||
]
|
||||
VXSDK_PUBLIC_LINKER_SCRIPT = [
|
||||
'fxcg50.ld'
|
||||
]
|
||||
|
||||
[sdl2]
|
||||
[sdl2.env]
|
||||
|
@ -48,8 +53,9 @@ assets_prefix = [
|
|||
'-Wl,--whole-archive',
|
||||
'-lvxkernel',
|
||||
'-Wl,--no-whole-archive',
|
||||
'-lSDL2'
|
||||
'-lSDL2',
|
||||
'-lm'
|
||||
]
|
||||
VXSDK_LINKER_SCRIPT = [
|
||||
VXSDK_PUBLIC_LINKER_SCRIPT = [
|
||||
'sdl2.ld'
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue