Unable to use MTB trace on LPC11U67

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Unable to use MTB trace on LPC11U67

1,088 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by David Perry on Sun May 10 07:55:42 MST 2015
Hi,

When I try to turn on continuous trace, I get the message "Unable to configure continuous instruction trace because the trace buffer memory could not be detected."

I have included these lines in my main file:

#include <cr_mtb_buffer.h>
__CR_MTB_BUFFER(256);

Anybody know what else to check?

Thanks
Dave

0 项奖励
回复
6 回复数

965 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by David Perry on Tue May 12 12:37:40 MST 2015
I can use any of the other sample projects from LPCware and it works fine.

I just wondered what to compare other than the map file and linker script, which look fine.

I'll try rebuilding my project by adding my files to a new wizard created project. I was hoping to avoid that because it's a fair bit of work, and I'll never learn what went wrong that way.

Thanks
Dave


0 项奖励
回复

965 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue May 12 09:05:26 MST 2015
I would suggest that you use the wizards to create a new project for your target, and make sure that works. Then compare your project with the one created by the wizards.
0 项奖励
回复

965 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by David Perry on Tue May 12 08:37:31 MST 2015
I removed the manual declaration as you suggested, and let the declaration in mtb.c allow for the buffer.  The buffer seems to be there, but the tools can't find it. Here is (I think) the relevant part of the map file:


.mtb_buffer_default

                0x0000000010000000      0x100

*(.mtb*)

.mtb.$RAM1     0x0000000010000000      0x100 ./example/src/mtb.o

                0x0000000010000000                __mtb_buffer__
0 项奖励
回复

965 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Sun May 10 11:57:18 MST 2015
Normally, there is no need to manually declare the buffer in your main code => If you use the LPCXpresso project wizard, a file called mtb.c is created within the project, with the size of the buffer controlled by the project define __MTB_BUFFER_SIZE. In addition the MTB buffer can be excluded from a build by defining __MTB_DISABLE.

Anyway, if you are having problems with your MTB buffer being detected, I suggest that you post the full file containing your buffer definition, plus the linker map file generated when you built your project (normally in the Debug/Release subdirectory).

Regards,
LPCXpresso Support

0 项奖励
回复

657 次查看
richardcopeman
Contributor II

Thanks of this - helped me out a great deal.

I just defined __MTB_BUFFER_SIZE=256 on the compiler pre-processor settings. Once I did that my debugger was happy with the new size and collected the trace for. Never would have found this without the points - so thank you.

0 项奖励
回复

965 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by David Perry on Sun May 10 09:51:20 MST 2015

The included file was cr_mtb_buffer.h.
I guess the angle brackets look like HTML.
#include <cr_mtb_buffer.h>
__CR_MTB_BUFFER(256); 
0 项奖励
回复