From 3bcffe7db35bc52ab8f4746f3280218eb4b5596c Mon Sep 17 00:00:00 2001 From: takemasa Date: Sun, 26 Aug 2012 23:01:42 +0900 Subject: [PATCH] =?utf8?q?=E7=AE=A1=E7=90=86=E3=83=95=E3=82=A1=E3=82=A4?= =?utf8?q?=E3=83=AB=E7=AD=89=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../de.loskutov.anyedit.AnyEditTools.prefs | 15 + i2c-test/.settings/org.eclipse.cdt.core.prefs | 162 ++++++ i2c-test/.settings/org.eclipse.cdt.ui.prefs | 3 + i2c-test/kernel/.project | 11 + .../.settings/org.eclipse.core.resources.prefs | 3 + .../.settings/org.eclipse.core.runtime.prefs | 3 + .../config/blackfin/acb_bf592/jsp_acb_bf592.dpj | 617 +++++++++++++++++++++ .../blackfin/ezkit_bf518/jsp_ezkit_bf518.dpj | 617 +++++++++++++++++++++ .../sample1_acb_bf592/chip_dump_empty.c | 37 ++ .../blackfin-vdsp/sample1_acb_bf592/config.bat | 17 + .../blackfin-vdsp/sample1_acb_bf592/kernel_cfg.c | 181 ++++++ .../blackfin-vdsp/sample1_acb_bf592/kernel_id.h | 16 + .../blackfin-vdsp/sample1_acb_bf592/readme.txt | 21 + .../blackfin-vdsp/sample1_acb_bf592/sample1.c | 417 ++++++++++++++ .../blackfin-vdsp/sample1_acb_bf592/sample1.cfg | 28 + .../blackfin-vdsp/sample1_acb_bf592/sample1.dpj | 243 ++++++++ .../blackfin-vdsp/sample1_acb_bf592/sample1.h | 215 +++++++ .../blackfin-vdsp/sample1_acb_bf592/sample1.ldf | 406 ++++++++++++++ .../sample1_acb_bf592/sample1_acb_bf592.dpg | 12 + .../sample1_ezkit_bf506/chip_dump_empty.c | 37 ++ .../sample1_ezkit_bf518/chip_dump_empty.c | 38 ++ .../blackfin-vdsp/sample1_ezkit_bf518/config.bat | 17 + .../blackfin-vdsp/sample1_ezkit_bf518/kernel_cfg.c | 181 ++++++ .../blackfin-vdsp/sample1_ezkit_bf518/kernel_id.h | 16 + .../blackfin-vdsp/sample1_ezkit_bf518/readme.txt | 35 ++ .../blackfin-vdsp/sample1_ezkit_bf518/sample1.c | 417 ++++++++++++++ .../blackfin-vdsp/sample1_ezkit_bf518/sample1.cfg | 28 + .../blackfin-vdsp/sample1_ezkit_bf518/sample1.dpj | 240 ++++++++ .../blackfin-vdsp/sample1_ezkit_bf518/sample1.h | 215 +++++++ .../blackfin-vdsp/sample1_ezkit_bf518/sample1.ldf | 480 ++++++++++++++++ .../sample1_ezkit_bf518/sample1_ezkit_bf518.dpg | 12 + 31 files changed, 4740 insertions(+) create mode 100644 i2c-test/.settings/de.loskutov.anyedit.AnyEditTools.prefs create mode 100644 i2c-test/.settings/org.eclipse.cdt.core.prefs create mode 100644 i2c-test/.settings/org.eclipse.cdt.ui.prefs create mode 100644 i2c-test/kernel/.project create mode 100644 i2c-test/kernel/.settings/org.eclipse.core.resources.prefs create mode 100644 i2c-test/kernel/.settings/org.eclipse.core.runtime.prefs create mode 100644 i2c-test/kernel/config/blackfin/acb_bf592/jsp_acb_bf592.dpj create mode 100755 i2c-test/kernel/config/blackfin/ezkit_bf518/jsp_ezkit_bf518.dpj create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/chip_dump_empty.c create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/config.bat create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/kernel_cfg.c create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/kernel_id.h create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/readme.txt create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.c create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.cfg create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.dpj create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.h create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.ldf create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1_acb_bf592.dpg create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf506/chip_dump_empty.c create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/chip_dump_empty.c create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/config.bat create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/kernel_cfg.c create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/kernel_id.h create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/readme.txt create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.c create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.cfg create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.dpj create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.h create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.ldf create mode 100644 i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1_ezkit_bf518.dpg diff --git a/i2c-test/.settings/de.loskutov.anyedit.AnyEditTools.prefs b/i2c-test/.settings/de.loskutov.anyedit.AnyEditTools.prefs new file mode 100644 index 0000000..4e815b2 --- /dev/null +++ b/i2c-test/.settings/de.loskutov.anyedit.AnyEditTools.prefs @@ -0,0 +1,15 @@ +activeContentFilterList=*.makefile,makefile,*.Makefile,Makefile,Makefile.*,*.mk,MANIFEST.MF +addNewLine=true +convertActionOnSaave=AnyEdit.CnvrtTabToSpaces +eclipse.preferences.version=1 +inActiveContentFilterList= +javaTabWidthForJava=true +org.eclipse.jdt.ui.editor.tab.width=4 +projectPropsEnabled=false +removeTrailingSpaces=true +replaceAllSpaces=false +replaceAllTabs=true +saveAndAddLine=true +saveAndConvert=true +saveAndTrim=true +useModulo4Tabs=true diff --git a/i2c-test/.settings/org.eclipse.cdt.core.prefs b/i2c-test/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 0000000..9d65247 --- /dev/null +++ b/i2c-test/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,162 @@ +eclipse.preferences.version=1 +org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.cdt.core.formatter.alignment_for_assignment=16 +org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80 +org.eclipse.cdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.cdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=34 +org.eclipse.cdt.core.formatter.alignment_for_conditional_expression_chain=18 +org.eclipse.cdt.core.formatter.alignment_for_constructor_initializer_list=0 +org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16 +org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=48 +org.eclipse.cdt.core.formatter.alignment_for_expression_list=0 +org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.cdt.core.formatter.alignment_for_member_access=0 +org.eclipse.cdt.core.formatter.alignment_for_overloaded_left_shift_chain=16 +org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.cdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.cdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.cdt.core.formatter.comment.min_distance_between_code_and_line_comment=1 +org.eclipse.cdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.cdt.core.formatter.compact_else_if=true +org.eclipse.cdt.core.formatter.continuation_indentation=2 +org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header=false +org.eclipse.cdt.core.formatter.indent_access_specifier_extra_spaces=0 +org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier=true +org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header=false +org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header=false +org.eclipse.cdt.core.formatter.indent_empty_lines=false +org.eclipse.cdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.cdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.cdt.core.formatter.indentation.size=4 +org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_colon_in_constructor_initializer_list=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.cdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments=insert +org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters=insert +org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause=insert +org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments=insert +org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters=insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.cdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.cdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.cdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.cdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.cdt.core.formatter.join_wrapped_lines=true +org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.cdt.core.formatter.lineSplit=80 +org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.cdt.core.formatter.tabulation.char=space +org.eclipse.cdt.core.formatter.tabulation.size=4 +org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations=false diff --git a/i2c-test/.settings/org.eclipse.cdt.ui.prefs b/i2c-test/.settings/org.eclipse.cdt.ui.prefs new file mode 100644 index 0000000..8095e8b --- /dev/null +++ b/i2c-test/.settings/org.eclipse.cdt.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +formatter_profile=_K&R [built-in] no tab +formatter_settings_version=1 diff --git a/i2c-test/kernel/.project b/i2c-test/kernel/.project new file mode 100644 index 0000000..a38dab5 --- /dev/null +++ b/i2c-test/kernel/.project @@ -0,0 +1,11 @@ + + + jsp + + + + + + + + diff --git a/i2c-test/kernel/.settings/org.eclipse.core.resources.prefs b/i2c-test/kernel/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..3945f59 --- /dev/null +++ b/i2c-test/kernel/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Sat May 30 17:38:15 JST 2009 +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/i2c-test/kernel/.settings/org.eclipse.core.runtime.prefs b/i2c-test/kernel/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000..9d8c041 --- /dev/null +++ b/i2c-test/kernel/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,3 @@ +#Sat May 30 17:38:15 JST 2009 +eclipse.preferences.version=1 +line.separator=\n diff --git a/i2c-test/kernel/config/blackfin/acb_bf592/jsp_acb_bf592.dpj b/i2c-test/kernel/config/blackfin/acb_bf592/jsp_acb_bf592.dpj new file mode 100644 index 0000000..6df5d35 --- /dev/null +++ b/i2c-test/kernel/config/blackfin/acb_bf592/jsp_acb_bf592.dpj @@ -0,0 +1,617 @@ + + + + + ADSP-BF592-A + .dlb + Library file + + + + + .\Debug + . + 0 + + + + + + + + + + + + + + + + + + + + + + + .\Release + . + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + + + diff --git a/i2c-test/kernel/config/blackfin/ezkit_bf518/jsp_ezkit_bf518.dpj b/i2c-test/kernel/config/blackfin/ezkit_bf518/jsp_ezkit_bf518.dpj new file mode 100755 index 0000000..07e9283 --- /dev/null +++ b/i2c-test/kernel/config/blackfin/ezkit_bf518/jsp_ezkit_bf518.dpj @@ -0,0 +1,617 @@ + + + + + ADSP-BF518 + .dlb + Library file + + + + + .\Debug + . + 0 + + + + + + + + + + + + + + + + + + + + + + + .\Release + . + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + . + + + + + .\Release + . + + + + + + + + + + + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/chip_dump_empty.c b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/chip_dump_empty.c new file mode 100644 index 0000000..014717f --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/chip_dump_empty.c @@ -0,0 +1,37 @@ +/** + * \file chip_dump_dummy.c +* \brief ADSP-BF592用のポストモーテムダンプルーチン群(ダミー) + * + * chip_dump.cはコードサイズが大きく、例外時にしか必要としない機能のため、 + * sample1では機能を無効にしてフットプリントを少なくしている + * chip_dump.cを使用する場合、chip_dump.cのみFLASHに配置するなど対策が必要 + */ +#include "jsp_kernel.h" + +/** + * \brief ハードウェア・エラー・ハンドラ + * + * ハードウェア・エラー時に呼び出されて、ハードウェア・エラー・割り込みのポストモーテム処理を行う。 + * 最初にFPを手繰って、割り込みのスタックフレームを探す。次にすべての割り込みを禁止し、 + * UART0を占有したあと、ポーリングを使ってスタックに保存された各レジスタのダンプを行う。 + * DEF_INH(INHNO_HW_ERROR, { TA_HLNG, hwei_handler }); + * + */ +void spurious_int_handler() +{ +} + +/** + * \brief CPU例外ハンドラ + * + * CPU例外ハンドラとしてcfgファイルに登録する。 hwei_handler()は呼ばれたら戻ってこないが、 + * そのあとにもexpFlagに値を代入しているのは、最適化によってunlink命令の値がルーチン呼び出しの + * 前に移動することを防ぐためである。 + * + * DEF_EXC(CPUEXC1, { TA_HLNG, excp_handler} ); + * + */ +void spurious_exc_handler(VP p_excinf) +{ +} + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/config.bat b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/config.bat new file mode 100644 index 0000000..a0a8efc --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/config.bat @@ -0,0 +1,17 @@ +rem APPNAME アプリケーション名 +rem CFGPATH cfg.exeが置いてあるディレクトリ +rem VDSPPATH VisualDSP++のインストールディレクトリ +rem JSPPATH TOPPERS/JSPのディレクトリ +rem CPATH Blackfin CPU依存部のディレクトリ +rem SPATH システム依存部のディレクトリ + +set APPNAME=sample1 +set CFGPATH=X:\Work\jsp +set VDSPPATH=C:\Program Files\Analog Devices\VisualDSP 5.0 +set JSPPATH=X:\Work\jsp +set CPATH=%JSPPATH%\config\blackfin +set SPATH=%CPATH%\ezkit_bf592;%CPATH%\_common_bf592 + +"%VDSPPATH%\pp.exe" %APPNAME%.cfg -D__ECC__ -D__ADSPLPBLACKFIN__ -I"%CPATH%;%SPATH%;%JSPPATH%\systask;%JSPPATH%\include;" > %APPNAME%_pp.cfg +"%CFGPATH%\cfg.exe" %APPNAME%_pp.cfg +del %APPNAME%_pp.cfg diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/kernel_cfg.c b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/kernel_cfg.c new file mode 100644 index 0000000..b50a794 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/kernel_cfg.c @@ -0,0 +1,181 @@ +/* Configured with [sample1_pp.cfg ] */ + +#include "kernel_cfg.h" +#include "kernel_id.h" + +#if TKERNEL_PRVER >= 0x1040 +#define CFG_INTHDR_ENTRY(inthdr) INTHDR_ENTRY(inthdr) +#define CFG_EXCHDR_ENTRY(exchdr) EXCHDR_ENTRY(exchdr) +#define CFG_INT_ENTRY(inthdr) INT_ENTRY(inthdr) +#define CFG_EXC_ENTRY(exchdr) EXC_ENTRY(exchdr) +#else +#error "This configuration file has no compatibility with TOPPERS/JSP rel 1.3 or earlier." +#endif + +#ifndef __EMPTY_LABEL +#define __EMPTY_LABEL(x,y) x y[0] +#endif + +#if TKERNEL_PRID != 0x0001u /* TOPPERS/JSP */ +#error "You can not use this configuration file without TOPPERS/JSP" +#endif + + /* User specified include files*/ +#include "sample1.h" +#include "hw_timer.h" +#include "timer.h" +#include "hw_serial.h" +#include "serial.h" +#include "logtask.h" + + + /* Object initializer [task] */ + +#define TNUM_TSKID 5 + +const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1); + +static __STK_UNIT __stack_TASK1[__TCOUNT_STK_UNIT(1024)]; +static __STK_UNIT __stack_TASK2[__TCOUNT_STK_UNIT(1024)]; +static __STK_UNIT __stack_TASK3[__TCOUNT_STK_UNIT(1024)]; +static __STK_UNIT __stack_MAIN_TASK[__TCOUNT_STK_UNIT(1024)]; +static __STK_UNIT __stack_LOGTASK[__TCOUNT_STK_UNIT(LOGTASK_STACK_SIZE)]; + +const TINIB _kernel_tinib_table[TNUM_TSKID] = { + {0, (VP_INT)(( VP_INT ) 1), (FP)(task), INT_PRIORITY(10), __TROUND_STK_UNIT(1024), __stack_TASK1, 0, (FP)(tex_routine)}, + {0, (VP_INT)(( VP_INT ) 2), (FP)(task), INT_PRIORITY(10), __TROUND_STK_UNIT(1024), __stack_TASK2, 0, (FP)(tex_routine)}, + {0, (VP_INT)(( VP_INT ) 3), (FP)(task), INT_PRIORITY(10), __TROUND_STK_UNIT(1024), __stack_TASK3, 0, (FP)(tex_routine)}, + {0x00u | 0x02u, (VP_INT)(0), (FP)(main_task), INT_PRIORITY(5), __TROUND_STK_UNIT(1024), __stack_MAIN_TASK, TA_NULL, (FP)(NULL)}, + {0x00u | 0x02u, (VP_INT)(( VP_INT ) LOGTASK_PORTID), (FP)(logtask), INT_PRIORITY(LOGTASK_PRIORITY), __TROUND_STK_UNIT(LOGTASK_STACK_SIZE), __stack_LOGTASK, TA_NULL, (FP)(NULL)} +}; + +const ID _kernel_torder_table[TNUM_TSKID] = {1,2,3,4,5}; + +TCB _kernel_tcb_table[TNUM_TSKID]; + + + /* Object initializer [semaphore] */ + +#define TNUM_SEMID 2 + +const ID _kernel_tmax_semid = (TMIN_SEMID + TNUM_SEMID - 1); + +const SEMINIB _kernel_seminib_table[TNUM_SEMID] = { + {1, 0, 1}, + {1, 1, 1} +}; + +SEMCB _kernel_semcb_table[TNUM_SEMID]; + + + /* Object initializer [eventflag] */ + +#define TNUM_FLGID 0 + +const ID _kernel_tmax_flgid = (TMIN_FLGID + TNUM_FLGID - 1); + +__EMPTY_LABEL(const FLGINIB, _kernel_flginib_table); +__EMPTY_LABEL(FLGCB, _kernel_flgcb_table); + + + /* Object initializer [dataqueue] */ + +#define TNUM_DTQID 0 + +const ID _kernel_tmax_dtqid = (TMIN_DTQID + TNUM_DTQID - 1); + +__EMPTY_LABEL(const DTQINIB, _kernel_dtqinib_table); +__EMPTY_LABEL(DTQCB, _kernel_dtqcb_table); + + + /* Object initializer [mailbox] */ + +#define TNUM_MBXID 0 + +const ID _kernel_tmax_mbxid = (TMIN_MBXID + TNUM_MBXID - 1); + +__EMPTY_LABEL(const MBXINIB, _kernel_mbxinib_table); +__EMPTY_LABEL(MBXCB, _kernel_mbxcb_table); + + + /* Object initializer [mempfix] */ + +#define TNUM_MPFID 0 + +const ID _kernel_tmax_mpfid = (TMIN_MPFID + TNUM_MPFID - 1); + +__EMPTY_LABEL(const MPFINIB, _kernel_mpfinib_table); +__EMPTY_LABEL(MPFCB, _kernel_mpfcb_table); + + + /* Object initializer [cyclic] */ + +#define TNUM_CYCID 1 + +const ID _kernel_tmax_cycid = (TMIN_CYCID + TNUM_CYCID - 1); + +const CYCINIB _kernel_cycinib_table[TNUM_CYCID] = { + {0,0,(FP)(cyclic_handler),2000,0} +}; + +CYCCB _kernel_cyccb_table[TNUM_CYCID]; + + + /* Object initializer [interrupt] */ + +#define TNUM_INHNO 3 + +const UINT _kernel_tnum_inhno = TNUM_INHNO; + +CFG_INTHDR_ENTRY(sio0_rx_handler); +CFG_INTHDR_ENTRY(sio0_tx_handler); +CFG_INTHDR_ENTRY(timer_handler); + +const INHINIB _kernel_inhinib_table[TNUM_INHNO] = { + {INHNO_SIO0_RX,0,(FP)CFG_INT_ENTRY(sio0_rx_handler)}, + {INHNO_SIO0_TX,0,(FP)CFG_INT_ENTRY(sio0_tx_handler)}, + {INHNO_TIMER,0,(FP)CFG_INT_ENTRY(timer_handler)} +}; + + + /* Object initializer [exception] */ + +#define TNUM_EXCNO 1 + +const UINT _kernel_tnum_excno = TNUM_EXCNO; + +CFG_EXCHDR_ENTRY(cpuexc_handler); + +const EXCINIB _kernel_excinib_table[TNUM_EXCNO] = { + {0,0,(FP)CFG_EXC_ENTRY(cpuexc_handler)} +}; + + /* Initialization handler */ + +void +_kernel_call_inirtn(void) +{ + timer_initialize( (VP_INT)(0) ); + serial_initialize( (VP_INT)(0) ); +} + +void +_kernel_call_terrtn(void) +{ + timer_terminate( (VP_INT)(0) ); +} + + /* Object initialization routine */ + +void +_kernel_object_initialize(void) +{ + _kernel_task_initialize(); + _kernel_semaphore_initialize(); + _kernel_cyclic_initialize(); + _kernel_interrupt_initialize(); + _kernel_exception_initialize(); +} + +TMEVTN _kernel_tmevt_heap[TNUM_TSKID + TNUM_CYCID]; + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/kernel_id.h b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/kernel_id.h new file mode 100644 index 0000000..bf1af50 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/kernel_id.h @@ -0,0 +1,16 @@ +#ifndef KERNEL_ID_H +#define KERNEL_ID_H + + /* object identifier deifnition */ + +#define CYCHDR1 1 +#define LOGTASK 5 +#define MAIN_TASK 4 +#define SERIAL_RCV_SEM1 1 +#define SERIAL_SND_SEM1 2 +#define TASK1 1 +#define TASK2 2 +#define TASK3 3 + +#endif /* KERNEL_ID_H */ + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/readme.txt b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/readme.txt new file mode 100644 index 0000000..3ccedb9 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/readme.txt @@ -0,0 +1,21 @@ +TOPPERS/JSPのsample1アプリケーションをEZ-KIT Lite BF592 +移植した。 + +ビルドに先立って、jsp/config/blackfin/ezkit_bf592/libkernel.dpjを +ビルドして、libekernel.dlbを作っておくこと。 + +また、jsp/utils/blackfin-vdsp/offset.hは、必要に応じて +作り直すこと。 + +VisualDSP++のICEを使ってロードする場合には、実行直前に次の +二つのレジスタの値に注意すること。 + +sample1.ldfは、VisualDSP++に作らせたあと、自動更新を +停止し、crtを削除したものである。 + +異なるシステム依存部用に改造する場合は、プロジェクトの +Cコンパイラ、およびアセンブラのインクルード・パスを必ず +変更すること。 + +2012/07/20追加 +Visual DSP++ 5.0 Update 10でビルド&動作確認 diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.c b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.c new file mode 100644 index 0000000..dcd8a03 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.c @@ -0,0 +1,417 @@ +/* + * TOPPERS/JSP Kernel + * Toyohashi Open Platform for Embedded Real-Time Systems/ + * Just Standard Profile Kernel + * + * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory + * Toyohashi Univ. of Technology, JAPAN + * Copyright (C) 2004-2006 by Embedded and Real-Time Systems Laboratory + * Graduate School of Information Science, Nagoya Univ., JAPAN + * + * 上記著作権者は,以下の (1)縲・4) の条件か,Free Software Foundation + * によって公表されている GNU General Public License の Version 2 に記 + * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア + * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下, + * 利用と呼ぶ)することを無償で許諾する. + * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 + * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー + * スコード中に含まれていること. + * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 + * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 + * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 + * の無保証規定を掲載すること. + * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 + * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ + * と. + * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 + * 作権表示,この利用条件および下記の無保証規定を掲載すること. + * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに + * 報告すること. + * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 + * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. + * + * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お + * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も + * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直 + * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない. + * + * @(#) $Id: sample1.c,v 1.1 2012/07/20 07:36:00 maduki Exp $ + */ + +/* + * サンプルプログラム(1)の本体 + * + * JSPカーネルの基本的な動作を確認するためのサンプルプログラム. + * + * プログラムの概要: + * + * ユーザインタフェースを受け持つメインタスク(タスクID: MAIN_TASK, + * 優先度: MAIN_PRIORITY)と,三つの並列実行されるタスク(タスクID: + * TASK1縲弋ASK3,初期優先度: MID_PRIORITY)で構成される.また,起動周 + * 期が2秒の周期ハンドラ(周期ハンドラID: CYCHDR1)を用いる. + * + * 並列実行されるタスクは,task_loop 回空ループを実行する度に,タスク + * が実行中であることをあらわすメッセージを表示する. + * + * 周期ハンドラは,三つの優先度(HIGH_PRIORITY,MID_PRIORITY, + * LOW_PRIORITY)のレディキューを回転させる.プログラムの起動直後は, + * 周期ハンドラは停止状態になっている. + * + * メインタスクは,シリアルI/Oポートからの文字入力を行い(文字入力を + * 待っている間は,並列実行されるタスクが実行されている),入力された + * 文字に対応した処理を実行する.入力された文字と処理の関係は次の通り. + * Control-C または 'Q' が入力されると,プログラムを終了する. + * + * '1' : 以降のコマンドは TASK1 に対して行う. + * '2' : 以降のコマンドは TASK2 に対して行う. + * '3' : 以降のコマンドは TASK3 に対して行う. + * 'a' : タスクを act_tsk により起動する. + * 'A' : タスクに対する起動要求を can_act によりキャンセルする. + * 'e' : タスクに ext_tsk を呼び出させ,終了させる. + * 't' : タスクを ter_tsk により強制終了する. + * '>' : タスクの優先度を HIGH_PRIORITY にする. + * '=' : タスクの優先度を MID_PRIORITY にする. + * '<' : タスクの優先度を LOW_PRIORITY にする. + * 'G' : タスクの優先度を get_pri で読み出す. + * 's' : タスクに slp_tsk を呼び出させ,起床待ちにさせる. + * 'S' : タスクに tslp_tsk(10秒) を呼び出させ,起床待ちにさせる. + * 'w' : タスクを wup_tsk により起床する. + * 'W' : タスクに対する起床要求を can_wup によりキャンセルする. + * 'l' : タスクを rel_wai により強制的に待ち解除にする. + * 'u' : タスクを sus_tsk により強制待ち状態にする. + * 'm' : タスクの強制待ち状態を rsm_tsk により解除する. + * 'M' : タスクの強制待ち状態を frsm_tsk により強制解除する. + * 'd' : タスクに dly_tsk(10秒) を呼び出させ,時間経過待ちにさせる. + * 'x' : タスクにパターン 0x0001 の例外処理を要求する. + * 'X' : タスクにパターン 0x0002 の例外処理を要求する. + * 'y' : タスクに dis_tex を呼び出させ,タスク例外を禁止する. + * 'Y' : タスクに ena_tex を呼び出させ,タスク例外を許可する. + * 'r' : 三つの優先度(HIGH_PRIORITY,MID_PRIORITY,LOW_PRIORITY)の + * レディキューを回転させる. + * 'c' : 周期ハンドラを動作させる. + * 'C' : 周期ハンドラを停止させる. + * 'z' : CPU例外を発生させる. + * 'Z' : CPUロック状態でCPU例外を発生させる(プログラムを終了する). + * 'V' : vxget_tim で性能評価用システム時刻を2回読む. + * 'v' : 発行したシステムコールを表示する(デフォルト). + * 'q' : 発行したシステムコールを表示しない. + */ + +#include +#include "kernel_id.h" +#include "sample1.h" + +/* + * 並行実行されるタスクへのメッセージ領域 + */ +char message[3]; + +/* + * ループ回数 + */ +UW task_loop; /* タスク内でのループ回数 */ +UW tex_loop; /* 例外処理ルーチン内でのループ回数 */ + +/* + * 並行実行されるタスク + */ +void task(VP_INT exinf) +{ + volatile UW i; + INT n = 0; + INT tskno = (INT) exinf; + const char *graph[] = { "|", " +", " *" }; + char c; + + ena_tex(); + while (1) { + syslog(LOG_NOTICE, "task%d is running (%03d). %s", + tskno, ++n, graph[tskno-1]); + for (i = 0; i < task_loop; i++); + c = message[tskno-1]; + message[tskno-1] = 0; + switch (c) { + case 'e': + syslog(LOG_INFO, "#%d#ext_tsk()", tskno); + ext_tsk(); + case 's': + syslog(LOG_INFO, "#%d#slp_tsk()", tskno); + syscall(slp_tsk()); + break; + case 'S': + syslog(LOG_INFO, "#%d#tslp_tsk(10000)", tskno); + syscall(tslp_tsk(10000)); + break; + case 'd': + syslog(LOG_INFO, "#%d#dly_tsk(10000)", tskno); + syscall(dly_tsk(10000)); + break; + case 'y': + syslog(LOG_INFO, "#%d#dis_tex()", tskno); + syscall(dis_tex()); + break; + case 'Y': + syslog(LOG_INFO, "#%d#ena_tex()", tskno); + syscall(ena_tex()); + break; +#ifdef CPUEXC1 + case 'z': + syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno); + RAISE_CPU_EXCEPTION; + break; + case 'Z': + loc_cpu(); + syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno); + RAISE_CPU_EXCEPTION; + unl_cpu(); + break; +#endif /* CPUEXC1 */ + default: + break; + } + } +} + +/* + * 並行して実行されるタスク用のタスク例外処理ルーチン + */ +void tex_routine(TEXPTN texptn, VP_INT exinf) +{ + volatile UW i; + INT tskno = (INT) exinf; + + syslog(LOG_NOTICE, "task%d receives exception 0x%04x. ", + tskno, texptn); + for (i = 0; i < tex_loop; i++); + + if (texptn & 0x8000) { + syslog(LOG_INFO, "#%d#ext_tsk()", tskno); + ext_tsk(); + } +} + +/* + * CPU例外ハンドラ + */ +#ifdef CPUEXC1 + +void +cpuexc_handler(VP p_excinf) +{ + ID tskid; + + syslog(LOG_NOTICE, "CPU exception handler (p_excinf = %08p).", + p_excinf); + if (sns_ctx() != TRUE) { + syslog(LOG_WARNING, + "sns_ctx() is not TRUE in CPU exception handler."); + } + if (sns_dpn() != TRUE) { + syslog(LOG_WARNING, + "sns_dpn() is not TRUE in CPU exception handler."); + } + syslog(LOG_DEBUG, + "sns_loc = %d sns_dsp = %d", sns_loc(), sns_dsp()); + syslog(LOG_DEBUG, + "vxsns_loc = %d vxsns_ctx = %d vxsns_dsp = %d vxsns_dpn = %d", + vxsns_loc(p_excinf), vxsns_ctx(p_excinf), + vxsns_dsp(p_excinf), vxsns_dpn(p_excinf)); + + if (!vxsns_loc(p_excinf) && !vxsns_ctx(p_excinf)) { + syscall(iget_tid(&tskid)); + syscall(iras_tex(tskid, 0x8000)); + } + else { + syslog(LOG_NOTICE, "Sample program ends with exception."); + kernel_exit(); + } +} + +#endif /* CPUEXC1 */ + +/* + * 周期ハンドラ + * + * HIGH_PRIORITY,MID_PRIORITY,LOW_PRIORITY の各優先度のレディキュー + * を回転させる. + */ +void cyclic_handler(VP_INT exinf) +{ + irot_rdq(HIGH_PRIORITY); + irot_rdq(MID_PRIORITY); + irot_rdq(LOW_PRIORITY); +} + +/* + * メインタスク + */ +void main_task(VP_INT exinf) +{ + char c; + ID tskid = TASK1; + volatile UW i; + INT tskno = 1; + ER_UINT ercd; + PRI tskpri; + SYSTIM stime1, stime2; +#ifndef OMIT_VGET_TIM + SYSUTIM utime1, utime2; +#endif /* OMIT_VGET_TIM */ + + vmsk_log(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_EMERG)); + syslog(LOG_NOTICE, "Sample program starts (exinf = %d).", (INT) exinf); + + syscall(serial_ctl_por(TASK_PORTID, + (IOCTL_CRLF | IOCTL_FCSND | IOCTL_FCRCV))); + + /* + * ループ回数の設定 + */ + task_loop = LOOP_REF; + get_tim(&stime1); + for (i = 0; i < task_loop; i++); + get_tim(&stime2); + task_loop = LOOP_REF * 400 / (stime2 - stime1); + tex_loop = task_loop / 5; + + /* + * タスクの起動 + */ + act_tsk(TASK1); + act_tsk(TASK2); + act_tsk(TASK3); + + /* + * メインループ + */ + do { + syscall(serial_rea_dat(TASK_PORTID, &c, 1)); + switch (c) { + case 'e': + case 's': + case 'S': + case 'd': + case 'y': + case 'Y': + case 'z': + case 'Z': + message[tskno-1] = c; + break; + case '1': + tskno = 1; + tskid = TASK1; + break; + case '2': + tskno = 2; + tskid = TASK2; + break; + case '3': + tskno = 3; + tskid = TASK3; + break; + case 'a': + syslog(LOG_INFO, "#act_tsk(%d)", tskno); + syscall(act_tsk(tskid)); + break; + case 'A': + syslog(LOG_INFO, "#can_act(%d)", tskno); + syscall(ercd = can_act(tskid)); + if (ercd >= 0) { + syslog(LOG_NOTICE, "can_act(%d) returns %d", + tskno, ercd); + } + break; + case 't': + syslog(LOG_INFO, "#ter_tsk(%d)", tskno); + syscall(ter_tsk(tskid)); + break; + case '>': + syslog(LOG_INFO, "#chg_pri(%d, HIGH_PRIORITY)", tskno); + chg_pri(tskid, HIGH_PRIORITY); + break; + case '=': + syslog(LOG_INFO, "#chg_pri(%d, MID_PRIORITY)", tskno); + chg_pri(tskid, MID_PRIORITY); + break; + case '<': + syslog(LOG_INFO, "#chg_pri(%d, LOW_PRIORITY)", tskno); + chg_pri(tskid, LOW_PRIORITY); + break; + case 'G': + syslog(LOG_INFO, "#get_pri(%d, &tskpri)", tskno); + syscall(ercd = get_pri(tskid, &tskpri)); + if (ercd >= 0) { + syslog(LOG_NOTICE, "priority of task %d is %d", + tskno, tskpri); + } + break; + case 'w': + syslog(LOG_INFO, "#wup_tsk(%d)", tskno); + syscall(wup_tsk(tskid)); + break; + case 'W': + syslog(LOG_INFO, "#can_wup(%d)", tskno); + syscall(ercd = can_wup(tskid)); + if (ercd >= 0) { + syslog(LOG_NOTICE, "can_wup(%d) returns %d", + tskno, ercd); + } + break; + case 'l': + syslog(LOG_INFO, "#rel_wai(%d)", tskno); + syscall(rel_wai(tskid)); + break; + case 'u': + syslog(LOG_INFO, "#sus_tsk(%d)", tskno); + syscall(sus_tsk(tskid)); + break; + case 'm': + syslog(LOG_INFO, "#rsm_tsk(%d)", tskno); + syscall(rsm_tsk(tskid)); + break; + case 'M': + syslog(LOG_INFO, "#frsm_tsk(%d)", tskno); + syscall(frsm_tsk(tskid)); + break; + case 'x': + syslog(LOG_INFO, "#ras_tex(%d, 0x0001)", tskno); + syscall(ras_tex(tskid, 0x0001)); + break; + case 'X': + syslog(LOG_INFO, "#ras_tex(%d, 0x0002)", tskno); + syscall(ras_tex(tskid, 0x0002)); + break; + case 'r': + syslog(LOG_INFO, "#rot_rdq(three priorities)"); + rot_rdq(HIGH_PRIORITY); + rot_rdq(MID_PRIORITY); + rot_rdq(LOW_PRIORITY); + break; + case 'c': + sta_cyc(CYCHDR1); + break; + case 'C': + stp_cyc(CYCHDR1); + break; +#ifndef OMIT_VGET_TIM + case 'V': + syscall(vxget_tim(&utime1)); + syscall(vxget_tim(&utime2)); + syslog(LOG_NOTICE, "utime1 = %d, utime2 = %d", + (UINT) utime1, (UINT) utime2); + break; +#endif /* OMIT_VGET_TIM */ + case 'v': + vmsk_log(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_EMERG)); + break; + case 'q': + vmsk_log(LOG_UPTO(LOG_NOTICE), LOG_UPTO(LOG_EMERG)); + break; + default: + break; + } + } while (c != '\003' && c != 'Q'); + + syslog(LOG_NOTICE, "Sample program ends."); + kernel_exit(); +} diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.cfg b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.cfg new file mode 100644 index 0000000..3cf3361 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.cfg @@ -0,0 +1,28 @@ +/* + * @(#) $Id: sample1.cfg,v 1.1 2012/07/20 07:36:00 maduki Exp $ + */ + +/* + * サンプルプログラム(1)のシステムコンフィギュレーションファイル + */ + +#define _MACRO_ONLY +#include "sample1.h" + +INCLUDE("\"sample1.h\""); +CRE_TSK(TASK1, { TA_HLNG, (VP_INT) 1, task, MID_PRIORITY, STACK_SIZE, NULL }); +CRE_TSK(TASK2, { TA_HLNG, (VP_INT) 2, task, MID_PRIORITY, STACK_SIZE, NULL }); +CRE_TSK(TASK3, { TA_HLNG, (VP_INT) 3, task, MID_PRIORITY, STACK_SIZE, NULL }); +CRE_TSK(MAIN_TASK, { TA_HLNG|TA_ACT, 0, main_task, MAIN_PRIORITY, + STACK_SIZE, NULL }); +DEF_TEX(TASK1, { TA_HLNG, tex_routine }); +DEF_TEX(TASK2, { TA_HLNG, tex_routine }); +DEF_TEX(TASK3, { TA_HLNG, tex_routine }); +CRE_CYC(CYCHDR1, { TA_HLNG, 0, cyclic_handler, 2000, 0 }); +#ifdef CPUEXC1 +DEF_EXC(CPUEXC1, { TA_HLNG, cpuexc_handler} ); +#endif /* CPUEXC1 */ + +#include "../systask/timer.cfg" +#include "../systask/serial.cfg" +#include "../systask/logtask.cfg" diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.dpj b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.dpj new file mode 100644 index 0000000..70bc4c5 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.dpj @@ -0,0 +1,243 @@ + + + + + ADSP-BF592-A + .dxe + Executable file + + + + + .\Debug + .\Debug + 0 + + + + + + + + + + + + + + + + + + + + + + + .\Release + .\Release + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.h b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.h new file mode 100644 index 0000000..d6a8b34 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.h @@ -0,0 +1,215 @@ +/* + * TOPPERS/JSP Kernel + * Toyohashi Open Platform for Embedded Real-Time Systems/ + * Just Standard Profile Kernel + * + * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory + * Toyohashi Univ. of Technology, JAPAN + * Copyright (C) 2005 by Embedded and Real-Time Systems Laboratory + * Graduate School of Information Science, Nagoya Univ., JAPAN + * + * 上記著作権者は,以下の (1)縲・4) の条件か,Free Software Foundation + * によって公表されている GNU General Public License の Version 2 に記 + * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア + * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下, + * 利用と呼ぶ)することを無償で許諾する. + * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 + * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー + * スコード中に含まれていること. + * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 + * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 + * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 + * の無保証規定を掲載すること. + * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 + * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ + * と. + * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 + * 作権表示,この利用条件および下記の無保証規定を掲載すること. + * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに + * 報告すること. + * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 + * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. + * + * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お + * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も + * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直 + * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない. + * + * @(#) $Id: sample1.h,v 1.1 2012/07/20 07:36:00 maduki Exp $ + */ + +/* + * サンプルプログラム(1)のヘッダファイル + */ + +#include + +/* + * 各タスクの優先度の定義 + */ + +#define MAIN_PRIORITY 5 /* メインタスクの優先度 */ + /* HIGH_PRIORITY より高くすること */ + +#define HIGH_PRIORITY 9 /* 並列に実行されるタスクの優先度 */ +#define MID_PRIORITY 10 +#define LOW_PRIORITY 11 + +/* + * ターゲット依存の定義(CPU例外ハンドラの起動方法など) + */ + +#ifdef M68K + +#define CPUEXC1 5 /* ゼロ除算例外 */ +#define RAISE_CPU_EXCEPTION syslog(LOG_NOTICE, "zerodiv = %d", 10 / 0) + +#elif defined(SH3) + +#define CPUEXC1 224 /* ロードエラー例外 */ +#define RAISE_CPU_EXCEPTION (*((volatile int *) 0xFFFFFEC1)) + +#elif defined(SH1) + +#define CPUEXC1 9 /* CPUアドレスエラー例外 */ +#define RAISE_CPU_EXCEPTION (*((volatile int *) 0xFFFFFEC1)) +#ifdef TOKIWA_SH1 +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#endif /* TOKIWA_SH1 */ + +#elif defined(ARMV4) + +#define CPUEXC1 4 /* ロードエラー例外 */ +#define RAISE_CPU_EXCEPTION (*((volatile int *) 0xFFFFFEC1)) + +#elif defined(V850) + +#elif defined(H8) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ + +#elif defined(H8S) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ +#define LOOP_REF 4000L /* 速度計測用のループ回数 */ + +#elif defined(MICROBLAZE) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ +#define STACK_SIZE 2048 /* タスクのスタックサイズ */ + +#elif defined(IA32) + +#define CPUEXC1 0 /* ゼロ除算例外 */ +#define RAISE_CPU_EXCEPTION syslog(LOG_NOTICE, "zerodiv = %d", 10 / 0) +#define OMIT_VGET_TIM + +#elif defined(TMS320C54X) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ +#define STACK_SIZE 320 /* タスクのスタックサイズ */ +#define LOOP_REF 500000L /* 速度計測用のループ回数 */ + +#elif defined(XSTORMY16) + +#define CPUEXC1 0 /* 無効命令例外 */ +#define RAISE_CPU_EXCEPTION __asm__( ".hword 0x0006" ) +#define OMIT_VGET_TIM /* vxget_tim()は非サポート */ +#define LOOP_REF 4000L /* 速度計測用のループ回数 */ +#define STACK_SIZE 256 /* タスクのスタックサイズ */ +#define TASK_PORTID 2 /* SIOはポート2を用いる */ + +#elif defined(MIPS3) || defined(MIPS64) + +#define CPUEXC1 Bp /* ブレークポイント例外(ゼロ除算時に発生) */ +#define RAISE_CPU_EXCEPTION syslog(LOG_NOTICE, "zerodiv = %d", 10 / 0) + +#elif defined(M16C) && defined(OAKS16) + +#define CPUEXC1 32 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm(" int #32") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#define TASK_PORTID 2 /* 文字入力するシリアルポートID */ + +#elif defined(M16C) && defined(OAKS16_MINI) + +#define CPUEXC1 32 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm(" int #32") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 384 /* タスクのスタックサイズ */ +#define TASK_PORTID 2 /* 文字入力するシリアルポートID */ + +#elif defined(M16C) && defined(M3029) + +#define CPUEXC1 32 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm(" int #32") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ + +#elif defined(BLACKFIN) + +#define CPUEXC1 0 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm("excpt 0;") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 1024 /* タスクのスタックサイズ */ +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ + +#elif defined(LINUX) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ +#define OMIT_VGET_TIM +#define LOOP_REF 4000000 /* 速度計測用のループ回数 */ + +#elif defined(NIOS2) + +#define CPUEXC1 0 /* 未実装命令例外 */ +#define RAISE_CPU_EXCEPTION Asm("div zero, zero, zero"); + +#elif defined(M32C) + +#define CPUEXC1 32 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm(" int #32") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ + +#elif defined(M32R) + +#define CPUEXC1 EXC_TRAP00 +#define RAISE_CPU_EXCEPTION Asm("trap 0") + +#elif defined(TLCS_900) && defined(ZUP_F16_EX) + +#define CPUEXC1 3 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION Asm(" swi 2") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ +#define OMIT_VGET_TIM + +#endif + +/* + * ターゲットに依存する可能性のある定数の定義 + */ + +#ifndef TASK_PORTID +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ +#endif /* TASK_PORTID */ + +#ifndef STACK_SIZE +#define STACK_SIZE 8192 /* タスクのスタックサイズ */ +#endif /* STACK_SIZE */ + +#ifndef LOOP_REF +#define LOOP_REF 1000000 /* 速度計測用のループ回数 */ +#endif /* LOOP_REF */ + +/* + * 関数のプロトタイプ宣言 + */ +#ifndef _MACRO_ONLY + +extern void task(VP_INT tskno); +extern void main_task(VP_INT exinf); +extern void tex_routine(TEXPTN texptn, VP_INT tskno); +extern void cyclic_handler(VP_INT exinf); +extern void cpuexc_handler(VP p_excinf); + +#endif /* _MACRO_ONLY */ diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.ldf b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.ldf new file mode 100644 index 0000000..a4b8297 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1.ldf @@ -0,0 +1,406 @@ +/* MANAGED-BY-SYSTEM-BUILDER */ +/* VisualDSP++ 5.0 Update 10 */ +/* LDF Printer version: 5.9.0.1 */ +/* ldfgen.exe version: 5.9.0.1 */ +/* VDSG version: 5.9.0.1 */ + +/* +** ADSP-BF592-A linker description file generated on Jul 20, 2012 at 15:59:24. +** +** Copyright (C) 2000-2010 Analog Devices Inc., All Rights Reserved. +** +** This file is generated automatically based upon the options selected +** in the LDF Wizard. Changes to the LDF configuration should be made by +** changing the appropriate options rather than editing this file. +** +** Configuration:- +** crt_doj: sample1_acb_bf592_basiccrt.doj +** processor: ADSP-BF592-A +** product_name: VisualDSP++ 5.0 Update 10 +** si_revision: automatic +** default_silicon_revision_from_archdef: 0.2 +** using_cplusplus: true +** mem_init: false +** use_vdk: false +** use_mt: false +** use_eh: true +** use_argv: true +** running_from_internal_memory: true +** user_heap_src_file: X:\Work\jsp\tools\blackfin-vdsp\sample1_acb_bf592\sample1_acb_bf592_heaptab.c +** libraries_use_stdlib: true +** libraries_use_fileio_libs: false +** libraries_use_ieeefp_emulation_libs: false +** libraries_use_eh_enabled_libs: false +** libraries_use_fixed_point_io_libs: false +** libraries_use_utility_rom: true +** detect_stackoverflow: false +** system_heap: L1 +** system_heap_min_size: 2k +** system_stack: L1 +** system_stack_min_size: 2k +** use_sdram: false +** +*/ + +ARCHITECTURE(ADSP-BF592-A) + +SEARCH_DIR($ADI_DSP/Blackfin/lib) + + +#if !defined(NO_UTILITY_ROM) +# if defined(__SILICON_REVISION__) && (__SILICON_REVISION__==0) +# warning there is no Utility ROM in revision 0.0 +# define NO_UTILITY_ROM +# elif !defined(__SILICON_REVISION__) || (__SILICON_REVISION__==0xffff) +# warning \ + The Tools Utility ROM will not be used to link this application because \ +the silicon revision does not specify a specific revision number. This message \ +may be suppressed by defining the LDF macro NO_UTILITY_ROM. +# define NO_UTILITY_ROM +# endif +#endif + + +// Workarounds are enabled, exceptions are disabled. +#define RT_LIB_NAME(x) lib ## x ## y.dlb +#define RT_LIB_NAME_EH(x) lib ## x ## y.dlb +#define RT_LIB_NAME_MT(x) lib ## x ## y.dlb +#define RT_LIB_NAME_EH_MT(x) lib ## x ## y.dlb +#define RT_OBJ_NAME(x) x ## y.doj +#define RT_OBJ_NAME_MT(x) x ## mty.doj + + +$LIBRARIES = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + RT_LIB_NAME_MT(small532) + ,RT_LIB_NAME_MT(io532) + ,RT_LIB_NAME_MT(c532) + ,RT_LIB_NAME_MT(event532) + ,RT_LIB_NAME(ssl592-a) + ,RT_LIB_NAME(drv592-a) + ,RT_LIB_NAME_MT(x532) + ,RT_LIB_NAME_EH_MT(cpp532) + ,RT_LIB_NAME(f64ieee532) + ,RT_LIB_NAME(dsp532) + ,RT_LIB_NAME(sftflt532) + ,RT_LIB_NAME(etsi532) + ,RT_OBJ_NAME_MT(idle532) + ,RT_LIB_NAME_MT(rt_fileio532) + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + ; + +$OBJECTS = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + $COMMAND_LINE_OBJECTS + , RT_LIB_NAME(profile532) +#if !defined(NO_UTILITY_ROM) + , romdata-BF592-A.doj +#endif + , $COMMAND_LINE_OBJECTS + , "cplbtab592-a.doj" + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + , RT_OBJ_NAME(crtn532) + ; + +$OBJS_LIBS_INTERNAL = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + $OBJECTS{prefersMem("internal")}, $LIBRARIES{prefersMem("internal")} + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + ; + +$OBJS_LIBS_NOT_EXTERNAL = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + $OBJECTS{!prefersMem("external")}, $LIBRARIES{!prefersMem("external")} + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + ; + + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + +MEMORY +{ +/* +** ADSP-BF592-A MEMORY MAP. +** +** The known memory spaces are as follows: +** +** 0xFFE00000 - 0xFFFFFFFF Core MMR registers (2MB) +** 0xFFC00000 - 0xFFDFFFFF System MMR registers (2MB) +** 0xFFB01000 - 0xFFBFFFFF Reserved +** 0xFFB00000 - 0xFFB00FFF Scratchpad SRAM (4K) +** 0xFFA20000 - 0xFFAFFFFF Reserved +** 0xFFA10000 - 0xFFA1FFFF L1 Instruction ROM (64K) +** 0xFFA08000 - 0xFFA0FFFF Reserved +** 0xFFA00000 - 0xFFA07FFF L1 Instruction SRAM (32K) +** 0xFF808000 - 0xFF9FFFFF Reserved +** 0xFF800000 - 0xFF807FFF L1 Data SRAM (32K) +** 0xEF001000 - 0xFF7FFFFF Reserved +** 0xEF000000 - 0xEF000FFF Boot ROM (4K) +** 0x00000000 - 0xEEFFFFFF Reserved +** +** Notes: +** 0xFF807FEF-0xFF807FFF Required by boot-loader. +*/ + + MEM_L1_SCRATCH { TYPE(RAM) START(0xFFB00000) END(0xFFB00FFF) WIDTH(8) } + MEM_L1_CODE { TYPE(RAM) START(0xFFA00000) END(0xFFA07FFF) WIDTH(8) } + MEM_L1_DATA { TYPE(RAM) START(0xFF800000) END(0xFF807EAF) WIDTH(8) } + MEM_ARGV { TYPE(RAM) START(0xFF807EB0) END(0xFF807FFF) WIDTH(8) } + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + +} /* MEMORY */ + +PROCESSOR p0 +{ + OUTPUT($COMMAND_LINE_OUTPUT_FILE) + RESOLVE(start, 0xFFA00000) + RESOLVE(___argv_string, 0xFF807F00) + KEEP(start, start) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + #if !defined(NO_UTILITY_ROM) + #include "ADSP-BF592-A-LDF.h" + #endif + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + SECTIONS + { + /* Workaround for hardware errata 05-00-0189 and 05-00-0310 - + ** "Speculative (and fetches made at boundary of reserved memory + ** space) for instruction or data fetches may cause false + ** protection exceptions" and "False hardware errors caused by + ** fetches at the boundary of reserved memory ". + ** + ** Done by avoiding use of 76 bytes from at the end of blocks + ** that are adjacent to reserved memory. Workaround is enabled + ** for appropriate silicon revisions (-si-revision switch). + */ + RESERVE(___wab0=MEMORY_END(MEM_L1_SCRATCH) - 75, ___l0 = 76) + RESERVE(___wab1=MEMORY_END(MEM_L1_CODE) - 75, ___l1 = 76) + RESERVE(___wab2=MEMORY_END(MEM_ARGV) - 75, ___l2 = 76) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + scratchpad NO_INIT + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(L1_scratchpad) $LIBRARIES(L1_scratchpad)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_SCRATCH + + L1_code + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(L1_code) $LIBRARIES(L1_code)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(noncache_code) $LIBRARIES(noncache_code)) + INPUT_SECTIONS($OBJECTS(cplb_code) $LIBRARIES(cplb_code)) + INPUT_SECTIONS($OBJECTS(cplb) $LIBRARIES(cplb)) + INPUT_SECTIONS($OBJS_LIBS_INTERNAL(program)) + INPUT_SECTIONS($OBJS_LIBS_NOT_EXTERNAL(program)) + INPUT_SECTIONS($OBJECTS(program) $LIBRARIES(program)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_CODE + + L1_data_1 + { + INPUT_SECTION_ALIGN(4) + ___l1_data_cache_a = 0; + ___l1_data_cache_b = 0; + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(L1_data_a) $LIBRARIES(L1_data_a)) + INPUT_SECTIONS($OBJECTS(L1_data) $LIBRARIES(L1_data)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + RESERVE(heaps_and_stack_in_L1_data, heaps_and_stack_in_L1_data_length = 4096,4) + } > MEM_L1_DATA + + L1_data_bsz ZERO_INIT + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(L1_bsz) $LIBRARIES(L1_bsz)) + INPUT_SECTIONS($OBJS_LIBS_INTERNAL(bsz)) + INPUT_SECTIONS($OBJS_LIBS_NOT_EXTERNAL(bsz)) + INPUT_SECTIONS($OBJECTS(bsz) $LIBRARIES(bsz)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA + + L1_data_tables + { + INPUT_SECTION_ALIGN(4) + FORCE_CONTIGUITY + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(ctor) $LIBRARIES(ctor)) + INPUT_SECTIONS($OBJECTS(ctorl) $LIBRARIES(ctorl)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(.gdt) $LIBRARIES(.gdt)) + INPUT_SECTIONS($OBJECTS(.gdtl) $LIBRARIES(.gdtl)) + INPUT_SECTIONS($OBJECTS(.frt) $LIBRARIES(.frt)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA + + L1_data_2 + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(constdata) $LIBRARIES(constdata)) + INPUT_SECTIONS($OBJECTS(voldata) $LIBRARIES(voldata)) + INPUT_SECTIONS($OBJECTS(cplb_data) $LIBRARIES(cplb_data)) + INPUT_SECTIONS($OBJS_LIBS_INTERNAL(data1)) + INPUT_SECTIONS($OBJS_LIBS_NOT_EXTERNAL(data1)) + INPUT_SECTIONS($OBJECTS(data1) $LIBRARIES(data1)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA + + L1_data_3 + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(vtbl) $LIBRARIES(vtbl)) + INPUT_SECTIONS($OBJECTS(.rtti) $LIBRARIES(.rtti)) + INPUT_SECTIONS($OBJECTS(.edt) $LIBRARIES(.edt)) + INPUT_SECTIONS($OBJECTS(.cht) $LIBRARIES(.cht)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA + + L1_data_stack_heap + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + RESERVE_EXPAND(heaps_and_stack_in_L1_data, heaps_and_stack_in_L1_data_length , 0, 4) + ldf_stack_space = heaps_and_stack_in_L1_data; + ldf_stack_end = (ldf_stack_space + (((heaps_and_stack_in_L1_data_length * 2048) / 4096) - 4)) & 0xfffffffc; + ldf_heap_space = ldf_stack_end + 4; + ldf_heap_end = (ldf_heap_space + (((heaps_and_stack_in_L1_data_length * 2048) / 4096) - 4)) & 0xfffffffc; + ldf_heap_length = ldf_heap_end - ldf_heap_space; + } > MEM_L1_DATA + + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } /* SECTIONS */ +} /* p0 */ + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1_acb_bf592.dpg b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1_acb_bf592.dpg new file mode 100644 index 0000000..7dfb2d9 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_acb_bf592/sample1_acb_bf592.dpg @@ -0,0 +1,12 @@ + + + + + + + + + libkernel + + + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf506/chip_dump_empty.c b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf506/chip_dump_empty.c new file mode 100644 index 0000000..7f88ea8 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf506/chip_dump_empty.c @@ -0,0 +1,37 @@ +/** + * \file chip_dump_dummy.c +* \brief ADSP-BF506用のポストモーテムダンプルーチン群(ダミー) + * + * chip_dump.cはコードサイズが大きく、例外時にしか必要としない機能のため、 + * sample1では機能を無効にしてフットプリントを少なくしている + * chip_dump.cを使用する場合、chip_dump.cのみFLASHに配置するなど対策が必要 + */ +#include "jsp_kernel.h" + +/** + * \brief ハードウェア・エラー・ハンドラ + * + * ハードウェア・エラー時に呼び出されて、ハードウェア・エラー・割り込みのポストモーテム処理を行う。 + * 最初にFPを手繰って、割り込みのスタックフレームを探す。次にすべての割り込みを禁止し、 + * UART0を占有したあと、ポーリングを使ってスタックに保存された各レジスタのダンプを行う。 + * DEF_INH(INHNO_HW_ERROR, { TA_HLNG, hwei_handler }); + * + */ +void spurious_int_handler() +{ +} + +/** + * \brief CPU例外ハンドラ + * + * CPU例外ハンドラとしてcfgファイルに登録する。 hwei_handler()は呼ばれたら戻ってこないが、 + * そのあとにもexpFlagに値を代入しているのは、最適化によってunlink命令の値がルーチン呼び出しの + * 前に移動することを防ぐためである。 + * + * DEF_EXC(CPUEXC1, { TA_HLNG, excp_handler} ); + * + */ +void spurious_exc_handler(VP p_excinf) +{ +} + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/chip_dump_empty.c b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/chip_dump_empty.c new file mode 100644 index 0000000..aec58c9 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/chip_dump_empty.c @@ -0,0 +1,38 @@ +/** + * \file chip_dump_dummy.c +* \brief ADSP-BF518用のポストモーテムダンプルーチン群(ダミー) + * + * chip_dump.cはコードサイズが大きく、例外時にしか必要としない機能のため、 + * sample1では機能を無効にしてフットプリントを少なくしている + * chip_dump.cを使用する場合、chip_dump.cのみSDRAMに配置するなど対策が必要 + */ +#include "jsp_kernel.h" +#include + +/** + * \brief ハードウェア・エラー・ハンドラ + * + * ハードウェア・エラー時に呼び出されて、ハードウェア・エラー・割り込みのポストモーテム処理を行う。 + * 最初にFPを手繰って、割り込みのスタックフレームを探す。次にすべての割り込みを禁止し、 + * UART0を占有したあと、ポーリングを使ってスタックに保存された各レジスタのダンプを行う。 + * DEF_INH(INHNO_HW_ERROR, { TA_HLNG, hwei_handler }); + * + */ +void spurious_int_handler() +{ +} + +/** + * \brief CPU例外ハンドラ + * + * CPU例外ハンドラとしてcfgファイルに登録する。 hwei_handler()は呼ばれたら戻ってこないが、 + * そのあとにもexpFlagに値を代入しているのは、最適化によってunlink命令の値がルーチン呼び出しの + * 前に移動することを防ぐためである。 + * + * DEF_EXC(CPUEXC1, { TA_HLNG, excp_handler} ); + * + */ +void spurious_exc_handler(VP p_excinf) +{ +} + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/config.bat b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/config.bat new file mode 100644 index 0000000..91998aa --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/config.bat @@ -0,0 +1,17 @@ +rem APPNAME ƒAƒvƒŠƒP[ƒVƒ‡ƒ“–¼ +rem CFGPATH cfg.exe‚ª’u‚¢‚Ä‚ ‚éƒfƒBƒŒƒNƒgƒŠ +rem VDSPPATH VisualDSP++‚̃Cƒ“ƒXƒg[ƒ‹ƒfƒBƒŒƒNƒgƒŠ +rem JSPPATH TOPPERS/JSP‚̃fƒBƒŒƒNƒgƒŠ +rem CPATH Blackfin CPUˆË‘¶•”‚̃fƒBƒŒƒNƒgƒŠ +rem SPATH ƒVƒXƒeƒ€ˆË‘¶•”‚̃fƒBƒŒƒNƒgƒŠ + +set APPNAME=sample1 +set CFGPATH=X:\Work\jsp\cfg +set VDSPPATH=C:\Program Files\Analog Devices\VisualDSP 5.0 +set JSPPATH=X:\Work\jsp +set CPATH=%JSPPATH%\config\blackfin +set SPATH=%CPATH%\ezkit_bf518;%CPATH%\_common_bf518 + +"%VDSPPATH%\pp.exe" %APPNAME%.cfg -D__ECC__ -D__ADSPLPBLACKFIN__ -I"%CPATH%;%SPATH%;%JSPPATH%\systask;%JSPPATH%\include;" > %APPNAME%_pp.cfg +"%CFGPATH%\cfg.exe" %APPNAME%_pp.cfg +del %APPNAME%_pp.cfg diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/kernel_cfg.c b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/kernel_cfg.c new file mode 100644 index 0000000..2e89dab --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/kernel_cfg.c @@ -0,0 +1,181 @@ +/* Configured with [sample1_pp.cfg ] */ + +#include "kernel_cfg.h" +#include "kernel_id.h" + +#if TKERNEL_PRVER >= 0x1040 +#define CFG_INTHDR_ENTRY(inthdr) INTHDR_ENTRY(inthdr) +#define CFG_EXCHDR_ENTRY(exchdr) EXCHDR_ENTRY(exchdr) +#define CFG_INT_ENTRY(inthdr) INT_ENTRY(inthdr) +#define CFG_EXC_ENTRY(exchdr) EXC_ENTRY(exchdr) +#else +#error "This configuration file has no compatibility with TOPPERS/JSP rel 1.3 or earlier." +#endif + +#ifndef __EMPTY_LABEL +#define __EMPTY_LABEL(x,y) x y[0] +#endif + +#if TKERNEL_PRID != 0x0001u /* TOPPERS/JSP */ +#error "You can not use this configuration file without TOPPERS/JSP" +#endif + + /* User specified include files*/ +#include "sample1.h" +#include "hw_timer.h" +#include "timer.h" +#include "hw_serial.h" +#include "serial.h" +#include "logtask.h" + + + /* Object initializer [task] */ + +#define TNUM_TSKID 5 + +const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1); + +static __STK_UNIT __stack_TASK1[__TCOUNT_STK_UNIT(1024)]; +static __STK_UNIT __stack_TASK2[__TCOUNT_STK_UNIT(1024)]; +static __STK_UNIT __stack_TASK3[__TCOUNT_STK_UNIT(1024)]; +static __STK_UNIT __stack_MAIN_TASK[__TCOUNT_STK_UNIT(1024)]; +static __STK_UNIT __stack_LOGTASK[__TCOUNT_STK_UNIT(LOGTASK_STACK_SIZE)]; + +const TINIB _kernel_tinib_table[TNUM_TSKID] = { + {0, (VP_INT)(( VP_INT ) 1), (FP)(task), INT_PRIORITY(10), __TROUND_STK_UNIT(1024), __stack_TASK1, 0, (FP)(tex_routine)}, + {0, (VP_INT)(( VP_INT ) 2), (FP)(task), INT_PRIORITY(10), __TROUND_STK_UNIT(1024), __stack_TASK2, 0, (FP)(tex_routine)}, + {0, (VP_INT)(( VP_INT ) 3), (FP)(task), INT_PRIORITY(10), __TROUND_STK_UNIT(1024), __stack_TASK3, 0, (FP)(tex_routine)}, + {0x00u | 0x02u, (VP_INT)(0), (FP)(main_task), INT_PRIORITY(5), __TROUND_STK_UNIT(1024), __stack_MAIN_TASK, TA_NULL, (FP)(NULL)}, + {0x00u | 0x02u, (VP_INT)(( VP_INT ) 1), (FP)(logtask), INT_PRIORITY(LOGTASK_PRIORITY), __TROUND_STK_UNIT(LOGTASK_STACK_SIZE), __stack_LOGTASK, TA_NULL, (FP)(NULL)} +}; + +const ID _kernel_torder_table[TNUM_TSKID] = {1,2,3,4,5}; + +TCB _kernel_tcb_table[TNUM_TSKID]; + + + /* Object initializer [semaphore] */ + +#define TNUM_SEMID 2 + +const ID _kernel_tmax_semid = (TMIN_SEMID + TNUM_SEMID - 1); + +const SEMINIB _kernel_seminib_table[TNUM_SEMID] = { + {1, 0, 1}, + {1, 1, 1} +}; + +SEMCB _kernel_semcb_table[TNUM_SEMID]; + + + /* Object initializer [eventflag] */ + +#define TNUM_FLGID 0 + +const ID _kernel_tmax_flgid = (TMIN_FLGID + TNUM_FLGID - 1); + +__EMPTY_LABEL(const FLGINIB, _kernel_flginib_table); +__EMPTY_LABEL(FLGCB, _kernel_flgcb_table); + + + /* Object initializer [dataqueue] */ + +#define TNUM_DTQID 0 + +const ID _kernel_tmax_dtqid = (TMIN_DTQID + TNUM_DTQID - 1); + +__EMPTY_LABEL(const DTQINIB, _kernel_dtqinib_table); +__EMPTY_LABEL(DTQCB, _kernel_dtqcb_table); + + + /* Object initializer [mailbox] */ + +#define TNUM_MBXID 0 + +const ID _kernel_tmax_mbxid = (TMIN_MBXID + TNUM_MBXID - 1); + +__EMPTY_LABEL(const MBXINIB, _kernel_mbxinib_table); +__EMPTY_LABEL(MBXCB, _kernel_mbxcb_table); + + + /* Object initializer [mempfix] */ + +#define TNUM_MPFID 0 + +const ID _kernel_tmax_mpfid = (TMIN_MPFID + TNUM_MPFID - 1); + +__EMPTY_LABEL(const MPFINIB, _kernel_mpfinib_table); +__EMPTY_LABEL(MPFCB, _kernel_mpfcb_table); + + + /* Object initializer [cyclic] */ + +#define TNUM_CYCID 1 + +const ID _kernel_tmax_cycid = (TMIN_CYCID + TNUM_CYCID - 1); + +const CYCINIB _kernel_cycinib_table[TNUM_CYCID] = { + {0,0,(FP)(cyclic_handler),2000,0} +}; + +CYCCB _kernel_cyccb_table[TNUM_CYCID]; + + + /* Object initializer [interrupt] */ + +#define TNUM_INHNO 3 + +const UINT _kernel_tnum_inhno = TNUM_INHNO; + +CFG_INTHDR_ENTRY(sio0_rx_handler); +CFG_INTHDR_ENTRY(sio0_tx_handler); +CFG_INTHDR_ENTRY(timer_handler); + +const INHINIB _kernel_inhinib_table[TNUM_INHNO] = { + {22,0,(FP)CFG_INT_ENTRY(sio0_rx_handler)}, + {23,0,(FP)CFG_INT_ENTRY(sio0_tx_handler)}, + {39,0,(FP)CFG_INT_ENTRY(timer_handler)} +}; + + + /* Object initializer [exception] */ + +#define TNUM_EXCNO 1 + +const UINT _kernel_tnum_excno = TNUM_EXCNO; + +CFG_EXCHDR_ENTRY(cpuexc_handler); + +const EXCINIB _kernel_excinib_table[TNUM_EXCNO] = { + {0,0,(FP)CFG_EXC_ENTRY(cpuexc_handler)} +}; + + /* Initialization handler */ + +void +_kernel_call_inirtn(void) +{ + timer_initialize( (VP_INT)(0) ); + serial_initialize( (VP_INT)(0) ); +} + +void +_kernel_call_terrtn(void) +{ + timer_terminate( (VP_INT)(0) ); +} + + /* Object initialization routine */ + +void +_kernel_object_initialize(void) +{ + _kernel_task_initialize(); + _kernel_semaphore_initialize(); + _kernel_cyclic_initialize(); + _kernel_interrupt_initialize(); + _kernel_exception_initialize(); +} + +TMEVTN _kernel_tmevt_heap[TNUM_TSKID + TNUM_CYCID]; + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/kernel_id.h b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/kernel_id.h new file mode 100644 index 0000000..bf1af50 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/kernel_id.h @@ -0,0 +1,16 @@ +#ifndef KERNEL_ID_H +#define KERNEL_ID_H + + /* object identifier deifnition */ + +#define CYCHDR1 1 +#define LOGTASK 5 +#define MAIN_TASK 4 +#define SERIAL_RCV_SEM1 1 +#define SERIAL_SND_SEM1 2 +#define TASK1 1 +#define TASK2 2 +#define TASK3 3 + +#endif /* KERNEL_ID_H */ + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/readme.txt b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/readme.txt new file mode 100644 index 0000000..bf3d0d7 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/readme.txt @@ -0,0 +1,35 @@ +TOPPERS/JSPのsample1アプリケーションをEZ-KIT Lite BF518 +移植した。 + +ビルドに先立って、jsp/config/blackfin/ezkit_bf518/libkernel.dpjを +ビルドして、libekernel.dlbを作っておくこと。 + +また、jsp/utils/blackfin-vdsp/offset.hは、必要に応じて +作り直すこと。 + +VisualDSP++のICEを使ってロードする場合には、実行直前に次の +二つのレジスタの値に注意すること。 + +PLL_CTL : 0x0a00 (Rev.0.1の場合) / 0x0b00 (Rev.0.2の場合) +EBIU_SDBCTL.EBE : 0 + +TOPPERS/JSP for Blackfinはこの二つをチェックして、もし違う +値であると外部でPLLとSDRAMを変更したと認識してPLLの初期化を +中止する。これは外部SDRAMなどクロックに依存するデバイスの +動作を保護するためである。 + +sample1.ldfは、VisualDSP++に作らせたあと、自動更新を +停止し、crtを削除したものである。 + +異なるシステム依存部用に改造する場合は、プロジェクトの +Cコンパイラ、およびアセンブラのインクルード・パスを必ず +変更すること。 + +2012/07/20追加 +Visual DSP++ 5.0 Update 10でビルド&動作確認 + +sample1では、インストラクションキャッシュをONにすると、L1-SRAMに +収まらないので、OFFにしている。 +キャッシュをONにして使用する場合、sample1.ldfのメモリエリアの指定を +変更して、カーネルの一部をSDRAMに配置する。 +例えば、OSとして緊急性の低いchip_dump.cの関数をSDRAMに配置するなど。 diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.c b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.c new file mode 100644 index 0000000..9936cb5 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.c @@ -0,0 +1,417 @@ +/* + * TOPPERS/JSP Kernel + * Toyohashi Open Platform for Embedded Real-Time Systems/ + * Just Standard Profile Kernel + * + * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory + * Toyohashi Univ. of Technology, JAPAN + * Copyright (C) 2004-2006 by Embedded and Real-Time Systems Laboratory + * Graduate School of Information Science, Nagoya Univ., JAPAN + * + * 上記著作権者は,以下の (1)~(4) の条件か,Free Software Foundation + * によって公表されている GNU General Public License の Version 2 に記 + * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア + * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下, + * 利用と呼ぶ)することを無償で許諾する. + * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 + * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー + * スコード中に含まれていること. + * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 + * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 + * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 + * の無保証規定を掲載すること. + * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 + * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ + * と. + * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 + * 作権表示,この利用条件および下記の無保証規定を掲載すること. + * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに + * 報告すること. + * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 + * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. + * + * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お + * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も + * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直 + * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない. + * + * @(#) $Id: sample1.c,v 1.1 2012/07/20 04:03:13 maduki Exp $ + */ + +/* + * サンプルプログラム(1)の本体 + * + * JSPカーネルの基本的な動作を確認するためのサンプルプログラム. + * + * プログラムの概要: + * + * ユーザインタフェースを受け持つメインタスク(タスクID: MAIN_TASK, + * 優先度: MAIN_PRIORITY)と,三つの並列実行されるタスク(タスクID: + * TASK1縲弋ASK3,初期優先度: MID_PRIORITY)で構成される.また,起動周 + * 期が2秒の周期ハンドラ(周期ハンドラID: CYCHDR1)を用いる. + * + * 並列実行されるタスクは,task_loop 回空ループを実行する度に,タスク + * が実行中であることをあらわすメッセージを表示する. + * + * 周期ハンドラは,三つの優先度(HIGH_PRIORITY,MID_PRIORITY, + * LOW_PRIORITY)のレディキューを回転させる.プログラムの起動直後は, + * 周期ハンドラは停止状態になっている. + * + * メインタスクは,シリアルI/Oポートからの文字入力を行い(文字入力を + * 待っている間は,並列実行されるタスクが実行されている),入力された + * 文字に対応した処理を実行する.入力された文字と処理の関係は次の通り. + * Control-C または 'Q' が入力されると,プログラムを終了する. + * + * '1' : 以降のコマンドは TASK1 に対して行う. + * '2' : 以降のコマンドは TASK2 に対して行う. + * '3' : 以降のコマンドは TASK3 に対して行う. + * 'a' : タスクを act_tsk により起動する. + * 'A' : タスクに対する起動要求を can_act によりキャンセルする. + * 'e' : タスクに ext_tsk を呼び出させ,終了させる. + * 't' : タスクを ter_tsk により強制終了する. + * '>' : タスクの優先度を HIGH_PRIORITY にする. + * '=' : タスクの優先度を MID_PRIORITY にする. + * '<' : タスクの優先度を LOW_PRIORITY にする. + * 'G' : タスクの優先度を get_pri で読み出す. + * 's' : タスクに slp_tsk を呼び出させ,起床待ちにさせる. + * 'S' : タスクに tslp_tsk(10秒) を呼び出させ,起床待ちにさせる. + * 'w' : タスクを wup_tsk により起床する. + * 'W' : タスクに対する起床要求を can_wup によりキャンセルする. + * 'l' : タスクを rel_wai により強制的に待ち解除にする. + * 'u' : タスクを sus_tsk により強制待ち状態にする. + * 'm' : タスクの強制待ち状態を rsm_tsk により解除する. + * 'M' : タスクの強制待ち状態を frsm_tsk により強制解除する. + * 'd' : タスクに dly_tsk(10秒) を呼び出させ,時間経過待ちにさせる. + * 'x' : タスクにパターン 0x0001 の例外処理を要求する. + * 'X' : タスクにパターン 0x0002 の例外処理を要求する. + * 'y' : タスクに dis_tex を呼び出させ,タスク例外を禁止する. + * 'Y' : タスクに ena_tex を呼び出させ,タスク例外を許可する. + * 'r' : 三つの優先度(HIGH_PRIORITY,MID_PRIORITY,LOW_PRIORITY)の + * レディキューを回転させる. + * 'c' : 周期ハンドラを動作させる. + * 'C' : 周期ハンドラを停止させる. + * 'z' : CPU例外を発生させる. + * 'Z' : CPUロック状態でCPU例外を発生させる(プログラムを終了する). + * 'V' : vxget_tim で性能評価用システム時刻を2回読む. + * 'v' : 発行したシステムコールを表示する(デフォルト). + * 'q' : 発行したシステムコールを表示しない. + */ + +#include +#include "kernel_id.h" +#include "sample1.h" + +/* + * 並行実行されるタスクへのメッセージ領域 + */ +char message[3]; + +/* + * ループ回数 + */ +UW task_loop; /* タスク内でのループ回数 */ +UW tex_loop; /* 例外処理ルーチン内でのループ回数 */ + +/* + * 並行実行されるタスク + */ +void task(VP_INT exinf) +{ + volatile UW i; + INT n = 0; + INT tskno = (INT) exinf; + const char *graph[] = { "|", " +", " *" }; + char c; + + ena_tex(); + while (1) { + syslog(LOG_NOTICE, "task%d is running (%03d). %s", + tskno, ++n, graph[tskno-1]); + for (i = 0; i < task_loop; i++); + c = message[tskno-1]; + message[tskno-1] = 0; + switch (c) { + case 'e': + syslog(LOG_INFO, "#%d#ext_tsk()", tskno); + ext_tsk(); + case 's': + syslog(LOG_INFO, "#%d#slp_tsk()", tskno); + syscall(slp_tsk()); + break; + case 'S': + syslog(LOG_INFO, "#%d#tslp_tsk(10000)", tskno); + syscall(tslp_tsk(10000)); + break; + case 'd': + syslog(LOG_INFO, "#%d#dly_tsk(10000)", tskno); + syscall(dly_tsk(10000)); + break; + case 'y': + syslog(LOG_INFO, "#%d#dis_tex()", tskno); + syscall(dis_tex()); + break; + case 'Y': + syslog(LOG_INFO, "#%d#ena_tex()", tskno); + syscall(ena_tex()); + break; +#ifdef CPUEXC1 + case 'z': + syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno); + RAISE_CPU_EXCEPTION; + break; + case 'Z': + loc_cpu(); + syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno); + RAISE_CPU_EXCEPTION; + unl_cpu(); + break; +#endif /* CPUEXC1 */ + default: + break; + } + } +} + +/* + * 並行して実行されるタスク用のタスク例外処理ルーチン + */ +void tex_routine(TEXPTN texptn, VP_INT exinf) +{ + volatile UW i; + INT tskno = (INT) exinf; + + syslog(LOG_NOTICE, "task%d receives exception 0x%04x. ", + tskno, texptn); + for (i = 0; i < tex_loop; i++); + + if (texptn & 0x8000) { + syslog(LOG_INFO, "#%d#ext_tsk()", tskno); + ext_tsk(); + } +} + +/* + * CPU例外ハンドラ + */ +#ifdef CPUEXC1 + +void +cpuexc_handler(VP p_excinf) +{ + ID tskid; + + syslog(LOG_NOTICE, "CPU exception handler (p_excinf = %08p).", + p_excinf); + if (sns_ctx() != TRUE) { + syslog(LOG_WARNING, + "sns_ctx() is not TRUE in CPU exception handler."); + } + if (sns_dpn() != TRUE) { + syslog(LOG_WARNING, + "sns_dpn() is not TRUE in CPU exception handler."); + } + syslog(LOG_DEBUG, + "sns_loc = %d sns_dsp = %d", sns_loc(), sns_dsp()); + syslog(LOG_DEBUG, + "vxsns_loc = %d vxsns_ctx = %d vxsns_dsp = %d vxsns_dpn = %d", + vxsns_loc(p_excinf), vxsns_ctx(p_excinf), + vxsns_dsp(p_excinf), vxsns_dpn(p_excinf)); + + if (!vxsns_loc(p_excinf) && !vxsns_ctx(p_excinf)) { + syscall(iget_tid(&tskid)); + syscall(iras_tex(tskid, 0x8000)); + } + else { + syslog(LOG_NOTICE, "Sample program ends with exception."); + kernel_exit(); + } +} + +#endif /* CPUEXC1 */ + +/* + * 周期ハンドラ + * + * HIGH_PRIORITY,MID_PRIORITY,LOW_PRIORITY の各優先度のレディキュー + * を回転させる. + */ +void cyclic_handler(VP_INT exinf) +{ + irot_rdq(HIGH_PRIORITY); + irot_rdq(MID_PRIORITY); + irot_rdq(LOW_PRIORITY); +} + +/* + * メインタスク + */ +void main_task(VP_INT exinf) +{ + char c; + ID tskid = TASK1; + volatile UW i; + INT tskno = 1; + ER_UINT ercd; + PRI tskpri; + SYSTIM stime1, stime2; +#ifndef OMIT_VGET_TIM + SYSUTIM utime1, utime2; +#endif /* OMIT_VGET_TIM */ + + vmsk_log(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_EMERG)); + syslog(LOG_NOTICE, "Sample program starts (exinf = %d).", (INT) exinf); + + syscall(serial_ctl_por(TASK_PORTID, + (IOCTL_CRLF | IOCTL_FCSND | IOCTL_FCRCV))); + + /* + * ループ回数の設定 + */ + task_loop = LOOP_REF; + get_tim(&stime1); + for (i = 0; i < task_loop; i++); + get_tim(&stime2); + task_loop = LOOP_REF * 400 / (stime2 - stime1); + tex_loop = task_loop / 5; + + /* + * タスクの起動 + */ + act_tsk(TASK1); + act_tsk(TASK2); + act_tsk(TASK3); + + /* + * メインループ + */ + do { + syscall(serial_rea_dat(TASK_PORTID, &c, 1)); + switch (c) { + case 'e': + case 's': + case 'S': + case 'd': + case 'y': + case 'Y': + case 'z': + case 'Z': + message[tskno-1] = c; + break; + case '1': + tskno = 1; + tskid = TASK1; + break; + case '2': + tskno = 2; + tskid = TASK2; + break; + case '3': + tskno = 3; + tskid = TASK3; + break; + case 'a': + syslog(LOG_INFO, "#act_tsk(%d)", tskno); + syscall(act_tsk(tskid)); + break; + case 'A': + syslog(LOG_INFO, "#can_act(%d)", tskno); + syscall(ercd = can_act(tskid)); + if (ercd >= 0) { + syslog(LOG_NOTICE, "can_act(%d) returns %d", + tskno, ercd); + } + break; + case 't': + syslog(LOG_INFO, "#ter_tsk(%d)", tskno); + syscall(ter_tsk(tskid)); + break; + case '>': + syslog(LOG_INFO, "#chg_pri(%d, HIGH_PRIORITY)", tskno); + chg_pri(tskid, HIGH_PRIORITY); + break; + case '=': + syslog(LOG_INFO, "#chg_pri(%d, MID_PRIORITY)", tskno); + chg_pri(tskid, MID_PRIORITY); + break; + case '<': + syslog(LOG_INFO, "#chg_pri(%d, LOW_PRIORITY)", tskno); + chg_pri(tskid, LOW_PRIORITY); + break; + case 'G': + syslog(LOG_INFO, "#get_pri(%d, &tskpri)", tskno); + syscall(ercd = get_pri(tskid, &tskpri)); + if (ercd >= 0) { + syslog(LOG_NOTICE, "priority of task %d is %d", + tskno, tskpri); + } + break; + case 'w': + syslog(LOG_INFO, "#wup_tsk(%d)", tskno); + syscall(wup_tsk(tskid)); + break; + case 'W': + syslog(LOG_INFO, "#can_wup(%d)", tskno); + syscall(ercd = can_wup(tskid)); + if (ercd >= 0) { + syslog(LOG_NOTICE, "can_wup(%d) returns %d", + tskno, ercd); + } + break; + case 'l': + syslog(LOG_INFO, "#rel_wai(%d)", tskno); + syscall(rel_wai(tskid)); + break; + case 'u': + syslog(LOG_INFO, "#sus_tsk(%d)", tskno); + syscall(sus_tsk(tskid)); + break; + case 'm': + syslog(LOG_INFO, "#rsm_tsk(%d)", tskno); + syscall(rsm_tsk(tskid)); + break; + case 'M': + syslog(LOG_INFO, "#frsm_tsk(%d)", tskno); + syscall(frsm_tsk(tskid)); + break; + case 'x': + syslog(LOG_INFO, "#ras_tex(%d, 0x0001)", tskno); + syscall(ras_tex(tskid, 0x0001)); + break; + case 'X': + syslog(LOG_INFO, "#ras_tex(%d, 0x0002)", tskno); + syscall(ras_tex(tskid, 0x0002)); + break; + case 'r': + syslog(LOG_INFO, "#rot_rdq(three priorities)"); + rot_rdq(HIGH_PRIORITY); + rot_rdq(MID_PRIORITY); + rot_rdq(LOW_PRIORITY); + break; + case 'c': + sta_cyc(CYCHDR1); + break; + case 'C': + stp_cyc(CYCHDR1); + break; +#ifndef OMIT_VGET_TIM + case 'V': + syscall(vxget_tim(&utime1)); + syscall(vxget_tim(&utime2)); + syslog(LOG_NOTICE, "utime1 = %d, utime2 = %d", + (UINT) utime1, (UINT) utime2); + break; +#endif /* OMIT_VGET_TIM */ + case 'v': + vmsk_log(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_EMERG)); + break; + case 'q': + vmsk_log(LOG_UPTO(LOG_NOTICE), LOG_UPTO(LOG_EMERG)); + break; + default: + break; + } + } while (c != '\003' && c != 'Q'); + + syslog(LOG_NOTICE, "Sample program ends."); + kernel_exit(); +} diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.cfg b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.cfg new file mode 100644 index 0000000..e91e990 --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.cfg @@ -0,0 +1,28 @@ +/* + * @(#) $Id: sample1.cfg,v 1.1 2012/07/20 04:03:13 maduki Exp $ + */ + +/* + * サンプルプログラム(1)のシステムコンフィギュレーションファイル + */ + +#define _MACRO_ONLY +#include "sample1.h" + +INCLUDE("\"sample1.h\""); +CRE_TSK(TASK1, { TA_HLNG, (VP_INT) 1, task, MID_PRIORITY, STACK_SIZE, NULL }); +CRE_TSK(TASK2, { TA_HLNG, (VP_INT) 2, task, MID_PRIORITY, STACK_SIZE, NULL }); +CRE_TSK(TASK3, { TA_HLNG, (VP_INT) 3, task, MID_PRIORITY, STACK_SIZE, NULL }); +CRE_TSK(MAIN_TASK, { TA_HLNG|TA_ACT, 0, main_task, MAIN_PRIORITY, + STACK_SIZE, NULL }); +DEF_TEX(TASK1, { TA_HLNG, tex_routine }); +DEF_TEX(TASK2, { TA_HLNG, tex_routine }); +DEF_TEX(TASK3, { TA_HLNG, tex_routine }); +CRE_CYC(CYCHDR1, { TA_HLNG, 0, cyclic_handler, 2000, 0 }); +#ifdef CPUEXC1 +DEF_EXC(CPUEXC1, { TA_HLNG, cpuexc_handler} ); +#endif /* CPUEXC1 */ + +#include "../systask/timer.cfg" +#include "../systask/serial.cfg" +#include "../systask/logtask.cfg" diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.dpj b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.dpj new file mode 100644 index 0000000..98e121a --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.dpj @@ -0,0 +1,240 @@ + + + + + ADSP-BF518 + .dxe + Executable file + + + + + .\Debug + .\Debug + 0 + + + + + + + + + + + + + + + + + + + + + + + .\Release + .\Release + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + .\Debug + .\Debug + + + + + .\Release + .\Release + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.h b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.h new file mode 100644 index 0000000..b2f555a --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.h @@ -0,0 +1,215 @@ +/* + * TOPPERS/JSP Kernel + * Toyohashi Open Platform for Embedded Real-Time Systems/ + * Just Standard Profile Kernel + * + * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory + * Toyohashi Univ. of Technology, JAPAN + * Copyright (C) 2005 by Embedded and Real-Time Systems Laboratory + * Graduate School of Information Science, Nagoya Univ., JAPAN + * + * 上記著作権者は,以下の (1)~(4) の条件か,Free Software Foundation + * によって公表されている GNU General Public License の Version 2 に記 + * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア + * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下, + * 利用と呼ぶ)することを無償で許諾する. + * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 + * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー + * スコード中に含まれていること. + * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 + * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 + * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 + * の無保証規定を掲載すること. + * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 + * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ + * と. + * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 + * 作権表示,この利用条件および下記の無保証規定を掲載すること. + * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに + * 報告すること. + * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 + * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. + * + * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お + * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も + * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直 + * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない. + * + * @(#) $Id: sample1.h,v 1.1 2012/07/20 04:03:13 maduki Exp $ + */ + +/* + * サンプルプログラム(1)のヘッダファイル + */ + +#include + +/* + * 各タスクの優先度の定義 + */ + +#define MAIN_PRIORITY 5 /* メインタスクの優先度 */ + /* HIGH_PRIORITY より高くすること */ + +#define HIGH_PRIORITY 9 /* 並列に実行されるタスクの優先度 */ +#define MID_PRIORITY 10 +#define LOW_PRIORITY 11 + +/* + * ターゲット依存の定義(CPU例外ハンドラの起動方法など) + */ + +#ifdef M68K + +#define CPUEXC1 5 /* ゼロ除算例外 */ +#define RAISE_CPU_EXCEPTION syslog(LOG_NOTICE, "zerodiv = %d", 10 / 0) + +#elif defined(SH3) + +#define CPUEXC1 224 /* ロードエラー例外 */ +#define RAISE_CPU_EXCEPTION (*((volatile int *) 0xFFFFFEC1)) + +#elif defined(SH1) + +#define CPUEXC1 9 /* CPUアドレスエラー例外 */ +#define RAISE_CPU_EXCEPTION (*((volatile int *) 0xFFFFFEC1)) +#ifdef TOKIWA_SH1 +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#endif /* TOKIWA_SH1 */ + +#elif defined(ARMV4) + +#define CPUEXC1 4 /* ロードエラー例外 */ +#define RAISE_CPU_EXCEPTION (*((volatile int *) 0xFFFFFEC1)) + +#elif defined(V850) + +#elif defined(H8) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ + +#elif defined(H8S) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ +#define LOOP_REF 4000L /* 速度計測用のループ回数 */ + +#elif defined(MICROBLAZE) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ +#define STACK_SIZE 2048 /* タスクのスタックサイズ */ + +#elif defined(IA32) + +#define CPUEXC1 0 /* ゼロ除算例外 */ +#define RAISE_CPU_EXCEPTION syslog(LOG_NOTICE, "zerodiv = %d", 10 / 0) +define OMIT_VGET_TIM + +#elif defined(TMS320C54X) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ +#define STACK_SIZE 320 /* タスクのスタックサイズ */ +#define LOOP_REF 500000L /* 速度計測用のループ回数 */ + +#elif defined(XSTORMY16) + +#define CPUEXC1 0 /* 無効命令例外 */ +#define RAISE_CPU_EXCEPTION __asm__( ".hword 0x0006" ) +#define OMIT_VGET_TIM /* vxget_tim()は非サポート */ +#define LOOP_REF 4000L /* 速度計測用のループ回数 */ +#define STACK_SIZE 256 /* タスクのスタックサイズ */ +#define TASK_PORTID 2 /* SIOはポート2を用いる */ + +#elif defined(MIPS3) || defined(MIPS64) + +#define CPUEXC1 Bp /* ブレークポイント例外(ゼロ除算時に発生) */ +#define RAISE_CPU_EXCEPTION syslog(LOG_NOTICE, "zerodiv = %d", 10 / 0) + +#elif defined(M16C) && defined(OAKS16) + +#define CPUEXC1 32 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm(" int #32") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#define TASK_PORTID 2 /* 文字入力するシリアルポートID */ + +#elif defined(M16C) && defined(OAKS16_MINI) + +#define CPUEXC1 32 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm(" int #32") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 384 /* タスクのスタックサイズ */ +#define TASK_PORTID 2 /* 文字入力するシリアルポートID */ + +#elif defined(M16C) && defined(M3029) + +#define CPUEXC1 32 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm(" int #32") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ + +#elif defined(BLACKFIN) + +#define CPUEXC1 0 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm("excpt 0;") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 1024 /* タスクのスタックサイズ */ +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ + +#elif defined(LINUX) + +#undef CPUEXC1 /* CPU例外ハンドラをサポートしない */ +#define OMIT_VGET_TIM +#define LOOP_REF 4000000 /* 速度計測用のループ回数 */ + +#elif defined(NIOS2) + +#define CPUEXC1 0 /* 未実装命令例外 */ +#define RAISE_CPU_EXCEPTION Asm("div zero, zero, zero"); + +#elif defined(M32C) + +#define CPUEXC1 32 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION asm(" int #32") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ + +#elif defined(M32R) + +#define CPUEXC1 EXC_TRAP00 +#define RAISE_CPU_EXCEPTION Asm("trap 0") + +#elif defined(TLCS_900) && defined(ZUP_F16_EX) + +#define CPUEXC1 3 /* CPU例外ハンドラ番号 */ +#define RAISE_CPU_EXCEPTION Asm(" swi 2") /* ソフトウェア割込み発生 */ +#define STACK_SIZE 512 /* タスクのスタックサイズ */ +#define TASK_PORTID 1 /* 文字入力するシリアルポートID */ +#define OMIT_VGET_TIM + +#endif + +/* + * ターゲットに依存する可能性のある定数の定義 + */ + +#ifndef TASK_PORTID +#define TASK_PORTID 2 /* 文字入力するシリアルポートID */ +#endif /* TASK_PORTID */ + +#ifndef STACK_SIZE +#define STACK_SIZE 8192 /* タスクのスタックサイズ */ +#endif /* STACK_SIZE */ + +#ifndef LOOP_REF +#define LOOP_REF 1000000 /* 速度計測用のループ回数 */ +#endif /* LOOP_REF */ + +/* + * 関数のプロトタイプ宣言 + */ +#ifndef _MACRO_ONLY + +extern void task(VP_INT tskno); +extern void main_task(VP_INT exinf); +extern void tex_routine(TEXPTN texptn, VP_INT tskno); +extern void cyclic_handler(VP_INT exinf); +extern void cpuexc_handler(VP p_excinf); + +#endif /* _MACRO_ONLY */ diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.ldf b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.ldf new file mode 100644 index 0000000..1284b0a --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1.ldf @@ -0,0 +1,480 @@ +/* MANAGED-BY-SYSTEM-BUILDER */ +/* VisualDSP++ 5.0 Update 8 */ +/* LDF Printer version: 5.8.0.3 */ +/* ldfgen.exe version: 5.8.0.3 */ +/* VDSG version: 5.8.0.3 */ + +/* +** ADSP-BF518 linker description file generated on Jun 09, 2010 at 22:41:24. +** +** Copyright (C) 2000-2010 Analog Devices Inc., All Rights Reserved. +** +** This file is generated automatically based upon the options selected +** in the LDF Wizard. Changes to the LDF configuration should be made by +** changing the appropriate options rather than editing this file. +** +** Configuration:- +** crt_doj: BF518_EZKIT_POST_basiccrt.doj +** processor: ADSP-BF518 +** product_name: VisualDSP++ 5.0 Update 8 +** si_revision: automatic +** default_silicon_revision_from_archdef: 0.1 +** using_cplusplus: true +** mem_init: false +** use_vdk: false +** use_eh: true +** use_argv: true +** running_from_internal_memory: true +** user_heap_src_file: C:\Build_tools\ant_build\cvsStage\_5.0ExportBlackfinReGen\Examples\Blackfin\Examples\ADSP-BF518 EZ-KIT Lite\Power_On_Self_Test\BF518_EZKIT_POST_heaptab.c +** libraries_use_stdlib: true +** libraries_use_fileio_libs: false +** libraries_use_ieeefp_emulation_libs: false +** libraries_use_eh_enabled_libs: false +** system_heap: L1 +** system_heap_min_size: 2k +** system_stack: L1 +** system_stack_min_size: 2k +** use_sdram: false +** +*/ + +ARCHITECTURE(ADSP-BF518) + +SEARCH_DIR($ADI_DSP/Blackfin/lib) + + +// Workarounds are enabled, exceptions are disabled. +#define RT_LIB_NAME(x) lib ## x ## y.dlb +#define RT_LIB_NAME_EH(x) lib ## x ## y.dlb +#define RT_LIB_NAME_MT(x) lib ## x ## y.dlb +#define RT_LIB_NAME_EH_MT(x) lib ## x ## y.dlb +#define RT_OBJ_NAME(x) x ## y.doj +#define RT_OBJ_NAME_MT(x) x ## mty.doj + + +$LIBRARIES = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + RT_LIB_NAME_MT(small532) + ,RT_LIB_NAME_MT(io532) + ,RT_LIB_NAME_MT(c532) + ,RT_LIB_NAME_MT(event532) + ,RT_LIB_NAME(ssl512) + ,RT_LIB_NAME(drv512) + ,RT_LIB_NAME_MT(x532) + ,RT_LIB_NAME_EH_MT(cpp532) + ,RT_LIB_NAME_EH_MT(cpprt532) + ,RT_LIB_NAME(f64ieee532) + ,RT_LIB_NAME(dsp532) + ,RT_LIB_NAME(sftflt532) + ,RT_LIB_NAME(etsi532) + ,RT_OBJ_NAME_MT(idle532) + ,RT_LIB_NAME_MT(rt_fileio532) + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + ; + +$OBJECTS = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + RT_LIB_NAME(profile532) + , $COMMAND_LINE_OBJECTS + , "cplbtab518.doj" + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + +/* , RT_OBJ_NAME(crtn518) */ + ; + +$OBJS_LIBS_INTERNAL = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + $OBJECTS{prefersMem("internal")}, $LIBRARIES{prefersMem("internal")} + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + ; + +$OBJS_LIBS_NOT_EXTERNAL = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + $OBJECTS{!prefersMem("external")}, $LIBRARIES{!prefersMem("external")} + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + ; + +$OBJS_LIBS_WITH_AUTO_BREAKPOINTS = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + $OBJECTS { FuncName("_main") || + FuncName("___lib_prog_term") || + FuncName("__primIO") || + FuncName("__ov_start") || + FuncName("__ov_end") || + FuncName("__dbg_assert") || + FuncName("__unknown_exception_occurred") || + FuncName("_cplb_init") || + FuncName("__KernelPanic") }, + $LIBRARIES { FuncName("_main") || + FuncName("___lib_prog_term") || + FuncName("__primIO") || + FuncName("__ov_start") || + FuncName("__ov_end") || + FuncName("__dbg_assert") || + FuncName("__unknown_exception_occurred") || + FuncName("_cplb_init") || + FuncName("__KernelPanic") } + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + ; + +$OBJS_LIBS_WITHOUT_AUTO_BREAKPOINTS = + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + $OBJECTS { !FuncName("_main") && + !FuncName("___lib_prog_term") && + !FuncName("__primIO") && + !FuncName("__ov_start") && + !FuncName("__ov_end") && + !FuncName("__dbg_assert") && + !FuncName("__unknown_exception_occurred") && + !FuncName("_cplb_init") && + !FuncName("__KernelPanic") }, + $LIBRARIES { !FuncName("_main") && + !FuncName("___lib_prog_term") && + !FuncName("__primIO") && + !FuncName("__ov_start") && + !FuncName("__ov_end") && + !FuncName("__dbg_assert") && + !FuncName("__unknown_exception_occurred") && + !FuncName("_cplb_init") && + !FuncName("__KernelPanic") } + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + ; + + +/*$VDSG */ +/* Text inserted between these $VDSG comments will be preserved */ +/*$VDSG */ + + +/*$VDSG */ +/* This code is preserved if the LDF is re-generated. */ + + +#define ASYNC0_MEMTYPE RAM +#define ASYNC1_MEMTYPE RAM +#define ASYNC2_MEMTYPE RAM +#define ASYNC3_MEMTYPE RAM + + +/*$VDSG */ + + +/* +** Memory map. +** +** 0xFFE00000 - 0xFFFFFFFF Core MMR registers (2MB) +** 0xFFC00000 - 0xFFDFFFFF System MMR registers (2MB) +** 0xFFB01000 - 0xFFBFFFFF Reserved +** 0xFFB00000 - 0xFFB00FFF Scratch SRAM (4K) +** 0xFFA14000 - 0xFFAFFFFF Reserved +** 0xFFA10000 - 0xFFA13FFF Code SRAM/CACHE (16K) +** 0xFFA0C000 - 0xFFA0FFFF Reserved +** 0xFFA08000 - 0xFFA0BFFF Instruction Bank B SRAM (16K) in 0.0, Reserved on 0.1 and up +** 0xFFA04000 - 0xFFA07FFF Reserved in 0.0, Instruction Bank B SRAM (16K) in 0.1 and up +** 0xFFA00000 - 0xFFA03FFF Instruction Bank A SRAM (16K) +** 0xFF908000 - 0xFF9FFFFF Reserved +** 0xFF904000 - 0xFF907FFF Data Bank B SRAM/CACHE (16k) +** 0xFF900000 - 0XFF903FFF Data Bank B SRAM (16k) +** 0xFF808000 - 0xFF8FFFFF Reserved +** 0xFF804000 - 0xFF807FFF Data Bank A SRAM/CACHE (16k) +** 0xFF800000 - 0XFF803FFF Data Bank A SRAM (16k) +** 0xEF008000 - 0xFF7FFFFF Reserved +** 0xEF000000 - 0xEF807FFF Boot ROM (32K) +** 0x20400000 - 0xEEFFFFFF Reserved +** 0x20300000 - 0x203FFFFF ASYNC MEMORY BANK 3 (1MB) +** 0x20200000 - 0x202FFFFF ASYNC MEMORY BANK 2 (1MB) +** 0x20100000 - 0x201FFFFF ASYNC MEMORY BANK 1 (1MB) +** 0x20000000 - 0x200FFFFF ASYNC MEMORY BANK 0 (1MB) +** 0x00000000 - 0x07FFFFFF SDRAM MEMORY (16MB - 128MB) +** +** Notes: +** 0xFF807FEF-0xFF807FFF Required by boot-loader. +*/ + +MEMORY +{ + /* See readme.txt */ + MEM_L1_SCRATCH { START(0xFFB00000) END(0xFFB00FFF) TYPE(RAM) WIDTH(8) } + MEM_L1_CODE_CACHE { START(0xFFA10000) END(0xFFA13FFF) TYPE(RAM) WIDTH(8) } + MEM_L1_CODE { START(0xFFA00000) END(0xFFA07FFF) TYPE(RAM) WIDTH(8) } + +/* MEM_L1_DATA_B_CACHE { START(0xFF904000) END(0xFF907FFF) TYPE(RAM) WIDTH(8) } */ +/* MEM_L1_DATA_B { START(0xFF900000) END(0xFF903FFF) TYPE(RAM) WIDTH(8) } */ + MEM_L1_DATA_B { START(0xFF900000) END(0xFF907FFF) TYPE(RAM) WIDTH(8) } + +/* MEM_L1_DATA_A_CACHE { START(0xFF804000) END(0xFF807FFF) TYPE(RAM) WIDTH(8) } */ +/* MEM_L1_DATA_A { START(0xFF800000) END(0xFF803FFF) TYPE(RAM) WIDTH(8) } */ + MEM_L1_DATA_A { START(0xFF800000) END(0xFF807FFF) TYPE(RAM) WIDTH(8) } + + MEM_ASYNC3 { START(0x20300000) END(0x203FFFFF) TYPE(RAM) WIDTH(8) } + MEM_ASYNC2 { START(0x20200000) END(0x202FFFFF) TYPE(RAM) WIDTH(8) } + MEM_ASYNC1 { START(0x20100000) END(0x201FFFFF) TYPE(RAM) WIDTH(8) } + MEM_ASYNC0 { START(0x20000000) END(0x200FFFFF) TYPE(RAM) WIDTH(8) } + + /* 64MB of SDRAM partitioned into 4 banks */ + MEM_SDRAM0_BANK0 { START(0x00000004) END(0x00FFFFFF) TYPE(RAM) WIDTH(8) } + MEM_SDRAM0_BANK1 { START(0x01000000) END(0x01FFFFFF) TYPE(RAM) WIDTH(8) } + MEM_SDRAM0_BANK2 { START(0x02000000) END(0x02FFFFFF) TYPE(RAM) WIDTH(8) } + MEM_SDRAM0_BANK3 { START(0x03000000) END(0x03FFFFFF) TYPE(RAM) WIDTH(8) } +} /* MEMORY */ + +PROCESSOR p0 +{ + OUTPUT($COMMAND_LINE_OUTPUT_FILE) + RESOLVE(start, 0xFFA00000) + RESOLVE(___argv_string, 0xFF800000) + KEEP(start, _main) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + SECTIONS + { + /* Workaround for hardware errata 05-00-0189 and 05-00-0310 - + ** "Speculative (and fetches made at boundary of reserved memory + ** space) for instruction or data fetches may cause false + ** protection exceptions" and "False hardware errors caused by + ** fetches at the boundary of reserved memory ". + ** + ** Done by avoiding use of 76 bytes from at the end of blocks + ** that are adjacent to reserved memory. Workaround is enabled + ** for appropriate silicon revisions (-si-revision switch). + */ + RESERVE(___wab0=MEMORY_END(MEM_L1_SCRATCH) - 75, ___l0 = 76) + RESERVE(___wab1=MEMORY_END(MEM_L1_CODE_CACHE) - 75, ___l1 = 76) + RESERVE(___wab2=MEMORY_END(MEM_L1_CODE) - 75, ___l2 = 76) +/* RESERVE(___wab3=MEMORY_END(MEM_L1_DATA_B_CACHE) - 75, ___l3 = 76) */ + RESERVE(___wab4=MEMORY_END(MEM_L1_DATA_B) - 75, ___l4 = 76) +/* RESERVE(___wab5=MEMORY_END(MEM_L1_DATA_A_CACHE) - 75, ___l5 = 76) */ + RESERVE(___wab6=MEMORY_END(MEM_L1_DATA_A) - 75, ___l6 = 76) + RESERVE(___wab8=MEMORY_END(MEM_ASYNC3) - 75, ___l8 = 76) + RESERVE(___wab9=MEMORY_END(MEM_SDRAM0_BANK3) - 75, ___l9 = 76) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + scratchpad NO_INIT + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(L1_scratchpad) $LIBRARIES(L1_scratchpad)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_SCRATCH + + L1_code + { + INPUT_SECTION_ALIGN(4) + ___l1_code_cache = 0; + INPUT_SECTIONS($OBJS_LIBS_WITH_AUTO_BREAKPOINTS(program)) + INPUT_SECTIONS($OBJECTS(L1_code) $LIBRARIES(L1_code)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(cplb_code) $LIBRARIES(cplb_code)) + INPUT_SECTIONS($OBJECTS(cplb) $LIBRARIES(cplb)) + INPUT_SECTIONS($OBJECTS(noncache_code) $LIBRARIES(noncache_code)) + INPUT_SECTIONS($OBJS_LIBS_INTERNAL(program)) + INPUT_SECTIONS($OBJS_LIBS_NOT_EXTERNAL(program)) + INPUT_SECTIONS($OBJECTS(program) $LIBRARIES(program)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_CODE + + L1_data_a_tables + { + INPUT_SECTION_ALIGN(4) + FORCE_CONTIGUITY + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(ctor) $LIBRARIES(ctor)) + INPUT_SECTIONS($OBJECTS(ctorl) $LIBRARIES(ctorl)) + INPUT_SECTIONS($OBJECTS(.gdt) $LIBRARIES(.gdt)) + INPUT_SECTIONS($OBJECTS(.gdtl) $LIBRARIES(.gdtl)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA_A + + L1_data_a_1 + { + INPUT_SECTION_ALIGN(4) + ___l1_data_cache_a = 0; + INPUT_SECTIONS($OBJECTS(L1_data_a) $LIBRARIES(L1_data_a)) + INPUT_SECTIONS($OBJECTS(L1_data) $LIBRARIES(L1_data)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + RESERVE(heaps_and_stack_in_L1_data_a, heaps_and_stack_in_L1_data_a_length = 4096,4) + } > MEM_L1_DATA_A + + L1_data_a_bsz ZERO_INIT + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS( $OBJECTS(L1_bsz) $LIBRARIES(L1_bsz)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA_A + + bsz_L1_data_a ZERO_INIT + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJS_LIBS_INTERNAL(bsz)) + INPUT_SECTIONS($OBJS_LIBS_NOT_EXTERNAL(bsz)) + INPUT_SECTIONS($OBJECTS(bsz) $LIBRARIES(bsz)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA_A + + L1_data_a + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(voldata) $LIBRARIES(voldata)) + INPUT_SECTIONS($OBJS_LIBS_INTERNAL(data1)) + INPUT_SECTIONS($OBJS_LIBS_NOT_EXTERNAL(data1)) + INPUT_SECTIONS($OBJECTS(data1) $LIBRARIES(data1)) + INPUT_SECTIONS($OBJECTS(constdata) $LIBRARIES(constdata)) + INPUT_SECTIONS($OBJECTS(cplb_data) $LIBRARIES(cplb_data)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA_A + + L1_data_a_2 + { + INPUT_SECTION_ALIGN(4) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + INPUT_SECTIONS($OBJECTS(vtbl) $LIBRARIES(vtbl)) + INPUT_SECTIONS($OBJECTS(.frt) $LIBRARIES(.frt)) + INPUT_SECTIONS($OBJECTS(.rtti) $LIBRARIES(.rtti)) + INPUT_SECTIONS($OBJECTS(.edt) $LIBRARIES(.edt)) + INPUT_SECTIONS($OBJECTS(.cht) $LIBRARIES(.cht)) + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } > MEM_L1_DATA_A + + L1_data_a_stack_heap + { + INPUT_SECTION_ALIGN(4) + RESERVE_EXPAND(heaps_and_stack_in_L1_data_a, heaps_and_stack_in_L1_data_a_length , 0, 4) + ldf_stack_space = heaps_and_stack_in_L1_data_a; + ldf_stack_end = (ldf_stack_space + (((heaps_and_stack_in_L1_data_a_length * 2048) / 4096) - 4)) & 0xfffffffc; + ldf_heap_space = ldf_stack_end + 4; + ldf_heap_end = (ldf_heap_space + (((heaps_and_stack_in_L1_data_a_length * 2048) / 4096) - 4)) & 0xfffffffc; + ldf_heap_length = ldf_heap_end - ldf_heap_space; + } > MEM_L1_DATA_A + + sdram0_bank0 + { + INPUT_SECTION_ALIGN(4) + INPUT_SECTIONS( $OBJECTS(sdram0) $LIBRARIES(sdram0)) + INPUT_SECTIONS( $OBJECTS(sdram0_bank0) $LIBRARIES(sdram0_bank0)) + INPUT_SECTIONS( $OBJECTS(noncache_code) $LIBRARIES(noncache_code)) +/* INPUT_SECTIONS( $OBJECTS(program) $LIBRARIES(program)) */ + } >MEM_SDRAM0_BANK0 + + /*$VDSG */ + /* Text inserted between these $VDSG comments will be preserved */ + /*$VDSG */ + + } /* SECTIONS */ +} /* p0 */ + diff --git a/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1_ezkit_bf518.dpg b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1_ezkit_bf518.dpg new file mode 100644 index 0000000..58f728c --- /dev/null +++ b/i2c-test/kernel/tools/blackfin-vdsp/sample1_ezkit_bf518/sample1_ezkit_bf518.dpg @@ -0,0 +1,12 @@ + + + + + + + + + libkernel + + + -- 2.11.0