XIZI_AIoT: Add modifications for all SDK files. Add libmalloc interfaces(not functional)
This commit is contained in:
@@ -7,7 +7,11 @@ user_ldflags = --specs=nosys.specs -Wl,-Map=user.map,-cref -N
|
||||
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie -no-pie
|
||||
c_useropts = -O0
|
||||
|
||||
INC_DIR = -I$(KERNEL_ROOT)/services/shell/letter-shell -I$(KERNEL_ROOT)/services/lib/ipc -I$(KERNEL_ROOT)/services/boards/imx6q-sabrelite -I$(KERNEL_ROOT)/services/fs/include
|
||||
INC_DIR = -I$(KERNEL_ROOT)/services/shell/letter-shell \
|
||||
-I$(KERNEL_ROOT)/services/lib/ipc \
|
||||
-I$(KERNEL_ROOT)/services/lib/memory \
|
||||
-I$(KERNEL_ROOT)/services/boards/imx6q-sabrelite \
|
||||
-I$(KERNEL_ROOT)/services/fs/include
|
||||
|
||||
all: init simple_client simple_server shell fs_server test_priority test_fs readme.txt | bin
|
||||
../../tools/mkfs/mkfs ./fs.img $^
|
||||
@@ -26,7 +30,7 @@ init: init.o fs_service.o libipc.o session.o libserial.o usyscall.o
|
||||
@${ld} ${user_ldflags} -e main -o $@ $^
|
||||
@${objdump} -S $@ > $@.asm
|
||||
|
||||
simple_client: simple_client.o libserial.o libipc.o session.o simple_service.o fs_service.o usyscall.o
|
||||
simple_client: simple_client.o libserial.o libipc.o session.o simple_service.o fs_service.o usyscall.o
|
||||
@${ld} ${user_ldflags} -e main -o $@ $^
|
||||
@${objdump} -S $@ > $@.asm
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ int main(int argc, char** argv)
|
||||
if (argc >= 2) {
|
||||
id = string_to_integer(argv[1]);
|
||||
}
|
||||
printf("This is Simple Client %d\n", id);
|
||||
printf("This is Simple Client %d, size is 0x%x\n", id, task_heap_base());
|
||||
|
||||
struct Session session_wait;
|
||||
struct Session session_nowait;
|
||||
|
||||
@@ -83,6 +83,11 @@ int set_priority(sys_state_info* info)
|
||||
return syscall(SYSCALL_SYS_STATE, SYS_STATE_SET_TASK_PRIORITY, (intptr_t)info, 0, 0);
|
||||
}
|
||||
|
||||
int task_heap_base()
|
||||
{
|
||||
return syscall(SYSCALL_SYS_STATE, SYS_STATE_GET_HEAP_BASE, 0, 0, 0);
|
||||
}
|
||||
|
||||
int show_task()
|
||||
{
|
||||
return syscall(SYSCALL_SYS_STATE, SYS_STATE_SHOW_TASKS, 0, 0, 0);
|
||||
@@ -98,7 +103,7 @@ int show_cpu()
|
||||
return syscall(SYSCALL_SYS_STATE, SYS_STATE_SHOW_CPU_INFO, 0, 0, 0);
|
||||
}
|
||||
|
||||
int mmap(int vaddr, int paddr, int len, bool is_dev)
|
||||
int mmap(uintptr_t vaddr, uintptr_t paddr, int len, bool is_dev)
|
||||
{
|
||||
return syscall(SYSCALL_MMAP, vaddr, paddr, (intptr_t)len, (intptr_t)is_dev);
|
||||
}
|
||||
|
||||
@@ -34,8 +34,9 @@
|
||||
|
||||
typedef enum {
|
||||
SYS_STATE_TEST = 0,
|
||||
SYS_STATE_MEMBLOCK_INFO,
|
||||
SYS_STATE_SET_TASK_PRIORITY,
|
||||
SYS_STATE_GET_HEAP_BASE,
|
||||
SYS_STATE_MEMBLOCK_INFO,
|
||||
SYS_STATE_SHOW_TASKS,
|
||||
SYS_STATE_SHOW_MEM_INFO,
|
||||
SYS_STATE_SHOW_CPU_INFO,
|
||||
@@ -65,10 +66,11 @@ int register_server(char* name);
|
||||
int session(char* path, int capacity, struct Session* user_session);
|
||||
int poll_session(struct Session* userland_session_arr, int arr_capacity);
|
||||
int close_session(struct Session* session);
|
||||
int task_heap_base();
|
||||
int get_memblock_info(sys_state_info* info);
|
||||
int set_priority(sys_state_info* info);
|
||||
int show_task();
|
||||
int show_mem();
|
||||
int show_cpu();
|
||||
int mmap(int vaddr, int paddr, int len, bool is_dev);
|
||||
int mmap(uintptr_t vaddr, uintptr_t paddr, int len, bool is_dev);
|
||||
int register_irq(int irq, int opcode);
|
||||
Reference in New Issue
Block a user