This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to build code when code split between ROM/RAM

For the 8051 code space, if I have some code in ROM and some in RAM and I am using bank switching, how should I build my code? My specific question is with regards to RAM updates. I would want to be able to update the code in RAM and yet have the same ROM code.

What process should I follow for compilation, linking, data segments management etc? Do I need to create libraries? Any pointers will be helpful. thanks!

Parents
  • Sounds like a bad idea. Get an ARM chip. Prototype by running everything in RAM while testing.

    Create the real application using a small boot loader and two application areas. Let the boot loader start the application in the second application area. Download a new application to the second application area. If checksum is ok, reboot and have the boot loader clear the first application and start the second.

    Patching to fix bugs is likely to produce 10 times more bugs than it can be used to solve. Your solution is like selecting expensive light bulbs with multiple filaments, and hardware that measures the current when powering the first filament and automatically switch to the second filament if the first one fails. Way easier to just get two lamps. Overengineering is a great way to crash and burn in spectacular ways.

Reply
  • Sounds like a bad idea. Get an ARM chip. Prototype by running everything in RAM while testing.

    Create the real application using a small boot loader and two application areas. Let the boot loader start the application in the second application area. Download a new application to the second application area. If checksum is ok, reboot and have the boot loader clear the first application and start the second.

    Patching to fix bugs is likely to produce 10 times more bugs than it can be used to solve. Your solution is like selecting expensive light bulbs with multiple filaments, and hardware that measures the current when powering the first filament and automatically switch to the second filament if the first one fails. Way easier to just get two lamps. Overengineering is a great way to crash and burn in spectacular ways.

Children
No data