How do you build for release

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

How do you build for release

815 Views
therealfreegeek
Contributor IV

I just tried to run my code stand alone on the FRDMK64 but it does not run properly. I have noticed that the KSDK demos have two options for building under the hammer, debug and release however I currently only have a debug option in my project.

 

I can tell that in stand alone mode my "seconds" interrupt from the RTC is not occurring, but I can see that the PIT interrupt is working.

 

Can anyone explain how to resolve this please.

Labels (1)
0 Kudos
9 Replies

457 Views
therealfreegeek
Contributor IV

OK, it did not take long to recreate the problem in a very simple project, I have added USBCDC and the Debug console so that PRINTF is sent over the K64 USB.

The main code is;


DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, DEBUG_UART_BAUD,
kDebugConsoleUSBCDC);

PRINTF("Hello world \r\n");

int i = 0;

for(;;){

     if (second_tick == 1 ){

     PRINTF("%d\r\n", i);

     second_tick = 0;

     i++;

     }

}

and the interrupt handler is;

void RTC_Seconds_IRQHandler(void)

{

       second_tick = 1;

}

The project prints as expected on the K64 USB when running from the debugger but when running stand alone only prints "Hello world", then nothing, as if the RTC seconds interrupt is not happening.

Please try and let me know if you see the same.

0 Kudos

457 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Ernest,

I find the reason, please connect the 2-3 of J25 on the FRDM-K64 board,

then USB insert to J22, press the RESET button(sw1), then you can see the LED on/off .

For at the time , it directly reset the MCU, or it need reset through OPENSDA.

I also attached my test project .

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

457 Views
therealfreegeek
Contributor IV

Hi Alice, you should not have to power the debug usb port or push the reset switch.

I think there is a bug in the RTC silicon, KSDK driver or PEx implementation, but I am not sure where.

I have found a work around which makes it work properly every time with just the K64 USB connected and no need to push the reset switch.

I disabled the PEx init check boxes and did the init manually and it now works.

I posted over in the KSDK forum Stand alone run mode not matching debug session

Thanks

Jim

0 Kudos

457 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Ernest,

I create one project about RTC on other IDE(KEIL) , when use the j22, it can work well.

And it can not work well about the KDS + KSDK project ,i will check the problem continue .

BR

Alice

0 Kudos

457 Views
therealfreegeek
Contributor IV

Hi Alice, my application uses the other USB port (the K64 usb) for power and communication, please try to connect using this port only (no connection to the debug usb) and you will see that the led does not light.

0 Kudos

457 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello  Ernest,

I test one LED demo , when change to another  USB, it can work well.

So this is not the KDS debug problem , i recommend you create one simple

project , only RTC component , check whether it can work well when use another USB.

And also check the FRDM-K64 sch .

I also will test it on my side.

BR

Alice

0 Kudos

457 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Ernest,

In normal, after download the project to as debug mode , it can work well ,

when run as stand alone it also can work well .

I recommend you first test on KSDK demo ,for example :KSDK_1.3.0\examples\frdmk64f\demo_apps\hello_world

check whether can work well stand alone on board . If yes, this meaning there is something wrong on your project,

you can check again or send your project .

Hope it helps

Alice

0 Kudos

457 Views
therealfreegeek
Contributor IV

Hi Alice,

OK thanks, it is odd that my code works in debug mode and not in release mode.

I used the red led on the board to find out which code was not running and can see it is the RTC seconds interrupt which does not get triggered when the board is used stand alone. I attached my code and appreciate your offer to have a look.

In debug mode the red led will come on immediately as the RTC seconds interrupt is enabled near the start of the code.

In stand alone mode you will see it does not come on, the code is running as you can toggle the blue led with SW2.

0 Kudos

457 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Ernest,

I have test your project on my side , it can work well.

You do not need care the release or debug , in KDS , after download the it through debug ,

it also flash the project to the board , so please download it to your board,

pastedImage_0.png

then you can close the KDS, also can re-insert the USB to OpenSDA, then press

the RESET button , you can see the the red led ON .

I attach the video on my side .

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos