FRDM-K82F error while programming factory.sb using blhost

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

FRDM-K82F error while programming factory.sb using blhost

Jump to solution
2,083 Views
dhanapal_rajend
Contributor II

Hi,

I am using bubble_frdmk82f  and freedom bootloader for K82 controller in KDS 3.2.0 version.

Changed linker file settings to allocate memory for bootloader and user application

below is the linker settings

m_interrupts (RX) : ORIGIN = 0x0000A000, LENGTH = 0x000003C0
m_bootloader_config (RX) : ORIGIN = 0x0000A3C0, LENGTH = 0x00000040
m_flash_config (RX) : ORIGIN = 0x0000A400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x0000A410, LENGTH = 0x0003FBF0
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000

While programming factory sb in freedom bootloader getting below error.

Inject command 'receive-sb-file'
Preparing to send 26112 (0x6600) bytes to the target.
Successful generic response to command 'receive-sb-file'
(1/1)3%usb hid detected receiver data abort
Data phase write aborted by status 0x2712 kStatus_AbortDataPhase
Possible JUMP or RESET command received.
Response status = 4 (0x4) kStatus_InvalidArgument
Wrote 800 of 26112 bytes.

(screenshot attached)

Please give your comments

Regards

R.Dhanapal

Tags (2)
0 Kudos
1 Solution
1,514 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi dhanapal rajendran,

   If you want to make the bubble works, you need to add some code.

   Please check my attached modified code ,it works on my side.

  I also attached the generated .sb file for your reference.

  Thanks a lot for your patience.


Have a great day,
Kerry

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

View solution in original post

6 Replies
1,515 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi dhanapal rajendran,

   If you want to make the bubble works, you need to add some code.

   Please check my attached modified code ,it works on my side.

  I also attached the generated .sb file for your reference.

  Thanks a lot for your patience.


Have a great day,
Kerry

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

1,514 Views
dhanapal_rajend
Contributor II

Hi Kerry,

Thank you very much for your reply. We are using KDS IDE  3.2.0. bubble_frdmk82f project with your source is not compiling. I am getting compilation error. 

- undefined reference to `ramfunc_length'
- undefined reference to `ramfunc_execution_address'
- undefined reference to `ramfunc_load_address'

Previous source is compiling successfully. 

Regards

R.Dhanapal

0 Kudos
1,514 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi dhanapal rajendran,

    Thanks for your updated information.

    You can try my attached bubble file on your side at first, download the .sb file to your frdm-k82 board, check whether it works OK or not on your side. It already works OK on my side.

   About the KDS version,  please note these points:

1.  bubble.c

  pastedImage_1.png

You can define the __GNUC__ on your side, then the according variable will be defined.

2. Please modify the linker file

pastedImage_2.png

Actually, you can refer to Kinetis Bootloader QuadSPI User's Guide.pdf in the doc folder, chapter:

7 Change QuadSPI clock in QuadSPI image

Then you can build the KDS project.


Have a great day,
Kerry

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

0 Kudos
1,514 Views
dhanapal_rajend
Contributor II

Hi Kerry,

I am trying to update the k82_sdk_led_blinky.sb file using blhost but i am getting the error. 

Even if i use KinetisFlashTool i am getting error. Please refer the attached screenshot. 

E:\WorkingDirectory\Sec Boot\biometric_rd_09022018\boards\frdmk82f\demo_apps\security-kboot\tools\blhost & elftosb>blhost -u -- receive-sb-file k82_sdk_led_blinky.sb
Inject command 'receive-sb-file'
Preparing to send 6048 (0x17a0) bytes to the target.
Successful generic response to command 'receive-sb-file'
(1/1)2%usb hid detected receiver data abort
Data phase write aborted by status 0x2712 kStatus_AbortDataPhase
Possible JUMP or RESET command received.
Response status = 10200 (0x27d8) kStatusMemoryRangeInvalid
Wrote 160 of 6048 bytes.

Regards

R.Dhanapal

KinetisFlashToolError.jpg

0 Kudos
1,514 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi dhanapal rajendran,

     Really so sorry for my later reply.

    If you want to run the app, and boot it from the qspi, just modify the linker file is not enough.

   About the detail steps, please refer to the document Kinetis Bootloader QuadSPI User's Guide.pdf, which you can find it from FSL_Kinetis_Bootloader_K80_Tools_1_0_0, this document give the details step about how to modify a normal application code to run from QuadSPI.

   I also attached the SDK code as the app, but I use the led_blinky. I already change the clock to PEE, and modify the code, after the clock is switched, you will find the green led is blinky.

   You can check it on your side, I just modify the IAR project. You can try it at first.

    I also attach the generated sb file.

   But the bubble download also have problems on my side, I need more time to check it.


Have a great day,
Kerry

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

0 Kudos
1,514 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi dhanapal rajendran,

   I will test it on my side at first, and will reply you later.

   Please give me more time, and wait patiently, any updated information on my side, will let you know.

  Thanks a lot for your understanding.


Have a great day,
Kerry

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

0 Kudos