Changeset 712 for soft/giet_vm/applications/shell
- Timestamp:
- Oct 7, 2015, 11:56:33 AM (9 years ago)
- Location:
- soft/giet_vm/applications/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/shell/shell.c
r708 r712 14 14 #define MAX_ARGS (32) 15 15 16 16 17 struct command_t 17 18 { … … 260 261 static void cmd_ps(int argc, char** argv) 261 262 { 262 giet_applications_status(); 263 if (argc == 1) 264 { 265 giet_applications_status( NULL ); 266 } 267 else 268 { 269 giet_applications_status( argv[1] ); 270 } 263 271 } 264 272 … … 272 280 } 273 281 274 int ret = giet_pthread_pause( argv[1] , argv[2] ); 275 276 if ( ret == -1 ) 277 { 278 giet_tty_printf(" error : vspace %s not found\n", argv[1] ); 279 } 280 if ( ret == -2 ) 281 { 282 giet_tty_printf(" error : thread %s not found\n", argv[2] ); 283 } 282 giet_pthread_control( THREAD_CMD_PAUSE , argv[1] , argv[2] ); 284 283 } 285 284 … … 293 292 } 294 293 295 int ret = giet_pthread_resume( argv[1] , argv[2] ); 296 297 if ( ret == -1 ) 298 { 299 giet_tty_printf(" error : vspace %s not found\n", argv[1] ); 300 } 301 if ( ret == -2 ) 302 { 303 giet_tty_printf(" error : thread %s not found\n", argv[2] ); 304 } 294 giet_pthread_control( THREAD_CMD_RESUME , argv[1] , argv[2] ); 305 295 } 306 296 … … 314 304 } 315 305 316 int ret = giet_pthread_context( argv[1] , argv[2] ); 317 318 if ( ret == -1 ) 319 { 320 giet_tty_printf(" error : vspace %s not found\n", argv[1] ); 321 } 322 if ( ret == -2 ) 323 { 324 giet_tty_printf(" error : thread %s not found\n", argv[2] ); 325 } 306 giet_pthread_control( THREAD_CMD_CONTEXT , argv[1] , argv[2] ); 326 307 } 327 308 -
soft/giet_vm/applications/shell/shell.py
r708 r712 8 8 # author : Alain Greiner 9 9 ####################################################################################### 10 # This file describes the mapping of the single thread "shell" application 11 # on processor[0][0][0] of a multi-clusters, multi-processors architecture. 10 # This file describes the mapping of the single thread "shell" application. 11 # It is mapped on processor[xmap][ymap][pmap] of the target 12 # multi-clusters, multi-processors architecture. 12 13 #################################################################################### 13 14 … … 15 16 def extend( mapping ): 16 17 17 nprocs = mapping.nprocs 18 x_width = mapping.x_width 19 y_width = mapping.y_width 18 # define mapping 19 xmap = mapping.x_size - 1 20 ymap = mapping.y_size - 1 21 pmap = mapping.nprocs - 1 20 22 21 23 # define vsegs base & size … … 37 39 # data vseg 38 40 mapping.addVseg( vspace, 'shell_data', data_base , data_size, 39 'C_WU', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM',41 'C_WU', vtype = 'ELF', x = xmap, y = ymap, pseg = 'RAM', 40 42 binpath = 'bin/shell/appli.elf', 41 43 local = False ) … … 43 45 # code vseg 44 46 mapping.addVseg( vspace, 'shell_code', code_base , code_size, 45 'CXWU', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM',47 'CXWU', vtype = 'ELF', x = xmap, y = ymap, pseg = 'RAM', 46 48 binpath = 'bin/shell/appli.elf', 47 49 local = False ) … … 49 51 # stack vseg 50 52 mapping.addVseg( vspace, 'shell_stack', stack_base, stack_size, 51 'C_WU', vtype = 'BUFFER', x = 0 , y = 0, pseg = 'RAM',53 'C_WU', vtype = 'BUFFER', x = xmap , y = ymap , pseg = 'RAM', 52 54 local = False, big = True ) 53 55 54 56 # heap vseg (unused) 55 57 mapping.addVseg( vspace, 'shell_heap', heap_base, heap_size, 56 'C_WU', vtype = 'BUFFER', x = 0 , y = 0, pseg = 'RAM',58 'C_WU', vtype = 'BUFFER', x = xmap , y = ymap , pseg = 'RAM', 57 59 local = False ) 58 60 59 61 # task 60 mapping.addThread( vspace, 'shell', True, 0, 0, 0, 'shell_stack', 'shell_heap', 0 ) 62 mapping.addThread( vspace, 63 'shell', 64 True, # is_main 65 xmap, ymap, pmap, 66 'shell_stack', 67 'shell_heap', 68 0 ) # startid 61 69 62 70 # extend mapping name
Note: See TracChangeset
for help on using the changeset viewer.