← index #6800Issue #3601
Related · medium · value 2.623
QUERY · ISSUE

Build process: mpy file in frozen dir produces spam

openby peterhinchopened 2021-01-26updated 2024-09-13
enhancementtools

I inadvertently included a .mpy file in a directory containing .py files for freezing. On building, so much output spewed that the Bash history buffer filled; I couldn't scroll back far enough to see where the error first occurred.

It would be good if the build process either stopped with a clear message or ignored files without .py extensions with a warning.

CANDIDATE · ISSUE

STM32 build fails when using FROZEN_MPY_DIR

closedby peterhinchopened 2018-02-06updated 2018-02-07

This is a recent change. When I build for Pyboard V1.1 it cross-compiles the files in my specified directory and appears to build the dfu file. But then it cross-compiles the files in stm32/modules and creates a new dfu file. So help('modules') shows the standard files rather than those in the chosen directory. This is the relevant output

CC build-PYBV11/pins_PYBV11.c
CC build-PYBV11/frozen_mpy.c
LINK build-PYBV11/firmware.elf
   text	   data	    bss	    dec	    hex	filename
 408040	     36	  28256	 436332	  6a86c	build-PYBV11/firmware.elf
Create build-PYBV11/firmware.dfu
Create build-PYBV11/firmware.hex

Up to here everything looks fine, but then it does:

make: warning: Clock skew detected. Your build may be incomplete.
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
MPY modules/micropower.py
MPY modules/ssd1306.py
MPY modules/upysh.py
MPY modules/radiobutton.py
MPY modules/checkbox.py
MPY modules/traffic.py
MPY modules/iconswitch.py
MPY modules/Flat_UI.py
MPY modules/upower.py
MPY modules/freeserif.py
MPY modules/lcd160cr_test.py
MPY modules/gauge.py
MPY modules/onewire.py
MPY modules/uasyncio/synchro.py
MPY modules/lcd160cr.py
MPY modules/threestate.py
MPY modules/flash.py
MPY modules/dht.py
Creating build-PYBV11/frozen_mpy.c
CC build-PYBV11/frozen_mpy.c
LINK build-PYBV11/firmware.elf
   text	   data	    bss	    dec	    hex	filename
 446784	     52	  28256	 475092	  73fd4	build-PYBV11/firmware.elf
Create build-PYBV11/firmware.dfu
Writing build-PYBV11/firmware.dfu to the board
File: build-PYBV11/firmware.dfu
    DfuSe v1, image size: 447137, targets: 1
    Target 0, alt setting: 0, name: "ST...", size: 446852, elements: 2
      0, address: 0x08000000, size: 14876
      1, address: 0x08020000, size: 431960
    usb: 0483:df11, device: 0x0000, dfu: 0x011a, UFD, 16, 0x583306ac
Writing memory...
0x08000000   14876 [=========================] 100% 
0x08020000  431960 [=========================] 100% 
Exiting DFU...

The above cross-compiled files reside in stm32/modules.

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