Failed when assert(serialHandle);

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed when assert(serialHandle);

1,585 Views
alan5
Contributor I

Hi I am working on LPCXpresso54608. I am running on an example to control LED in the shell. But there is an error when assert(serialHandle); with the error message captured 

ASSERT ERROR " .fsl_shell.c:820 : serialHandle

The code that I am using is generated by MCUXpresso.

Thank You!

0 Kudos
Reply
5 Replies

1,427 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Alan,

 

Could you please share the detailed process you are following so I can replicate this issue on my side?

 

Best regards,

Felipe

0 Kudos
Reply

1,427 Views
admin6
Contributor III

Also getting same problem running frdmkl27z_shell example project straight out the box from the frdm_kl27z demo examples.

The example is being run in the default DEBUG configuration.

The other semihosting example called frdmkl27z_hello_world works perfectly.

assertfail1.png

The Assert fails because SerialHandle is null.

If Alan found a fix I would be interested to know what it is.

0 Kudos
Reply

1,427 Views
alan5
Contributor I

I don't have a solution yet. I am not using that feature. Just that when I generate the example, I saw this issue. I had proceeded with other tests.

0 Kudos
Reply

1,427 Views
admin6
Contributor III

Hi Alan,

  The solution is to ensure that;

       SDK Import Wizard  ->   SDK Debug Console   = UART            (not Semihost! The default)

 as shown below.

(Also you need to give the second attempt at importing this project a suffix so that the [Next] and [Finish] buttons are ungreyed - allowing you to proceed.)

The imported project settings do NOT control the "SDK Debug Console" setting. You have to set it manually.

shellwiz2.png

Regards, and Thank you Felipe,

Rob

0 Kudos
Reply

1,427 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Alan,

 

I checked the example on my side using my LPCXpresso54608 board and it worked as expected. Please check the below image.

pastedImage_2.png

I used MCUXpresso 11.1.1 and SDK 2.7.0 to test it.

 

Best regards,

Felipe