Пример #1
0
 def embed_files(self, cfg, files):
     '''embed some files using AP_ROMFS'''
     header = cfg.bldnode.make_node('sitl/ap_romfs_embedded.h').abspath()
     paths = []
     embed_path = cfg.srcnode.make_node('libraries/AP_HAL_ChibiOS/hwdef/scripts').abspath()
     sys.path.append(embed_path)
     import embed
     embed.create_embedded_h(header, files)
Пример #2
0
 def embed_ROMFS_files(self, ctx):
     '''embed some files using AP_ROMFS'''
     import embed
     header = ctx.bldnode.make_node('ap_romfs_embedded.h').abspath()
     if not embed.create_embedded_h(header, ctx.env.ROMFS_FILES,
                                    ctx.env.ROMFS_UNCOMPRESSED):
         ctx.fatal("Failed to created ap_romfs_embedded.h")
Пример #3
0
 def embed_ROMFS_files(self, ctx):
     '''embed some files using AP_ROMFS'''
     import embed
     if ctx.env.USE_NUTTX_IOFW:
         # use fmuv2_IO_NuttX.bin instead of fmuv2_IO.bin
         for i in range(len(ctx.env.ROMFS_FILES)):
             (name,filename) = ctx.env.ROMFS_FILES[i]
             if name == 'io_firmware.bin':
                 filename = 'Tools/IO_Firmware/fmuv2_IO_NuttX.bin'
                 print("Using IO firmware %s" % filename)
                 ctx.env.ROMFS_FILES[i] = (name,filename);
     header = ctx.bldnode.make_node('ap_romfs_embedded.h').abspath()
     if not embed.create_embedded_h(header, ctx.env.ROMFS_FILES):
         ctx.fatal("Failed to created ap_romfs_embedded.h")
Пример #4
0
 def embed_ROMFS_files(self, ctx):
     '''embed some files using AP_ROMFS'''
     import embed
     if ctx.env.USE_NUTTX_IOFW:
         # use fmuv2_IO_NuttX.bin instead of fmuv2_IO.bin
         for i in range(len(ctx.env.ROMFS_FILES)):
             (name,filename) = ctx.env.ROMFS_FILES[i]
             if name == 'io_firmware.bin':
                 filename = 'Tools/IO_Firmware/fmuv2_IO_NuttX.bin'
                 print("Using IO firmware %s" % filename)
                 ctx.env.ROMFS_FILES[i] = (name,filename);
     header = ctx.bldnode.make_node('ap_romfs_embedded.h').abspath()
     if not embed.create_embedded_h(header, ctx.env.ROMFS_FILES):
         ctx.fatal("Failed to created ap_romfs_embedded.h")
Пример #5
0
def write_ROMFS(outdir):
    '''create ROMFS embedded header'''
    from embed import create_embedded_h
    create_embedded_h(os.path.join(outdir, 'ap_romfs_embedded.h'), romfs)
Пример #6
0
 def embed_ROMFS_files(self, ctx):
     '''embed some files using AP_ROMFS'''
     import embed
     header = ctx.bldnode.make_node('ap_romfs_embedded.h').abspath()
     if not embed.create_embedded_h(header, ctx.env.ROMFS_FILES):
         bld.fatal("Failed to created ap_romfs_embedded.h")
Пример #7
0
def write_ROMFS(outdir):
    '''create ROMFS embedded header'''
    from embed import create_embedded_h

    create_embedded_h(os.path.join(outdir, 'ap_romfs_embedded.h'), romfs)