#!/usr/bin/env ruby

##
## This file is part of INAV.
##
## INAV is free software. You can redistribute this software
## and/or modify this software under the terms of the
## GNU General Public License as published by the Free Software
## Foundation, either version 3 of the License, or (at your option)
## any later version.
##
## INAV is distributed in the hope that they will be
## useful, but WITHOUT ANY WARRANTY; without even the implied
## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this software.
##
## If not, see <http://www.gnu.org/licenses/>.
##

require_relative 'intelhex'

ih = IntelHex.new
ih.add_section 0x08000000, File.open(ARGV[0], 'rb')
ih.add_section 0x08008000, File.open(ARGV[1], 'rb')
ih.start_address = 0x08000000
ih.write File.open(ARGV[2], 'w')
