BKPT instruction appears in the assembler

Showing results for 
Search instead for 
Did you mean: 

BKPT instruction appears in the assembler

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.


0 Kudos
3 Replies

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

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.


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

NXP Community


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


0 Kudos

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