6678单镜像程序0核加载不了其他核的程序 - TMS320C6678 - 嵌入式开发者社区 - 51ele.net
设为首页收藏本站

嵌入式开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 3554|回复: 1
打印 上一主题 下一主题

[已解决] 6678单镜像程序0核加载不了其他核的程序

[复制链接]

34

主题

54

帖子

1307

积分

金牌会员

Rank: 6Rank: 6

积分
1307
跳转到指定楼层
楼主
发表于 2018-10-23 20:34:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用6678写了一个单镜像程序,用仿真器调试每个核都可以实现功能,加载进去只有0核正常,其他核没有跑起来,加载不了其他核的程序。
程序如下,大家帮忙看下什么原因:
#define BOOT_MAGIC_ADDRESS 0x87fffc
#define BOOT_ENTRY_ADDRESS 0x810000
#define IPC_INTERRUPT_CORE0 0x02620240
#define LOCAL_TO_GLOBAL_ADDR(addr,corenumber) (unsigned int)addr<0x1000000?\
          (unsigned int)addr+(0x10000000+corenumber*0x1000000):\
          (unsigned int)addr
ulCurrCoreNum = MultiProc_self();
/* 由0核加载各个核心的程序 */
if(ulCurrCoreNum == 0)
{
  System_printf ("\n开始加载各核程序\n");
  System_printf("core0 0x1087fffc: 0x%x\n",*(UInt32*)0x1087fffc);
       CSL_BootCfgUnlockKicker();
       /* 逐个核核加载程序 */
       for(coreIndex = 1; coreIndex < 8; coreIndex++)
       {
        bootMagicAddr0 = (unsigned int *)(LOCAL_TO_GLOBAL_ADDR(BOOT_MAGIC_ADDRESS,0));
        bootMagicAddr = (unsigned int *)(LOCAL_TO_GLOBAL_ADDR(BOOT_MAGIC_ADDRESS,coreIndex));
        if(*bootMagicAddr0 < 0x1000000)
        {
         bootEntryAddr = LOCAL_TO_GLOBAL_ADDR(*bootMagicAddr0, coreIndex);
//         bootEntryAddr = LOCAL_TO_GLOBAL_ADDR(*bootMagicAddr0, 0);
        }
        else
        {
         bootEntryAddr = *bootMagicAddr0 + coreIndex * 0x1000000;
//         bootEntryAddr = *bootMagicAddr0;
        }
        *bootMagicAddr = bootEntryAddr;
        CSL_IPC_genGEMInterrupt(coreIndex, 0);
       }
       CSL_BootCfgLockKicker();
       System_printf ("\n各核程序加载完成\n");
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖
回复

使用道具 举报

4

主题

188

帖子

1698

积分

禁止发言

积分
1698
沙发
发表于 2018-10-24 08:34:59 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|嵌入式开发者社区 ( 粤ICP备15055271号

GMT+8, 2024-4-19 11:14 , Processed in 0.035314 second(s), 24 queries .

Powered by Discuz! X3.2

© 2001-2015 Comsenz Inc.

快速回复 返回顶部 返回列表