MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / main

Function main

tools/WCS.py:391–427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

389
390
391def main():
392
393 # Find the appropriate RTL extension
394 find_rtl_ext()
395
396 # Find all input files
397 call_graph = {'locals': {}, 'globals': {}, 'weak': {}}
398 tu_list, manual_list = find_files()
399
400 # Read the input files
401 for tu in tu_list:
402 read_obj(tu, call_graph) # This must be first
403
404 for fxn in call_graph['weak'].values():
405 if fxn['name'] not in call_graph['globals'].keys():
406 call_graph['globals'][fxn['name']] = fxn
407
408 for tu in tu_list:
409 read_rtl(tu, call_graph)
410 for tu in tu_list:
411 read_su(tu, call_graph)
412
413 # Read manual files
414 for m in manual_list:
415 read_manual(m, call_graph)
416
417 # Validate Data
418 validate_all_data(call_graph)
419
420 # Resolve All Function Calls
421 resolve_all_calls(call_graph)
422
423 # Calculate Worst Case Stack For Each Function
424 calc_all_wcs(call_graph)
425
426 # Print A Nice Message With Each Function and the WCS
427 print_all_fxns(call_graph)
428
429def ThreadStackStaticAnalysis(env):
430 print('Start thread stack static analysis...')

Callers 3

main_thread_entryFunction · 0.50
main_thread_entryFunction · 0.50

Calls 10

find_rtl_extFunction · 0.85
find_filesFunction · 0.85
read_objFunction · 0.85
read_rtlFunction · 0.85
read_suFunction · 0.85
read_manualFunction · 0.85
validate_all_dataFunction · 0.85
resolve_all_callsFunction · 0.85
calc_all_wcsFunction · 0.85
print_all_fxnsFunction · 0.85

Tested by

no test coverage detected