BKPT instruction appears in the assembler

cancel
Showing results for 
Search instead for 
Did you mean: 

BKPT instruction appears in the assembler

193 Views
Contributor I

Hi, I import SDK example to build it using the default configuration. My PC is connected with a development board K66F.

After the compiler, Iuse IDA_pro to check the assembler, I found BKPT instructions. 

I want to know how to configure the IDE environment to not generate the BKPTs in binary.

Thanks.

0 Kudos
3 Replies

17 Views
Senior Contributor III

BKPT is not generated by the compiler from normal code. It is generated *explicitly* in the source code. Normally, the SDKs do this when handling some sort of exceptional condition such as an assertion failure. In my SDK, fsl_assert.c (which is called from an assertion failure in the code) has 2 locations where a BKPT is generated.

If you don't want this in your code, you can change the source code.

0 Kudos

17 Views
Contributor I

I import firmware samples from K66F SDK with all the components.

For example, the firmware sample is a drive_demo named

“frdmk66f_edma_scatter_gather”, and build the demo to generate a binary

named frdmk66f_edma_scatter_gather.axf.

I use Ida_pro the check the binary, and search "BKPK", the result is shown

as below:

How should I modify the sample to disabled the BKPK?

Note that the doubtful thing is the BKPTs are missing when I change the

other computer to do the same operations.

The

converse <admin@community.nxp.com> 于2019年4月18日周四 下午4:08写道:

NXP Community

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

Re: BKPT instruction appears in the assembler

reply from Con Verse

<https://community.nxp.com/people/converse?et=watches.email.thread> in *MCUXpresso

IDE* - View the full discussion

<https://community.nxp.com/message/1141022?commentID=1141022&et=watches.email.thread#comment-1141022>

0 Kudos

17 Views
Senior Contributor III

Those functions are all low-level function that implement the semihosting functionality in the C library.

read this faq What is Semihosting?  which gives more information and links to further info on how to stop using it.

and for for a lot more detail, see this article from ARM ARM Information Center 

0 Kudos