From 703f8f93319086c50ffc380b9b6abf3eca62f4ea Mon Sep 17 00:00:00 2001 From: ohagendorf Date: Fri, 19 Sep 2014 21:12:17 +0200 Subject: [PATCH] [EXPORT] [NUCLEO_F4x1RE] and [DISCO_F407VG] export to CoIDE - export project with export_test.py - projects can be compiled, downloaded and debugged with CoIDE 1.7.7 - STM32F411xx is not yet supported directly by CoIDE - STM32F401RE it not supported but STM32F401RB is (differences in flash size) - but the generated project files for the Nucleo boards contain correct FLASH and RAM sizes and that seems to be enough --- workspace_tools/export/coide.py | 13 +++ .../export/coide_disco_f407vg.coproj.tmpl | 90 +++++++++++++++++++ .../export/coide_nucleo_f401re.coproj.tmpl | 90 +++++++++++++++++++ .../export/coide_nucleo_f411re.coproj.tmpl | 90 +++++++++++++++++++ workspace_tools/export_test.py | 4 + 5 files changed, 287 insertions(+) create mode 100644 workspace_tools/export/coide_disco_f407vg.coproj.tmpl create mode 100644 workspace_tools/export/coide_nucleo_f401re.coproj.tmpl create mode 100644 workspace_tools/export/coide_nucleo_f411re.coproj.tmpl diff --git a/workspace_tools/export/coide.py b/workspace_tools/export/coide.py index 4d88079e39..543f93fadc 100644 --- a/workspace_tools/export/coide.py +++ b/workspace_tools/export/coide.py @@ -25,6 +25,9 @@ class CoIDE(Exporter): TARGETS = [ 'KL25Z', 'KL05Z', + 'DISCO_F407VG', + 'NUCLEO_F401RE', + 'NUCLEO_F411RE' ] # seems like CoIDE currently supports only one type @@ -33,6 +36,9 @@ class CoIDE(Exporter): 'cpp_sources':'1', 's_sources':'1' } + FILE_TYPES2 = { + 'headers':'1' + } def generate(self): self.resources.win_to_unix() @@ -42,6 +48,12 @@ class CoIDE(Exporter): source_files.append({ 'name': basename(file), 'type': n, 'path': file }) + header_files = [] + for r_type, n in CoIDE.FILE_TYPES2.iteritems(): + for file in getattr(self.resources, r_type): + header_files.append({ + 'name': basename(file), 'type': n, 'path': file + }) libraries = [] for lib in self.resources.libraries: @@ -51,6 +63,7 @@ class CoIDE(Exporter): ctx = { 'name': self.program_name, 'source_files': source_files, + 'header_files': header_files, 'include_paths': self.resources.inc_dirs, 'scatter_file': self.resources.linker_script, 'library_paths': self.resources.lib_dirs, diff --git a/workspace_tools/export/coide_disco_f407vg.coproj.tmpl b/workspace_tools/export/coide_disco_f407vg.coproj.tmpl new file mode 100644 index 0000000000..338a1f0e0e --- /dev/null +++ b/workspace_tools/export/coide_disco_f407vg.coproj.tmpl @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + {% for file in source_files %} + + {% endfor %} + {% for file in header_files %} + + {% endfor %} + + diff --git a/workspace_tools/export/coide_nucleo_f401re.coproj.tmpl b/workspace_tools/export/coide_nucleo_f401re.coproj.tmpl new file mode 100644 index 0000000000..b548d4fdab --- /dev/null +++ b/workspace_tools/export/coide_nucleo_f401re.coproj.tmpl @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + {% for file in source_files %} + + {% endfor %} + {% for file in header_files %} + + {% endfor %} + + diff --git a/workspace_tools/export/coide_nucleo_f411re.coproj.tmpl b/workspace_tools/export/coide_nucleo_f411re.coproj.tmpl new file mode 100644 index 0000000000..93e7a420f4 --- /dev/null +++ b/workspace_tools/export/coide_nucleo_f411re.coproj.tmpl @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + {% for file in source_files %} + + {% endfor %} + {% for file in header_files %} + + {% endfor %} + + diff --git a/workspace_tools/export_test.py b/workspace_tools/export_test.py index 565355a23b..16519ca4f5 100755 --- a/workspace_tools/export_test.py +++ b/workspace_tools/export_test.py @@ -76,6 +76,10 @@ if __name__ == '__main__': setup_test_user_prj() for toolchain, target in [ + ('coide', 'DISCO_F407VG'), + ('coide', 'NUCLEO_F401RE'), + ('coide', 'NUCLEO_F411RE'), + ('uvision', 'LPC1768'), ('uvision', 'LPC11U24'), ('uvision', 'KL25Z'),