cantrip: post-merge cleanups - remove dead support for C projects (it's broken) - remove debug msgs - prefer enumerate to loop.index0 Change-Id: Id4ba8f256376d14c4e614e88c4a65eb919ff997d
diff --git a/camkes-top-level.cmake b/camkes-top-level.cmake index 4849506..513e167 100644 --- a/camkes-top-level.cmake +++ b/camkes-top-level.cmake
@@ -23,8 +23,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/tools/camkes/camkes.cmake") # Include all the other projects -#add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tools/camkes/libsel4camkes") -#add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tools/camkes/libcamkescakeml") include("${CMAKE_CURRENT_LIST_DIR}/projects/seL4_tools/cmake-tool/projects.cmake") # Should be done adding targets, can now generate the root server and the global configuration
diff --git a/camkes/templates/camkes-gen.cmake b/camkes/templates/camkes-gen.cmake index 8068446..1bd403f 100644 --- a/camkes/templates/camkes-gen.cmake +++ b/camkes/templates/camkes-gen.cmake
@@ -239,7 +239,6 @@ set(connector_target CAmkESConnector_/*? c.type.name ?*/) get_property(c_from_template TARGET ${connector_target} PROPERTY CONNECTOR_FROM) /*- if configuration[i.name].get('cantripos') -*/ -message("CANTRIP FROM CONNECTOR: " ${unique_name}) CAmkESGen("${generated_dir}/${unique_name}.rs" connector//*? c.name ?*//from//*? id ?*/ ${c_from_template} SOURCE) get_property(c_from_libs TARGET ${connector_target} PROPERTY CONNECTOR_FROM_LIBS) list(APPEND extra_libs ${c_from_libs}) @@ -270,11 +269,9 @@ CAmkESGen("${generated_dir}/${unique_name}.c" connector//*? c.name ?*//to//*? id ?*/ ${c_to_template} SOURCE C_STYLE) endif() /*- elif configuration[i.name].get('cantripos') -*/ -message("CANTRIP TO CONNECTOR: " ${unique_name}) get_property(c_to_template TARGET ${connector_target} PROPERTY CONNECTOR_TO) CAmkESGen("${generated_dir}/${unique_name}.rs" connector//*? c.name ?*//to//*? id ?*/ ${c_to_template} SOURCE) /*- else -*/ -#message("BASE TO CONNECTOR: " ${unique_name}) get_property(c_to_template TARGET ${connector_target} PROPERTY CONNECTOR_TO) CAmkESGen("${generated_dir}/${unique_name}.c" connector//*? c.name ?*//to//*? id ?*/ ${c_to_template} SOURCE C_STYLE) get_property(c_to_template_header TARGET ${connector_target} PROPERTY CONNECTOR_TO_HEADER) @@ -346,7 +343,6 @@ if (NOT "${link_language}" STREQUAL "") set_property(TARGET ${target} PROPERTY LINKER_LANGUAGE ${link_language}) endif() -message("COMPONENT " ${target} " LANGUAGE " ${link_language} " SOURCES " ${static_sources} ${gen_sources}) # Build any CakeML library if (NOT ("${cakeml_sources}" STREQUAL "")) # Pull heap/stack size from component expression OR instances expression OR default to an arbitrary 50
diff --git a/camkes/templates/cantripRPCCallSignal-to.template.rs b/camkes/templates/cantripRPCCallSignal-to.template.rs index 81cba8a..ff03a31 100644 --- a/camkes/templates/cantripRPCCallSignal-to.template.rs +++ b/camkes/templates/cantripRPCCallSignal-to.template.rs
@@ -17,10 +17,10 @@ badge: sel4_sys::seL4_Word, ) { match badge { - /*- for c in me.parent.from_ends -*/ + /*- for (i, c) in enumerate(me.parent.from_ends) -*/ /*- do allocate_cap(c, is_reader=False) -*/ /*- set notification = pop('notification') -*/ - /*? badges[loop.index0] ?*/ => unsafe { sel4_sys::seL4_Signal(/*? notification ?*/) }, + /*? badges[i] ?*/ => unsafe { sel4_sys::seL4_Signal(/*? notification ?*/) }, /*- endfor -*/ _ => unreachable!(), }
diff --git a/camkes/templates/macros.py b/camkes/templates/macros.py index 215e1a8..a8c2d8a 100644 --- a/camkes/templates/macros.py +++ b/camkes/templates/macros.py
@@ -393,8 +393,6 @@ end.interface.name, options.default_stack_size) if configuration.get('%s_has_thread' % end.interface, True): ts.append(Thread(name, end.interface, x, stack_size)) - else: - print('DISABLE thread', name, 'for FROM', end.interface) for end in connection.to_ends: if end.instance == instance: for x in six.moves.range(connection.type.to_threads): @@ -403,8 +401,6 @@ end.interface.name, options.default_stack_size) if configuration.get('%s_has_thread' % end.interface, True): ts.append(Thread(name, end.interface, x, stack_size)) - else: - print('DISABLE thread', name, 'for TO', end.interface) if options.debug_fault_handlers: # Last thread is fault handler thread