cgchas
Member level 3
I've added 30K flash memory to a single board computer (at89s52, 32K SRAM, 2 82c55's, etc). I can read from and write bytes to the flash memory. I am using SDCC for hex code generation.
What I want to do is compile C functions and data suitable for placement onto the flash memory for internal and external program execution, but I am not sure how exactly so that there will be proper linkage with code executed from program memory internal to the AT89S52. In other words I want to execute from both internal and external flash memory using C compiled code.
I realize I could copy the entire hex file to external flash and wire the EA pin to GND for external program fetches, but that isn't exactly what I want to do if I do not have to. I would like to perform all self-test routines from the internal 8K of the AT89S52 and branch to my application in external code memory after the self-tests have completed.
Any help would be greatly appreciated.
Charles
What I want to do is compile C functions and data suitable for placement onto the flash memory for internal and external program execution, but I am not sure how exactly so that there will be proper linkage with code executed from program memory internal to the AT89S52. In other words I want to execute from both internal and external flash memory using C compiled code.
I realize I could copy the entire hex file to external flash and wire the EA pin to GND for external program fetches, but that isn't exactly what I want to do if I do not have to. I would like to perform all self-test routines from the internal 8K of the AT89S52 and branch to my application in external code memory after the self-tests have completed.
Any help would be greatly appreciated.
Charles