Skip to main content

FMSH(Fudan Microelectronics) general-purpose MCU families IDE project generator.

Project description

FMSH Project Generator is a project generation tool for FuDan Microelectronics general-purposed MCU families:

  • FM33LC0

  • FM33LG0(A)

  • FM33LE0(A)

  • FM33FR0

  • FM33FT0A

  • FM33FG0A

  • FM33LF0

  • FM33FK5

  • upcoming MCUs…

FMSH Project Generator allows you to define a project using .YAML files. It can generate IDE project based on the .yaml record, and one should never spend a lot of time again migrating their projects among these IDEs. it also featured a ‘import project’ function, which allows user to generate their YAML project files more conveniently from presenting IDE projects.

This project is inspired by open-sourced project project_generator.

Installing

Install and update using pip:

$ pip install -U FMSHProjectGenerator

How to use

User should first create an instance of ProjectGenerator before using any of the functions:

from FMSHProjectGenerator import ProjectGenerator

proj_gen = ProjectGenerator()

Generate IDE Project

Following code example demonstrated how to use FMSHProjectGenerator and a project description file(*.yaml) to generate IDE project (Keil5 project for this example, wich will generated in ./my_project_path/MDK-ARM):

from FMSHProjectGenerator.generators import Keil5Generator, Keil5VersionType
from FMSHProjectGenerator import ProjectGenerator

# create an instance
proj_gen = ProjectGenerator()

# generate KEIL5 project using input YAML
proj_gen.generate(dest_prj_path='./my_project_path',
                   generator=Keil5Generator(),
                   generator_version=Keil5VersionType.V5,
                   input_desc='./my_project_path/project.yaml')

User can also generate IDE project using existing dict, which makes the FMSHProjectGenerator easier to work with other project. Just modify the input_desc param to the dict which describes your project:

proj_desc = {
   # Your project description here
}

proj_gen.generate(dest_prj_path='./my_project_path',
                   generator=Keil5Generator(),
                   generator_version=Keil5VersionType.V5,
                   input_desc=proj_desc)

the generate function can accepts keyword args depending on the generator you used. For example, Keil5Generator class accepts the combine arg to control whether it should combine existing project(which has the same name) into the generated project:

proj_gen.generate(dest_prj_path='./my_project_path',
                  generator=Keil5Generator(),
                  generator_version=Keil5VersionType.V5,
                  input_desc=proj_desc,
                  combine=True)

Import IDE Project

Following code example demonstrated how to use FMSHProjectGenerator to import IDE project (Keil5 project for this example, which will generated the project YAML file as ./my_project_path/project.yaml):

from FMSHProjectGenerator.converters import Keil5P27Converter
from FMSHProjectGenerator import ProjectGenerator

# create an instance
proj_gen = ProjectGenerator()

# convert KEIL5 project(will automatically search required project files)
proj_gen.convert(src_prj_path='./my_project_path',
                   converter=Keil5P27Converter(),
                   output_file='./my_project_path/project.yaml')

Noet that the convert function also return the generated project description in order to cooperate with other programs.

Import and Generate IDE Project

After import or generate an IDE project, ProjectGenerator will always retain the latest project information. So it’s easy to import from one IDE Project and generate other IDEs’ Project:

from FMSHProjectGenerator.converters import Keil5Converter
from FMSHProjectGenerator.generators import IARGenerator, IARVersionType
from FMSHProjectGenerator import ProjectGenerator

# create an instance
proj_gen = ProjectGenerator()

# convert KEIL5 project
proj_gen.convert(src_prj_path='./my_project_path',
                   converter=Keil5P27Converter())

# generate IAR 8.32 project using retained info
proj_gen.generate(dest_prj_path='./my_project_path',
                   generator=IARGenerator(),
                   generator_version=IARVersionType.V8_32)

User should notice that the ‘generate’ and ‘convert’ function can both omit the ‘input/output_file’ option, which tells the Project Generator to generate/import IDE Project using/updating retained project information only.

Status of the project

The project is now in alpha phase.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FMSHProjectGenerator-0.0.19.tar.gz (39.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FMSHProjectGenerator-0.0.19-py3-none-any.whl (60.7 kB view details)

Uploaded Python 3

File details

Details for the file FMSHProjectGenerator-0.0.19.tar.gz.

File metadata

  • Download URL: FMSHProjectGenerator-0.0.19.tar.gz
  • Upload date:
  • Size: 39.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for FMSHProjectGenerator-0.0.19.tar.gz
Algorithm Hash digest
SHA256 a3249d5c5432df15c59712b14cc1824b14528946ee5700b353bd8334abcf2800
MD5 9428e972a1d9649f2891588fb7786f1e
BLAKE2b-256 c78f50ce1fcf3e2645e9570c4612d0716c3cce9003f4bf90f31d43e773eff587

See more details on using hashes here.

File details

Details for the file FMSHProjectGenerator-0.0.19-py3-none-any.whl.

File metadata

File hashes

Hashes for FMSHProjectGenerator-0.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 f8ba7d70937cbd8c8bf528e67833fa6257840ab8c6d84ba6a483fb6029d5cef0
MD5 41f73c6446f887176fef639fd1ff8c80
BLAKE2b-256 cf3200bbf63e72bd265cadc4959b58f4730bb783cbfbb3aaa192e4d6fba57220

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page