Ignore:
Timestamp:
Apr 5, 2019, 9:26:53 PM (5 years ago)
Author:
coas-nagasima
Message:

mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/asp3_dcre/tecsgen/tecslib/core/tecsgen.rb

    r352 r374  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2014 by TOPPERS Project
     6#   Copyright (C) 2008-2017 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    250250    Cell.create_reverse_join
    251251
     252    DescriptorType.check_signature
     253    Signature.set_descriptor_list
     254    Celltype.check_dynamic_join
     255
    252256    #0 set_definition_join は2回呼び出される(1回目)
    253257    dbgPrint( "## Checking all join\n")
     
    450454  end # finalize
    451455
     456  def dump_tecsgen_rbdmp
     457    dbgPrint "dump_tecsgen_rbdmp 0:\n"
     458    #### unjoin_plugin 後に行う必要があるため、コード生成後にダンプを行う
     459    #### Region link root ごとにオプティマイズしてダンプ ####
     460    Namespace.get_root.unjoin_plugin
     461    Namespace.get_root.find_plugin 0, []
     462
     463    Region.get_link_roots.each { |region|
     464      dbgPrint "dump_tecsgen_rbdmp 1: Region.path_str: #{region.get_namespace_path.get_path_str}\n"
     465
     466      n_cells = region.get_n_cells
     467
     468      if $region_list.length > 0 then
     469        if $region_list[ region.get_namespace_path.get_path_str ] == false then
     470          $region_list[ region.get_namespace_path.get_path_str ] = true
     471        else
     472          next
     473        end
     474      end
     475
     476      dbgPrint "dump_tecsgen_rbdmp 2: Region.path_str: #{region.get_namespace_path.get_path_str}\n"
     477      # セルが一つもなければ生成しない
     478      # セルの生成がない場合
     479      if region.get_n_cells == 0 then
     480        # if $region_list.length > 0 then
     481        #   Generator.warning( "W9999 $1: specified to generate but has no cell", region.get_name )
     482        # end
     483        if region != @root_namespace then
     484          next
     485        end
     486      end
     487
     488      dbgPrint "dump_tecsgen_rbdmp 3: Region.path_str: #{region.get_namespace_path.get_path_str}\n"
     489      $generating_region = region
     490      if Region.get_link_roots.length > 1 then
     491        if region.get_name == "::" then
     492          $gen = $gen_base
     493        else
     494          $gen = $gen_base + "/" + region.get_global_name.to_s
     495        end
     496      else
     497        $gen = $gen_base
     498      end
     499
     500      dbgPrint "dump_tecsgen_rbdmp 4: Region.path_str: #{region.get_namespace_path.get_path_str}\n"
     501      dbgPrint( "## Unset optimize variables\n")
     502      @root_namespace.reset_optimize   # 最適化をリセットする
     503
     504      #  if Generator.get_n_error == 0 then
     505      #   # エラーが発生していたら、ここへは来ない
     506         dbgPrint( "## Set cell id\n")
     507        @root_namespace.set_cell_id_and_domain      # セルの ID とドメイン情報を設定(linkunit 毎に0からつける)
     508
     509        # エラーが発生していたら、最適化は実施しない
     510        if ! $unopt then
     511          dbgPrint( "## Optimizing: Link Region=#{@root_namespace.get_name}\n")
     512          @root_namespace.optimize
     513        end
     514      # end
     515      dbgPrint "dump_tecsgen_rbdmp final: Region.path_str: #{region.get_namespace_path.get_path_str}\n"
     516      File.write( "#{$gen}/tecsgen.rbdmp", Marshal.dump(Namespace.get_root) )
     517    }
     518  end
     519 
    452520  def self.post_coded?
    453521    @@b_post_coded
Note: See TracChangeset for help on using the changeset viewer.