Changes between Version 1 and Version 2 of PerTaskCflags
- Timestamp:
- Sep 7, 2006, 10:12:20 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PerTaskCflags
v1 v2 2 2 They will be added to compile line as `-DKEY=value` on every source file for a given task 3 3 4 == Usage examples == 5 6 {{{ 7 tg = TaskModel( 8 'tg', 9 outfifos = ['output'], 10 impl = [ SwTask( 'tg', 11 stack_size = 4096, 12 sources = [ 'src/tg_posix.c' ], 13 defines = ['FILE_NAME', 'NB_ITER'] ) 14 ] ) 15 16 tg_inst = Task( 17 tg, 'tg_inst_0', 18 portmap = { 'output':fifo_to_app }, 19 defines = { 'FILE_NAME':'"plan.jpeg"', 'NB_ITER':'4' } ) 20 }}} 21 22 Yes, have double quotes for strings so that the name is still a string when it comes to C... 23 4 24 == Warning == 5 25 6 Defined values when compiling a C file are unpredictableif26 Defined values when compiling a C file are '''unpredictable''' if 7 27 * This C file is '''shared between tasks''' 8 28 * The task corresponding to the C-file is '''instanciated more than once''' with '''different''' defines