Updated README.md to include instructions for different operating systems. Reduced duplicate code.

pull/5666/head
Mike Harrington 2018-02-13 14:56:54 -05:00
parent d93bdafbf1
commit 8c87c2692c
2 changed files with 36 additions and 16 deletions

View File

@ -1,13 +1,25 @@
CrossCore Embedded Studio (CCES) can generate IDE projects from the command line using .json input files.
# Create and build CrossCore Embedded Studio projects
CrossCore Embedded Studio (CCES) can generate and build IDE projects from the command line using .json input files.
## Create a new project
Run the following headless tools command to create your CrossCore Embedded Studio project using the .json file generated by the ARM mbed exporter:
> {{ project_create_command }}
{% for operating_system, command in commands['create'].items() %}
### {{ operating_system }}
> {{ command }}
where "WORKSPACE" is the path to the desired CCES workspace directory.
{% endfor %}
where "CCES_HOME" is an environment variable pointing to the root CCES installation directory and "WORKSPACE" is the path to the desired CCES workspace directory.
Once the CrossCore Embedded Studio project is generated, you can import the project into the IDE for development and debugging. You can also use headless tools to build the project with the following command:
> {{ project_build_command }}
Once the CrossCore Embedded Studio project is generated, you can import the project into the IDE for development and debugging.
where "WORKSPACE" is the path to the desired CCES workspace directory.
## Build a project
Once created, you can use headless tools to build the project with the following command:
{% for operating_system, command in commands['build'].items() %}
### {{ operating_system }}
> {{ command }}
{% endfor %}
where "CCES_HOME" is an environment variable pointing to the root CCES installation directory and "WORKSPACE" is the path to the desired CCES workspace directory.
For more information on how to use CrossCore Embedded Studio and headless tools, please see the CrossCore Embedded Studio Help.

View File

@ -139,9 +139,7 @@ class CCES(Exporter):
# remove these flags without converting to option
# since they are added by CCES
remove = ["-c"]
for flag in remove:
if flag in flags:
flags.remove(flag)
CCES.clean_flags(flags, remove)
value = prefix + "option.dwarfversion.enumerated.v2"
for flag in flags:
@ -163,9 +161,7 @@ class CCES(Exporter):
# remove these flags without converting to option
# since they are added by CCES
remove = ["-x", "assembler-with-cpp"]
for flag in remove:
if flag in flags:
flags.remove(flag)
CCES.clean_flags(flags, remove)
booleans = {"-v": "arm.assembler.option.verbose",
"-g": "arm.assembler.option.debuginfo"}
@ -389,11 +385,23 @@ class CCES(Exporter):
# generate a readme on how to create the CCES project
# using the generated .json file
cces_paths = {
"Windows" : "%CCES_HOME%\\Eclipse\\ccesc.exe",
"Linux" : "${CCES_HOME}/Eclipse/cces",
"MacOS" : "${CCES_HOME}/MacOS/cces"
}
commands = {"create":{}, "build":{}}
for operating_system, path in cces_paths.items():
commands["create"][operating_system] = \
CCES.get_project_create_command(path, \
"WORKSPACE", project)
commands["build"][operating_system] = \
CCES.get_project_build_command(path, \
"WORKSPACE", project)
jinja_ctx = {
'project_create_command' : CCES.get_project_create_command("cces", \
"WORKSPACE", project),
'project_build_command' : CCES.get_project_build_command("cces", \
"WORKSPACE", project)
'commands' : commands
}
self.gen_file('cces/README.md.tmpl', jinja_ctx, "README.md")