主题中讨论的其他器件:SysConfig
工具与软件:
您好!
我已经导入 hello world M4项目。 当不对代码进行任何更改时、它会正常生成并正常调试。
以下是 SDK 中调试的原始代码:
#include <stdio.h>
#include <kernel/dpl/DebugP.h>
#include "ti_drivers_config.h"
#include "ti_drivers_open_close.h"
#include "ti_board_open_close.h"
void hello_world_main(void *args)
{
/* Open drivers to open the UART driver for console */
Drivers_open();
Board_driversOpen();
DebugP_log("Hello World!\r\n");
Board_driversClose();
Drivers_close();
}
调试时、我能够正常在 M4内核上进行调试。 但是、当我向 hello_world.cpp 添加代码时、在构建项目时、我无法调试此代码。 以下是我尝试调试的代码。 即使在将项目刷写到 M4内核时、我也只会看到"hello world"输出、而不是我从代码获得的额外输出。唯一的更改是在 hello_world.cpp 中:
#include <stdio.h>
#include <string.h>
#include <kernel/dpl/DebugP.h>
#include "ti_drivers_config.h"
#include "ti_drivers_open_close.h"
#include "ti_board_open_close.h"
typedef unsigned int uint;
/// Sample class that sets a string
class Foo
{
public:
Foo(void);
static const uint uStrLen = 20U;
char mystr[uStrLen + 1U];
}; // class Foo
Foo::Foo(void)
{
strncpy(mystr, "Testing\r\n", uStrLen);
mystr[uStrLen] = '\0';
}
/// Declare static class instance
Foo foo;
void hello_world_main(void *args)
{
/* Open drivers to open the UART driver for console */
Drivers_open();
Board_driversOpen();
DebugP_log("Hello World!\r\n");
DebugP_log(foo.mystr);
Board_driversClose();
Drivers_close();
}当我尝试在 M4内核上调试此代码时、会收到以下错误消息:
BLAZAR_Cortex_M4F_0: GEL Output: CPU reset (soft reset) has been issued through GEL. BLAZAR_Cortex_M4F_0: File Loader: Verification failed: Values at address 0x00014C40 do not match Please verify target memory and memory map. BLAZAR_Cortex_M4F_0: GEL: File: C:\dev\ccs\hello_world_cpp_am243x-evm_m4fss0-0_nortos_ti-arm-clang\Debug\hello_world_cpp_am243x-evm_m4fss0-0_nortos_ti-arm-clang.out: a data verification error occurred, file load failed.
为什么我不能在这个项目上添加/编辑代码然后对其进行调试? 此问题似乎与 Code Composer Studio 有关。 我们如何解决和解决此问题、以便我可以编辑此项目和调试 M4内核? 此相同的代码在 R5内核上运行和调试。

