程序无法跳转。

Discussions on BLE related products, including standard BLE devices, BLE mesh, and Apple HomeKit products
Post Reply
xiaohe
Posts: 1
Joined: Thu Dec 28, 2017 2:43 pm

Tue Apr 17, 2018 11:08 am

泰凌工程师们好:
目前遇到一个问题:
我想在一个程序处直接跳转到另外一个程序发现不能跳转。

我的操作如下:
1、生成两个bin文件。 一个文件烧录到0x00000000地址处,另外一个文件烧录在0x00020000处,其中放在0x00020000处的bin文件编译时已经修改了链接文件,查看bin链接地址已经正确映射到了0x00020000处
2、main中调用如下文件,无法运行。是不是还有设置其他的东西?贵公司的cpu文档说的不是很清楚。

typedef void (*p_app_fun)(void);
p_app_fun goto_mater_app;
#define ApplicationAddress 0x20000
void user_app_start(void)
{
volatile u32 JumpAddress;
irq_disable();

{
/* Jump to user application */
JumpAddress = *(volatile u32*) (ApplicationAddress);
goto_mater_app = (p_app_fun) JumpAddress;
goto_mater_app();
}
}
int main (void) {
...
user_app_start(); /*无法跳转*/
...
}
Post Reply