Skip to content

Exporters and toolchains - flags to be shared #1671

@0xc0170

Description

@0xc0170

Toolchain scripts have defined flags internal in the methods (mostly init). Therefore exporters ducplicate some but not all.

As an example for uvision (ARM) the flash size reported in the online IDE for BLE Thermometer (mkit target) is around 28k flash, exported to uvision - 48k flash.

For ARM class, in the __init__:

        main_cc = join(ARM_BIN, "armcc")
        common = ["-c",
            "--cpu=%s" % cpu, "--gnu",
            "-Otime", "--split_sections", "--apcs=interwork",
            "--brief_diagnostics", "--restrict", "--multibyte_chars"
        ]

In the uvision template, --restrict --multibyte_chars -Otime --split_sections flags are not set. This should be unified.

I imagine a toolchain class have methods: get_common_flags, get_c_flags, get_ccp_flags, and get_ld_flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions