How to Configure the dev_hid_mouse_bm Project for USB DFU Firmware Updates on RT1064 EVK?

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

How to Configure the dev_hid_mouse_bm Project for USB DFU Firmware Updates on RT1064 EVK?

1,775 Views
kbsidi
Contributor II

I am planning to use dev_hid_mouse_bm as custom firmware for USB DFU-based firmware updates on the RT1064 EVK.

I would like to:

  1. Flash the dev_hid_mouse_bm firmware to the board's flash memory.
  2. Configure the board such that:
    • When the user key is pressed while connecting the EVK board, it enters DFU mode.
    • If the user key is not pressed, the dev_hid_mouse_bm firmware executes normally.

Could you guide me on how to properly configure the dev_hid_mouse_bm project to support this functionality? Any tips or necessary modifications would be greatly appreciated!

 

0 Kudos
Reply
4 Replies

1,734 Views
kbsidi
Contributor II

Thank you for your response.
I don’t want to write the dev_hid_mouse_bm firmware to RAM; I want to write it to flash memory.
I would really appreciate your help with this.

0 Kudos
Reply

1,697 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @kbsidi ,

Please check this function in the project:.

memmoryStatus = USB_MemmoryProgram(firmwareAddress, (uint8_t *)&s_UsbDeviceDfuDemo.dfuFirmwareBlock[0],

s_UsbDeviceDfuDemo.dfuFirmwareBlockLength);

 

You will notice that there is no flash read/write support in this project. It would be a very big code modification to implement your application. It is recommended to try other options such as a secondary bootloader solution or an OTA solution.

Best regards,
Gavin

0 Kudos
Reply

1,687 Views
kbsidi
Contributor II
USB_MemmoryProgram is just memcpy.

usb_memmory_status_t USB_MemmoryProgram(uint32_t address, uint8_t *buffer, uint32_t length)
{
usb_memmory_status_t status = kStatus_USB_MemmorySuccess;
memcpy((void *)address, (void *)buffer, length);
return status;
}
0 Kudos
Reply

1,762 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @kbsidi ,

Please check this post and the "Using Custom Firmware" section, I think it could help you with some inspirations.

 

0 Kudos
Reply