Skip to content

Adding hex generation recipe #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ compiler.ar.flags=rcs
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2hex.flags=-O binary
compiler.elf2hex.flags2=-O ihex
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.ldflags= -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork -lm -lc
compiler.size.cmd=arm-none-eabi-size
Expand Down Expand Up @@ -70,8 +71,11 @@ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.f
## Create eeprom
recipe.objcopy.eep.pattern=

## Create bin
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"

## Create hex
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags2} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"

## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
Expand Down Expand Up @@ -119,12 +123,12 @@ tools.dfu-util.path={runtime.ide.path}/hardware/tools/dfu-util/

tools.dfu-util.upload.params.verbose=-v
tools.dfu-util.upload.params.quiet=
tools.dfu-util.upload.pattern="{path}/{cmd}" "{path}" -l -d {upload.usbID} -a {upload.altID} -s {upload.mem_start} -O "{build.path}/{build.project_name}.bin" -f 0x08000000
tools.dfu-util.upload.pattern="{path}/{cmd}" "{path}" {upload.usbID} {upload.altID} {upload.mem_start} "{build.path}/{build.project_name}.bin"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to use the last revision of dfu-util please use:
tools.dfu-util.upload.pattern="{path}/{cmd}" "{path}" -l -d {upload.usbID} -a {upload.altID} -s {upload.mem_start} -O "{build.path}/{build.project_name}.bin" -f 0x08000000


# USB Flags
# ---------

# Default usb manufacturer will be replaced at compile time using
# numeric vendor ID if available or by board's specific value.
build.usb_manufacturer="Unknown"
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
tools.dfu-util.upload.pattern="{path}/{cmd}" "{path}" -l -d {upload.usbID} -a {upload.altID} -s {upload.mem_start} -O "{build.path}/{build.project_name}.bin" -f 0x08000000