mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 13:45:58 +02:00
+ define macros with information about the memory sizes of a MCU: FPC_FLASHBASE, FPC_FLASHSIZE, FPC_SRAMBASE, FPC_SRAMSIZE, FPC_EEPROMBASE, FPC_EEPROMSIZE, FPC_BOOTBASE, FPC_BOOTSIZE, resolves issue #29365
git-svn-id: trunk@33236 -
This commit is contained in:
parent
f63f3690fd
commit
4e64fe77ac
@ -4027,6 +4027,23 @@ if (target_info.abi = abi_eabihf) then
|
||||
for i:=low(tfeature) to high(tfeature) do
|
||||
if i in features then
|
||||
def_system_macro('FPC_HAS_FEATURE_'+featurestr[i]);
|
||||
|
||||
if ControllerSupport and (target_info.system in systems_embedded) and
|
||||
(init_settings.controllertype<>ct_none) then
|
||||
begin
|
||||
with embedded_controllers[init_settings.controllertype] do
|
||||
begin
|
||||
set_system_macro('FPC_FLASHBASE',tostr(flashbase));
|
||||
set_system_macro('FPC_FLASHSIZE',tostr(flashsize));
|
||||
set_system_macro('FPC_SRAMBASE',tostr(srambase));
|
||||
set_system_macro('FPC_SRAMSIZE',tostr(sramsize));
|
||||
set_system_macro('FPC_EEPROMBASE',tostr(eeprombase));
|
||||
set_system_macro('FPC_EEPROMSIZE',tostr(eepromsize));
|
||||
set_system_macro('FPC_BOOTBASE',tostr(bootbase));
|
||||
set_system_macro('FPC_BOOTSIZE',tostr(bootsize));
|
||||
end;
|
||||
end;
|
||||
|
||||
option.free;
|
||||
Option:=nil;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user