I have problem, I have to find a way to update code to my arm device without removing it, for that purpose I'll use serial communication. Does anyone have idea how to do it?
Hello Bojana,
Could you please describ your question more detail?
Best Regards,
Ben
I have arm lpc2378 installed in my system, and I want to change my code through serial port, more than ones (when I find bugs), I have idea to reserve in scatter file memory for two functions and then, with help of some flag to decide which one to execute. My question is how I can write code in specific place in memory? And how to force processor to do it from that location?
Thank You a lot Ben
Hi Bojana,
You need to search for "bootloader" or "in-circuit flashing" or "in-system programming".
Looking at NXP, you find application notes like "AN10759 - USB secondary ISP bootloader for LPC23xx" attached to my post.
Could you use $Sub/$Super mechanism?
ARM Information Center
Thank You Ronan, maybe I can, but I have never used this mechanism. Could you give me some link to explanation or some code example, to understand it?
Hi Bojana, there is an example in the link in my previous message.
Hi Ronan, but this mechanism is only for symbols. I need to to that with function which consist of lot symbols and sub-functions.
Is it mistake to force PC to go on specific address?
If that's a new question, I would like to advise you start a new thread, please.
Not sure I understand the question. When you repost could you provide more info? You can write direct to the PC, and is standard practice for things like pop instructions
$Sub is the only mechanism I can think of.
Hi Ronan- It looks like the member started a new thread for this question Is it mistake to force PC to specific address?
You may be interested in reading Bootloader Design for MCU's in Embedded Systems, which is an excellent document on firmware upgrade via bootloaders.
(The document can be downloaded from the page linked to at the bottom of the introduction).
That looks like a really useful resource, Jens. Thanks for linking to it.
I agree that this isn't really an "ARM" problem so much as a fairly standard bootloader design problem. Implementing the ability to update code remotely on an in-service device is just the same on an ARM processor as it is on any other. I suggest the OP look at standard bootloaders and see what can be learned from them.
Hope this helps.
Chris
I agree. And there's not much distance between making an update directly and making the update via a UART cable.
It's basically just to place the part that needs updating in SRAM before starting. One thing that's very important, is to check if the final update is OK (by verification, such as a kind of checksum/CRC), so that if the update code is not valid, it will not be executed. -But jacobbeningo covers these things completely. It's an excellent and well-written document, which can be read more than once.