forked from yystopf/xiuos
Add README.md
This commit is contained in:
parent
5a12635b85
commit
56ec6edbe5
|
@ -1,2 +1,22 @@
|
|||
# XIZI_AIOT
|
||||
### XiZi_AIoT Microkernel
|
||||
|
||||
XiZi_AIoT is a microkernel designed to facilitate task management, memory management, IPC, and various userland sample applications.
|
||||
|
||||
### Building Instructions
|
||||
|
||||
To build the XiZi_AIoT microkernel, navigate to the directory xiuos/Ubiquitous/XiZi_AIoT and run the command `make BOARD=$(BOARD)`. By default, running `make` is equivalent to `make BOARD=imx6q-sabrelite`. For building XiZi_AIoT specifically for the imx6q-sabrelite board, you'll need the gcc-arm-none-eabi toolchain. We recommend using version "arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q1-update) 6.3.1 20170215 (release)", as this version was used during development. If the build process is successful, the generated files can be found in the "build" directory. Use either XiZi-$(BOARD).elf or XiZi-$(BOARD).bin as the image to run on the board or QEMU.
|
||||
|
||||
### Running on QEMU
|
||||
|
||||
QEMU is a useful tool for emulating boards while testing or developing XiZi_AIoT. Use the following command:
|
||||
|
||||
```
|
||||
qemu-system-arm -M sabrelite -m 1G -smp 4 -cpu cortex-a9 \
|
||||
-display none -serial null -serial stdio \
|
||||
-kernel xiuos/Ubiquitous/XiZi_AIoT/build/XiZi-imx6q-sabrelite.elf
|
||||
```
|
||||
Replace "xiuos/Ubiquitous/XiZi_AIoT/build/XiZi-imx6q-sabrelite.elf" with the appropriate path in your directory. We recommend using version "QEMU emulator version 7.2.0" for successful emulation of the sabrelite board.
|
||||
|
||||
### Makefile Usage
|
||||
|
||||
XiZi_AIoT utilizes a Makefile to build all its files, including .c and .S files. The compiler.mk file enables the make tool to iterate through all sub-directories defined by *SRC_DIR* and compile files defined by *SRC_FILES* using parameters defined in config.mk. Each board independently defines its config.mk file in hardkernel/arch/.../config.mk. Additionally, path_kernel.mk defines all include paths needed by XiZi_AIoT, and link.mk manages the linking process after all .c and .S files are compiled.
|
|
@ -26,7 +26,7 @@ INC_DIR = -I$(KERNEL_ROOT)/services/shell/letter-shell \
|
|||
-I$(KERNEL_ROOT)/services/app
|
||||
|
||||
ifeq ($(BOARD), imx6q-sabrelite)
|
||||
all: init test_fs simple_client simple_server shell fs_server test_irq_hdlr test_irq_block test_irq_send eth_driver timer_server readme.txt | bin
|
||||
all: init test_fs simple_client simple_server shell fs_server test_irq_hdlr test_irq_block test_irq_send eth_driver epit_server readme.txt | bin
|
||||
else
|
||||
all: init test_fs simple_client simple_server shell fs_server test_irq_hdlr readme.txt | bin
|
||||
endif
|
||||
|
@ -47,7 +47,7 @@ eth_driver: enet_drv.o enet_test.o board_network.o enet_iomux_config.o imx6dq_gp
|
|||
@${ld} ${user_ldflags} -e main -o $@ $^ ${board_specs}
|
||||
@${objdump} -S $@ > $@.asm
|
||||
|
||||
timer_server: timer.o epit.o ccm_pll.o usyscall.o arch_usyscall.o libserial.o printf.o libipc.o session.o
|
||||
epit_server: timer.o epit.o ccm_pll.o usyscall.o arch_usyscall.o libserial.o printf.o libipc.o session.o
|
||||
@${ld} ${user_ldflags} -e main -o $@ $^ ${board_specs}
|
||||
@${objdump} -S $@ > $@.asm
|
||||
endif
|
||||
|
|
|
@ -109,20 +109,21 @@ void system_time_init(void)
|
|||
|
||||
int IPC_DO_SERVE_FUNC(Ipc_delay_us)(uint32_t* usecs)
|
||||
{
|
||||
// uint32_t instance = g_system_timer_port;
|
||||
// if (*usecs == 0) {
|
||||
// return 0;
|
||||
// }
|
||||
uint32_t instance = g_system_timer_port;
|
||||
if (*usecs == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// /* enable the counter first */
|
||||
// epit_counter_enable(instance, *usecs, POLLING_MODE);
|
||||
/* enable the counter first */
|
||||
epit_counter_enable(instance, *usecs, POLLING_MODE);
|
||||
|
||||
// /* wait for the compare event */
|
||||
// while (!epit_get_compare_event(instance))
|
||||
// ;
|
||||
/* wait for the compare event */
|
||||
while (!epit_get_compare_event(instance)) {
|
||||
yield(SYS_TASK_YIELD_NO_REASON);
|
||||
}
|
||||
|
||||
// /* disable the counter to save power */
|
||||
// epit_counter_disable(instance);
|
||||
/* disable the counter to save power */
|
||||
epit_counter_disable(instance);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,6 @@ void print_hw_enet(const hw_enet_t* enet)
|
|||
*/
|
||||
int enet_test()
|
||||
{
|
||||
|
||||
imx_enet_priv_t* dev0 = &enet0;
|
||||
int pkt_len_send = 0, pkt_len_recv = 0, ret = 0, i;
|
||||
unsigned int enet_events = 0;
|
||||
|
|
Loading…
Reference in New Issue