Author Topic: Customized bootloader for flash ROM Winbond: W25Q16JLSNIG-T with LPC1833  (Read 10724 times)

sonam chouhan

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Customized bootloader for flash ROM Winbond: W25Q16JLSNIG-T with LPC1833
« Reply #195 on: August 02, 2021, 11:35:54 pm »
Hi, there,

  Our requirement is to design a customized bootloader for external flash programming. We have tried the example code of Flash Magic\Bootloaders\External Memory\LPCxpresso18S37.
But, that does not work. Could you guide us on this requirement? Please see our below concerns.

1. do any flash magic versions have an example code for the LPC1833 external SPI Flash bootloader?

2. What are changes needed in Flash Magic\Bootloaders\External Memory\LPCxpresso18S37 that can help us?

3. We have changed the descriptor content in FlashPrg.c file as per the LPC1833 memory map, but that also does not work. We got the error as "Bootloader is not executing in RAM".

4. Please find the attachment and help us to provide some details about the requirement.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Customized bootloader for flash ROM Winbond: W25Q16JLSNIG-T with LPC1833
« Reply #196 on: August 03, 2021, 10:56:30 am »
You will need to run your custom bootloader in a debugger, e.g. Keil uVision, to see where it is getting stuck. The error means that Flash Magic is not getting a response.

The example booloader for the LPC4337 uses external SPIFI and that part is the same as the LPC1887 for this purpose, so should be a close enough starting point.

We can also develop this for you as a consulting project - please email us if you want to go down that route.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

sonam chouhan

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Customized bootloader for flash ROM Winbond: W25Q16JLSNIG-T with LPC1833
« Reply #197 on: August 03, 2021, 10:04:48 pm »
Thanks for your kind support.

We are using Keil uvision for compiling and creating the hex file (customized bootloader). We have attached the screenshot for the FlashPrg.c. Could you please let us know, for lpc1833 support in which files, we need to do the modifications in example bootloader for the LPC4337?

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Customized bootloader for flash ROM Winbond: W25Q16JLSNIG-T with LPC1833
« Reply #198 on: August 04, 2021, 09:39:34 am »
You will need to change all of the parts related to SPIFI to match your external flash device. Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

sonam chouhan

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Customized bootloader for flash ROM Winbond: W25Q16JLSNIG-T with LPC1833
« Reply #199 on: August 11, 2021, 03:14:24 am »
I am using UART0 for downloading the bootloader. I checked this after modifying the example code (Flash Magic\Bootloaders\External Memory\LPCxpresso18S37), but still, I am getting the same error (Operation failed, bootloader in RAM is not executing(2)). After this error, I observed that the existing image has been erased but the new image is not updated.

It would be very helpful if you can provide any documentation of the steps to be followed to develop the customized bootloader code.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Customized bootloader for flash ROM Winbond: W25Q16JLSNIG-T with LPC1833
« Reply #200 on: August 11, 2021, 09:32:00 am »
What do you mean the "new image is not updated"? That Flash Magic is not sending the bootloader? How are you verifying that?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

sonam chouhan

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Customized bootloader for flash ROM Winbond: W25Q16JLSNIG-T with LPC1833
« Reply #201 on: August 11, 2021, 10:34:39 am »
We have two option to update a image in flash ROM
1..bin using jtag
2. .hex file using flash magic.
So, first we flash .bin in flash ROM and then with a little bit change we created a .hex file and tried to update our customized  bootloader into the flash ROM.
So, basically  before programming  bootloader erase the flash and then program the new image.
After flashing by selecting  this bootloader,  we got the operation failed and when found no content  in the flash. It seems that bootloader  erase the flash but not programed.