Giter Club home page Giter Club logo

Comments (3)

jscrane avatar jscrane commented on August 11, 2024

The issue is that the variable in question (e.g., build.board) has been substituted already, in a previous assignment:

GenF1.menu.pnum.HY_TINYSTM103TB.build.board=HY_TINYSTM103TB
GenF1.menu.pnum.HY_TINYSTM103TB.build.variant_h=variant_{build.board}.h

The first assignment produces:

menu.pnum.HY_TINYSTM103TB.build.board=HY_TINYSTM103TB
menu.pnum.HY_TINYSTM103TB.build.variant_h=variant_.h

and the second:

build.board=HY_TINYSTM103TB
build.variant_h=variant_.h

from uc-makefile.

jscrane avatar jscrane commented on August 11, 2024

Also platform.txt contains build definitions:

# Defaults config
build.xSerial=-DHAL_UART_MODULE_ENABLED
build.enable_usb=
build.usb_speed=
build.enable_virtio=
build.peripheral_pins=
build.startup_file=
build.fpu=
build.float-abi=
build.flags.optimize=-Os
build.flags.debug=-DNDEBUG
build.flags.ldspecs=--specs=nano.specs
build.flash_offset=0

Because build.flash_offset is set here, it will be substituted wherever make has read it already, including in menu definitions. The behaviour of Arduino seems to be only to make this substitution when a menu option is chosen, as in:

GenF1.menu.upload_method.dfu2Method.build.flash_offset=0x2000
GenF1.menu.upload_method.dfu2Method.build.bootloader_flags=-DBL_LEGACY_LEAF -DVECT_TAB_OFFSET={build.flash_offset}

A solution to this would be to process all menus before reading platform.txt and set variables in platform.txt using ?=.

from uc-makefile.

jscrane avatar jscrane commented on August 11, 2024

The ideas in the last comment are compatible with the (new) automatic menu processing in hardware.mk completed in #34.

from uc-makefile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.