Everything

project.Create


This function creates a new project.

[Specification format]

project.Create(fileName, micomType, deviceName, projectKind = ProjectKind.Auto, compiler = Compiler.Auto, subProject = False)

[Argument(s)]

Argument

Description

fileName

Specify the full path of a new project file.

If no file extension is specified, the filename is automatically supplemented.

If the project to be created is a main project (subProject = False) or a subproject (subProject = True), the name is supplemented by ".mtpj" or ".mtsp", respectively.

When the extension is other than that specified, it is replaced by the actual extension.

micomType

Specify the microcontroller type of a new project.

The types that can be specified are shown below.

Type

Description

MicomType.RH850

Project for RH850

MicomType.RX

Project for RX

MicomType.V850

Project for V850

MicomType.RL78

Project for RL78

MicomType.K0R

Project for 78K0R

MicomType.K0

Project for 78K0

deviceName

Specify the device name of the microcontroller of a new project by a string.

projectKind

Specify the type of a new project.

The types that can be specified are shown below.

The following is automatically specified if the microcontroller type is RH850 and "ProjectKind.Auto" is specified or projectKind is not specified.

When the microcontroller is single core: ProjectKind.Application

When the microcontroller is multi-core and main project: ProjectKind.MulticoreBootLoader

When the microcontroller is multi-core and subproject: ProjectKind.MulticoreApplication

Type

Description

ProjectKind.Application

Project for application

ProjectKind.Library

Project for library

ProjectKind.DebugOnly

Debug-dedicated project

ProjectKind.Empty

Project for empty application

ProjectKind.CppApplication

Project for C++ application

ProjectKind.GHSCCProject

CS+ project using an existing GHS project file

ProjectKind.RI600V4

Project for RI600V4

ProjectKind.RI600PX

Project for RI600PX

ProjectKind.RI850V4

Project for RI850V4

ProjectKind.RI850MP

Project for RI850MP

ProjectKind.RV850

Project for RV850

ProjectKind.RI78V4

Project for RI78V4

ProjectKind.MulticoreBootLoader

Project for boot loader for multi-core

ProjectKind.MulticoreApplication

Project for application for multi-core

ProjectKind.Auto

The type of a project is selected in accord with the specification for micomType, deviceName, and subProject (default).

compiler

Specify the compiler to be used.

If the compiler is not specified, it is selected automatically depending on the microcontroller type.

Type

Description

Compiler.Auto

The compiler to be used is selected in accord with the specification for micomType (default).

Compiler.CC_RH

CC-RH

If this argument is not specified when micomType is set to "MicomType.RH850", CC-RH is selected automatically.

Compiler.CC_RX

CC-RX

If this argument is not specified when micomType is set to "MicomType.RX", CC-RX is selected automatically.

Compiler.CA850

CA850

If this argument is not specified when micomType is set to "MicomType.V850" and deviceName is set to "V850E" or "V850ES", CA850 is selected automatically.

Compiler.CX

CX

If this argument is not specified when micomType is set to "MicomType.V850" and deviceName is set to "V850E2", CX is selected automatically.

Compiler.CC_RL

CC-RL

If this argument is not specified when "MicomType.RL78" in CS+ for CC, CC-RL is selected automatically.

Compiler.CA78K0R

CA78K0R

If this argument is not specified when micomType is set to "MicomType.K0R" or "MicomType.RL78" in CS+ for CACX, CA78K0R is selected automatically.

Compiler.CA78K0

CA78K0

If this argument is not specified when micomType is set to "MicomType.K0", CA78K0 is selected automatically.

Compiler.GHSCC

GHSCC

The compiler from Green Hills Software.

subProject

Specify whether to create a main project or a subproject.

False: Create a main project (default).

True: Create a subproject.

[Return value]

If a new project was created successfully: True

If there was an error when creating a new project: False

[Detailed description]

-

This function creates a new project file specified by fileName.
Specify the microcontroller of the project by micomType and deviceName.
Specify the kind of the project by projectKind.

-

If subProject is set to "True", then a subproject is created.

[Example of use]

>>>project.Create("C:/project/test.mtpj", MicomType.RX, "R5F52105AxFN", ProjectKind.Application)
True
>>>