-
• #2
Sun 2021.10.31
Just found:
L714
PROJ_NAME=$(PROJECTNAME)
of file
Makefile
(no extension) has an assignment, but constant PROJECTNAME is not in the nRF file either. -
• #4
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.
-
• #5
Mon 2021.11.01
'binaryname' : 'espruino%v_puckjs_minimal.hex',
I see that attribute in file PUCKJS_MINIMAL.py @fanoush , but I'm not sure that will solve my issue. Board name not used as build filename. The above will have a different .hex file output from the original, wouldn't it?
ex: espruino_2v10.123_puckjs_minimal.hex vs. espruino_2v10.123_puckjs.hexWill have more time to test and try that suggestion this weekend.
If I wasn't clear, I have a new file nRF52840DONGLE
2
.pywith specific desired .hex name definition:
'binary_name' : 'espruino_%v_nrf52840_dongle2.hex'
and using these lines to build:
make clean source scripts/provision.sh nRF52840DONGLE2 make clean make make clean && BOARD=nRF52840DONGLE2 RELEASE=1 make
so I expect the output build would produce a .hex file with this new'2'
suffix,et the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail python scripts/check_elf_size.py nRF52840DONGLE2 espruino_2v08.220_nrf52840_dongle.elf Testing espruino_2v08.220_nrf52840_dongle.elf for nRF52840DONGLE2 STORAGE: 872448 -> 913408 FS DATA: 456396 -> 456416 (20 bytes) CODE: 155648 -> 456416 (299872 bytes) Code area Fits before Storage Area arm-none-eabi-objcopy -O ihex espruino_2v08.220_nrf52840_dongle.elf espruino_2v08.220_nrf52840_dongle.hex Merging SoftDevice python scripts/hexmerge.py /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/softdevice/s140/hex/s140_nrf52_6.0.0_softdevice.hex espruino_2v08.220_nrf52840_dongle.app_hex -o espruino_2v08.220_nrf52840_dongle.hex
However, as can be seen by the build output, the .py filename nRF52840DONGLE2 is picked up as you suspect it should, but the internal .hex file definition that I supply within that file, still outputs a filename that isn't desired. (no'2'
suffix)From:
'binary_name' : 'espruino_%v_nrf52840_dongle2.hex'
Shouldn't it be as I define with the %v substitution:
espruino_2v08.220_nrf52840_dongle2.elf espruino_2v08.220_nrf52840_dongle2.hex
and not, which is being built? (missing 2 suffix)
espruino_2v08.220_nrf52840_dongle.elf espruino_2v08.220_nrf52840_dongle.hex
Maybe there is a pre-defined cache list of acceptable board names somewhere, even though this one isn't an original Espruino?
Sun 2021.10.31
Have read over:
The current make build file 'CURRENT_BOARD.make' is dynamically built using additional input from
file (in my case) nRF52840DONGLE.py
It contains a constant
PROJ_NAME
which seems to be built from this lineI can see that the current build version
2V08.220
gets inserted using the variable %vNo PROJ_NAME constant is within that file.
The constant
BOARD
seems to be picked up fromafter 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?