← index #16527Issue #2541
Off-topic · high · value 0.307
QUERY · ISSUE

RFC: Use board name for firmware files

openby chrismas9opened 2025-01-05updated 2025-03-03
enhancementports

Description

Whenever I build firmware for a board I need to rename firmware.elf, etc to the board name before distributing it to users. Would it be useful to replace "firmware" with the board name in Makefile to automate this? I have tested it and the result looks like this:

LINK build-PYBV10/PYBV10.elf
   text    data     bss     dec     hex filename
 364920      52   26908  391880   5fac8 build-PYBV10/PYBV10.elf
GEN build-PYBV10/PYBV10-0.bin
GEN build-PYBV10/PYBV10-1.bin
GEN build-PYBV10/PYBV10.hex
GEN build-PYBV10/PYBV10.dfu

If interested I can submit a PR for the stm32 port, and probably other arm ports, but I don't have the build environment to do non-arm ports.

Code Size

No response

Implementation

I intend to implement this feature and would submit a Pull Request if desirable

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

ESP8266: make deploy shows incorrect flash filesize in printed esptool.py command

closedby ghostopened 2016-10-21updated 2016-10-22
make PORT=/dev/ttyUSB0 deploy                                    46.3s  2016-10-20 22:40:55
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Generating build/genhdr/mpversion.h
GEN build/genhdr/qstrdefs.collected.h
QSTR not updated
CC ../py/modsys.c
CC ../py/../extmod/modwebrepl.c
CC moduos.c
CC ../lib/utils/pyexec.c
LINK build/firmware.elf
   text    data     bss     dec     hex filename
 553780    1084   56352  611216   95390 build/firmware.elf
Create build/firmware-combined.bin
esptool.py v1.2-dev
('flash    ', 36144)
('padding  ', 720)
('irom0text', 518760)
('total    ', 555624)
('md5      ', '5e615515229ad27c3cb651a721476e95')
Writing build/firmware-combined.bin to the board
esptool.py v1.2-dev
Connecting...
Auto-detected Flash size: 32m
Running Cesanta flasher stub...
Flash params set to 0x0040
Writing 557056 @ 0x0... 557056 (100 %)
Wrote 557056 bytes at 0x0 in 48.3 seconds (92.3 kbit/s)...
Leaving...
Verifying just-written flash...
Verifying 0x87a78 (555640) bytes @ 0x00000000 in flash against build/firmware-combined.bin...
-- verify OK (digest matched)
#@esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=8m 0 build/firmware.elf-0x00000.bin 0x9000 build/firmware.elf-0x0[1-f]000.bin

8m is hardcoded in the output. I tried changing it to $(FLASH_SIZE) which changes the output to --flash_size=detect. If that's what is wanted, I can submit a PR.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied