Hi Everyone,
I have customize bootloader for update application over RS485, hardware design using LPC54102. Address of bootloader is 0x00000000 and address of application is 0x00040000. My application run FreeRTOS and bootloader non RTOS.
This is function jump to App.
Application can run function peripheral init and some function other but it not run at line 193
This is config memory in MCUXpresso IDE.
Why is application not run. What is the wrong in my code or config.
I appreciate any help.
Hi @NeoMinh
I think that there are several aspects that we could check, this is in general:
From the bootloader side, I think that you could check the following recommendations from this ARM post: How to write a bootloader. Prior to performing jump to the application there are additional steps like clearing pending NVIC interrupts, load the vector address of the user application, make sure the CPU is in privileged mode etc.
From the core perspective , try to diagnose which hard fault and exceptions , you are possibly getting, as this are common reasons that stop an application to run. There is a guide from FreeRTOS : Debugging Hard Fault & Other exceptions and other in the community Tracking down hard faults
And , from the application image, review if the FreeRTOS and your current application , does not require any special setting for memory, more memory resources , memory alignment etc. Try to debug and step down into the last function that is able to run the MCU. Also, try to load simple image with a Blinky ( at 0x40000 too) with no FreeRTOS, and see if it is able to run as expected.
Please accept my apologies for the delay.
I hope this could help.
Diego.
Hi Diego
Thank you for replying.
1. I tried update load other application image (No FreeRTOS) and it update good but fault with application image FreeRTOS.
2. I tried change jump to application function with your suggest but it doesn't change with my problem.
3. If load application image FreeRTOS by j-link then bootloader can jump to application and it run good, no hard fault or other exceptions. I checked memory at 0x40000 when load image by j-link and RS485 but don't have any different. Application only run when load by j-link.
What's so special when load application by j-link or config flash memory ?
I look forward to your response.
Hi @NeoMinh
Thanks for your reply. I am very sorry for the delay on mine.
This very interesting. Unfortunately it is hard to me to tell with certain the reason why. As I am not aware of what it is behind the Segger's J-Link flash algorithms ,and how and which exceptions did you obtained due to RS-485 load of the FreeRTOS image.
Let me know if I there is something else where I could give you feedback.
Diego.