Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-09

arm controller unit

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

Hi,

On target 'arm' sometimes the compiler uses the controller unit. For the codetools I need to know the exact conditions.

What flags indicate that the controller unit is used?

Mattias

Sven Barth
to Mattias Gaertner
Mattias Gaertner wrote 6 lines
Hi, On target 'arm' sometimes the compiler uses the controller unit. For the codetools I need to know the exact conditions. What flags indicate that the controller unit is used?

I personally would say "-Tembedded". Though there could be other triggers as well.

Regards,
Sven

Jeppe Græsdal Johansen
to Mattias Gaertner: On target 'arm' sometimes the compiler uses the controller unit. For the codetools I need…
Mattias Gaertner wrote 8 lines
Hi, On target 'arm' sometimes the compiler uses the controller unit. For the codetools I need to know the exact conditions. What flags indicate that the controller unit is used? Mattias

It's at the bottom of loaddefaultunits in pmodules:

{ CPU targets with microcontroller support can add a controller specific unit }
{$if defined(ARM) or defined(AVR)}
if (target_info.system in systems_embedded) and
(current_settings.controllertypect_none) and

(embedded_controllers[current_settings.controllertype].controllerunitstr'') then

AddUnit(embedded_controllers[current_settings.controllertype].controllerunitstr);
{$endif ARM}

Where systems_embedded would be any -Tembedded