Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- #
- # Combines the Nordic s120 stack and app hex files and generate a
- # combined binary.
- # Stack at 0k, app at 96k
- set -e -x
- STACK_HEX=s120.hex
- STACK_BIN=s120.bin
- APP_HEX=app.hex
- APP_BIN=app.bin
- COMBINED_BIN=app.bin
- objcopy -O binary -I ihex $STACK_HEX $STACK_BIN
- objcopy -O binary -I ihex $APP_HEX $APP_BIN
- dd if=/dev/zero ibs=1024 count=128 | tr "\000" "\377" > $COMBINED_BIN
- dd if=$STACK_BIN of=$COMBINED_BIN bs=1024 seek=0 conv=notrunc
- dd if=$APP_BIN of=$COMBINED_BIN bs=1024 seek=96 conv=notrunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement