Skip to content

Fixed skethbook+bootloader hex merger. #744

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 3 commits into from
Jun 12, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Replace logger with utils.LogIfVerbose
  • Loading branch information
facchinm committed Jun 11, 2020
commit 2da824d7b2b6cc2119ce03af514018d2be7cc5b5
7 changes: 3 additions & 4 deletions legacy/builder/merge_sketch_with_bootloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ package builder

import (
"math"
"os"
"strconv"
"strings"

"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/legacy/builder/utils"
"github.com/arduino/go-paths-helper"
"github.com/marcinbor85/gohex"
"github.com/pkg/errors"
Expand All @@ -39,7 +39,6 @@ func (s *MergeSketchWithBootloader) Run(ctx *types.Context) error {
buildPath := ctx.BuildPath
sketch := ctx.Sketch
sketchFileName := sketch.MainFile.Name.Base()
logger := ctx.GetLogger()

sketchInBuildPath := buildPath.Join(sketchFileName + ".hex")
sketchInSubfolder := buildPath.Join(constants.FOLDER_SKETCH, sketchFileName+".hex")
Expand All @@ -63,7 +62,7 @@ func (s *MergeSketchWithBootloader) Run(ctx *types.Context) error {

bootloaderPath := buildProperties.GetPath(constants.BUILD_PROPERTIES_RUNTIME_PLATFORM_PATH).Join(constants.FOLDER_BOOTLOADERS, bootloader)
if bootloaderPath.NotExist() {
logger.Fprintln(os.Stdout, constants.LOG_LEVEL_WARN, constants.MSG_BOOTLOADER_FILE_MISSING, bootloaderPath)
utils.LogIfVerbose(constants.LOG_LEVEL_WARN, constants.MSG_BOOTLOADER_FILE_MISSING, bootloaderPath)
return nil
}

Expand All @@ -77,7 +76,7 @@ func (s *MergeSketchWithBootloader) Run(ctx *types.Context) error {
}
err := merge(builtSketchPath, bootloaderPath, mergedSketchPath, maximumBinSize)
if err != nil {
logger.Fprintln(os.Stdout, constants.LOG_LEVEL_WARN, err.Error())
utils.LogIfVerbose(constants.LOG_LEVEL_INFO, err.Error())
}

return nil
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy