• Sun 2021.10.31

    Have read over:

    https://github.com/espruino/Espruino/blo­b/master/README_Building.md
    https://github.com/espruino/Espruino/blo­b/5503e6bc06562fdffa4e0c13f5bf11228656d2­ec/README_BuildProcess.md#oddities

    The current make build file 'CURRENT_BOARD.make' is dynamically built using additional input from
    file (in my case) nRF52840DONGLE.py

    Generated with scripts/get_makefile_decls.py nRF52840DONGLE
    BOARD=nRF52840DONGLE
    DEFINES+= -DnRF52840DONGLE
    PROJ_NAME=espruino_2v08.220_nrf52840_don­gle
    

    It contains a constant PROJ_NAME which seems to be built from this line

    'binaryname' : 'espruino%v_nrf52840_dongle.hex',

    I can see that the current build version 2V08.220 gets inserted using the variable %v

    No PROJ_NAME constant is within that file.

    The constant BOARD seems to be picked up from

    'name' : "nRF52840 Dongle",

    after removing the whitespace.

    When I change the 'binary_name' to the file name I'd like to create, both the .elf and .hex files remain espruino_2V08.220_nrf52840_dongle.elf
    and not the file name I place there. This has the unwanted side effect of writing over the official build.

    Q1: Where does the version get picked up from?
    Q2: Where/how should the PROJ_NAME be set?

  • The constant BOARD seems to be picked up from

    'name' : "nRF52840 Dongle",

    after removing the whitespace.

    I think it is taken directly from 'make BOARD=XYZ' and matches the boards/XYZ.py filename. You can override it by adding 'boardname' to the file. This is used in PUCKJS_MINIMAL.py to keep PUCKJS board name.

About

Avatar for Robin @Robin started