P&E’s PROG programming software will sometimes prompt the user to enter a “Base Address”. In this article, we discuss what the base address is and why it exists.
On most 8-bit and 16-bit processors, the internal flash/eeprom is located at fixed address locations. If this is the case, the associated programming algorithm will NOT prompt the user for a base address, since the address is fixed and already known.
On 32-bit processors and any systems using external flash, the address of the flash may be configured to reside anywhere within the processor’s address space. The developer will decide on an appropriate memory map early in the design process.
For these situations where the flash can be relocated, the PROG software will always move the flash so that it begins at address 0. However, the developer may not have an object file that matches this new memory mapping. To account for this, the “Base Address” (specified by the user) is subtracted from all addresses in the object file prior to programming.
Below is an example of how the developer’s memory map may differ from the one in PROG. Although the external flash is located at different addresses, it refers to the same physical memory. Here, the user would specify a base address of FFC00000.
The base address should always be the starting address of flash in the developer’s memory map, and not the “first” address where data exists (although in most cases they are the same!)