lishuang.xie bbf0b958cf merge branch dev_ck_v2.1_bug#1038# to dev_ck_v2.1
1. update libhwque.a and hwque.h
2. pet_rfm1/ecs_rfm0/ecs_rfm1 main.c add call smart_hq_debug_init()
3. spu(case14)+arm(case3): pass
4. spu(case21)+arm(case21):pass
5. spu(case34)+arm(case0): pass
6. spu(case44)+arm(case0): pass
2023-09-06 15:48:54 +08:00

58 lines
1.5 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// +FHDR------------------------------------------------------------
// Copyright (c) 2022 SmartLogic.
// ALL RIGHTS RESERVED
// -----------------------------------------------------------------
// Filename : main.c
// Author : xianfeng.du
// Created On : 2022-06-25
// Last Modified :
// -----------------------------------------------------------------
// Description:
//
//
// -FHDR------------------------------------------------------------
#include "ucp_printf.h"
#include "pet_rfm_spu1_top.h"
#include "msg_transfer_queue.h"
#include "log_client.h"
#include "ucp_utility.h"
#include "spu_shell.h"
#include "pet_rfm_spu1_oam.h"
#include "hwque.h"
int32_t main(int32_t argc, char* argv[])
{
UCP_PRINT_EMPTY("Hello world from PET RFM SPU1,coreId[0x%x]", get_core_id());
debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA);
/* hw_debug_init */
int32_t core_id = get_core_id();
int ret = 0;
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE+DBG_DDR_HW_LEN*core_id), DBG_DDR_HW_LEN); // 推荐384实际512
if (0 != ret)
{
debug_write(DBG_DDR_ERR_IDX(core_id, 46), ret);
}
spu_log_client_init();
pet_rfm_spu1_drv_init();
pet_rfm_spu1_msg_transfer_init();
spu_oam_init();
while(1) {
msg_transfer_queue_polling();
msg_transfer_enqueue();
//spu_shell_task();
//msg_transfer_queue_recfg();
//heart_beat_write();
}
return 0;
}