Ignore:
Timestamp:
Jul 8, 2015, 3:57:15 PM (9 years ago)
Author:
alain
Message:

Modify all applications to support two new rules:
1) introduce a local Makefile for each application.
2) change "application.elf" name to "application/appli.elf" name in the application.py" file.
Introduce the shell application.

Location:
soft/giet_vm/applications/classif
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/classif/Makefile

    r488 r589  
    1 APP_NAME=classif
    21
    3 USE+= stdio.o
    4 USE+= mwmr_channel.o
    5 
    6 USES=$(patsubst %,$(BUILD_PATH)/$(LIB_NAME)/%,$(USE))
     2APP_NAME = classif
    73
    84OBJS= main.o
    95
    10 all: $(APP_NAME).elf
     6LIBS= -L../../build/libs -luser
    117
    12 BIN_NAME_PATH=$(BUILD_PATH)$(APP_NAME).elf
     8INCLUDES = -I.  -I../..  -I../../giet_libs  -I../../giet_xml 
    139
    14 $(APP_NAME).elf: $(OBJS) $(APP_NAME).ld
    15         $(LD) -o $(BIN_NAME_PATH) -T $(APP_NAME).ld $(OBJS) $(USES)
    16         $(DU) -D $(BIN_NAME_PATH) > $@.txt
     10LIB_DEPS = ../../build/libs/libuser.a
     11
     12appli.elf: $(OBJS) $(APP_NAME).ld $(LIBS_DEPS)
     13        $(LD) -o $@ -T $(APP_NAME).ld $(OBJS) $(LIBS)
     14        $(DU) -D $@ > $@.txt
    1715
    1816%.o: %.c
    19         $(CC)  $(INCLUDE) $(CFLAGS) $($*.o_CFLAGS) -c -o  $@ $<
    20         $(DU) -D  $@ >  $@.txt
     17        $(CC)  $(INCLUDES) $(CFLAGS) -c -o  $@ $<
    2118
    2219clean:
    23         rm -f *.o *.elf *.txt core *~ 2>$(TRASH)
    24         rm $(BIN_NAME_PATH) 2>$(TRASH)
     20        rm -f *.o *.elf *.txt *.pyc core *~
  • soft/giet_vm/applications/classif/classif.py

    r533 r589  
    44
    55###################################################################################
    6 #   file   : classif.py  
     6#   file   : classif.py
    77#   date   : november 2014
    88#   author : Alain Greiner
     
    3030##################################################################################
    3131
    32 #########################
    33 def classif( mapping ):
     32######################
     33def extend( mapping ):
    3434
    3535    x_size    = mapping.x_size
     
    6060    mapping.addVseg( vspace, 'classif_data', data_base , data_size,
    6161                     'C_WU', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM',
    62                      binpath = 'build/classif/classif.elf',
     62                     binpath = 'build/classif/appli.elf',
    6363                     local = False )
    6464
     
    8484                                 code_base , code_size,
    8585                                 'CXWU', vtype = 'ELF', x = x, y = y, pseg = 'RAM',
    86                                  binpath = 'build/classif/classif.elf',
     86                                 binpath = 'build/classif/appli.elf',
    8787                                 local = True )
    8888
     
    133133if __name__ == '__main__':
    134134
    135     vspace = classif( Mapping( 'test', 2, 2, 4 ) )
     135    vspace = extend( Mapping( 'test', 2, 2, 4 ) )
    136136    print vspace.xml()
    137137
Note: See TracChangeset for help on using the changeset viewer.