add cortex-v7a support

How To Run:
    see TencentOS-tiny\board\ALPHA_I.MX_emmc_256ddr\README.md

TODO Next:
1. VFP support
2. fault diagnosis support
3. qemu vexpress ca9 support
4. raspberry pi support
5. SMP support
This commit is contained in:
daishengdong
2020-01-19 19:06:24 +08:00
parent 08ab1d88e1
commit 3d9d6198c8
115 changed files with 98070 additions and 29 deletions

View File

@@ -0,0 +1,63 @@
#include "tos_k.h"
#include "bsp_clk.h"
#include "bsp_delay.h"
#include "bsp_led.h"
#include "bsp_beep.h"
#include "bsp_key.h"
#include "bsp_int.h"
#include "bsp_uart.h"
#include "bsp_exit.h"
#include "bsp_epittimer.h"
void task1_entry(void *arg)
{
while (1) {
printf("task1\r\n");
tos_task_delay(2000);
}
}
void task2_entry(void *arg)
{
while (1) {
printf("task2\r\n");
tos_task_delay(3000);
}
}
k_task_t task1;
k_stack_t task1_stack[512];
k_task_t task2;
k_stack_t task2_stack[512];
int main(void)
{
unsigned char state = OFF;
uart_init();
led_init();
beep_init();
key_init();
tos_knl_init();
tos_task_create(&task1, "task1", task1_entry, NULL,
4,
task1_stack, sizeof(task1_stack),
0);
tos_task_create(&task2, "task2", task2_entry, NULL,
4,
task2_stack, sizeof(task2_stack),
0);
tos_knl_start();
while (1) {
delay(3000);
}
return 0;
}