您需要创建两个单独的项目。首先,您需要生成引导加载程序,该引导加载程序将驻留在引导内存中,并通过从和声中选择的任意源中的触发器来执行。或者作为第二个项目,您需要生成应用程序链接器脚本,该脚本将告诉链接器不要将代码放在引导加载器所在的位置。这个链接器脚本必须包含在应用程序代码中,Orthor会把它放在那里。我正在使用UDP引导加载程序。所以我的引导加载程序将在以太网上搜索UDP命令。PC上的EXE将给出这些命令以及应用固件数据。编程成功。引导加载程序将跳转到第一个应用程序指令所在的地址。因此应用程序启动。如果.loader在引导时没有找到任何udp命令,并且在应用程序地址处找到适当的指令,则它将立即跳转。注意:当自定义链接器脚本生效时,您不能调试应用程序代码。首先需要排除它来调试代码。
以上来自于百度翻译
以下为原文
you need to create two separate projects.
first you need to generate boot loader that will reside in boot memory and executed by trigger from either source selected from harmony. or at power on.
than as
second project you need to generate application linker script which will tell linker not to place code where boot loader is residing. this linker script must be included in application code , harmony will put it there for you.
i am using udp boot loader. so my boot loader will search udp commands on Ethernet upon power up. and exe on pc will give those commands as well as application firmware data. upon programming successfully. boot loader will jump to address where first instruction of application is. thus application starts. if boat loader does not find any udp command while booting and it founds proper instruction at application address it will immediately jump.
Note: you can not debug application code while custom linker script is in effect. you need to exclude it first to debug you code.