jxsl13
October 23, 2019, 12:35pm
#1
I would like to see, which files are being compiled, linked etc. when I execute a build.
I’m trying to compile a Blinky example for arm cortex m3 and one for arm cortex m4, each having their own build environment and different source files based on the target utilizing src_filter
.
My problem is, that before I added the cortex m4 target, I did not have any problems building and uploading the cortex m3 target and the board blinked properly, after adding the cortex m4 target, it seems like to incorrect files, like some system startup or assembly files are being build/linked incorrectly.
I’d like to see, what files the src_filter
actually compiles into the firmware.
You should see in terminal window what files are compiled when you build the firmware. To see the whole list, clean and rebuild.
jxsl13
October 23, 2019, 1:32pm
#3
I’m getting this output, which doesn’t help much at all:
Executing task: platformio run --verbose --environment lpc1768 <
Processing lpc1768 (platform: nxplpc; board: lpc1768; src_filter: +<*>, -<.git/>, -<.svn/>, -<example/>, -<examples/>, -<test/>, -<tests/>, -<target/>, +<traget/MCB1760/>; build_flags: -Wl,-T"scripts/target/MCB1760/LPC1768.ld", -D MCB1760, -D DEBUG; extra_scripts: scripts/target/MCB1760/firmware_patch.py; upload_protocol: jlink-jtag; debug_tool: jlink)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/nxplpc/lpc1768.html
PLATFORM: NXP LPC 4.4.0 > NXP mbed LPC1768
HARDWARE: LPC1768 96MHz, 64KB RAM, 512KB Flash
DEBUG: Current (jlink) On-board (cmsis-dap) External (blackmagic, jlink)
PACKAGES: toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
arm-none-eabi-g++ -o .pio/build/lpc1768/src/main.o -c -fno-rtti -fno-exceptions -Os -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib -mcpu=cortex-m3 -DF_CPU=96000000L -DPLATFORMIO=40003 -DMCB1760 -DDEBUG -Iinclude -Isrc src/main.cpp
arm-none-eabi-g++ -o .pio/build/lpc1768/firmware.elf -Os -Wl,--gc-sections,--relax -mthumb --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m3 -Wl,-Tscripts/target/MCB1760/LPC1768.ld .pio/build/lpc1768/src/main.o -L.pio/build/lpc1768 -Wl,--start-group -lc -lgcc -lm -lstdc++ -lnosys -Wl,--end-group
/Users/john/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol Reset_Handler; defaulting to 0000000000000000
arm-none-eabi-objcopy -O binary .pio/build/lpc1768/firmware.elf .pio/build/lpc1768/firmware.bin
MethodWrapper(["checkprogsize"], [".pio/build/lpc1768/firmware.elf"])
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [ ] 0.1% (used 36 bytes from 65536 bytes)
PROGRAM: [ ] 0.0% (used 100 bytes from 524288 bytes)
.pio/build/lpc1768/firmware.elf :
section size addr
.text 92 0
.data 8 268435656
.bss 28 268435664
.ARM.attributes 41 0
Total 169
post_bin_file([".pio/build/lpc1768/firmware.bin"], [".pio/build/lpc1768/firmware.elf"])
==== Post building BIN file ====
Firmware path: .pio/build/lpc1768/firmware.bin
Wrote checksum 0x65f24ed2 into binary.
======================================================================================= [SUCCESS] Took 0.65 seconds =======================================================================================
Environment Status Duration
-------------------- -------- ------------
stm32f407vg IGNORED
lpc1768 SUCCESS 00:00:00.652
myAVR_Board_MK2_2.20 IGNORED
Arduino_UNO IGNORED
======================================================================================= 1 succeeded in 00:00:00.652 =======================================================================================
Terminal will be reused by tasks, press any key to close it.
When having these files available:
I need to know which of the startup and assembly files are being compiled…
As he said
Otherwise only a partial recompilation will be done.
pio run -t clean
pio run
sufficies to see the names of the cpp files which are being compiled. Since header files are only ever included, these will not show up directly… You can show all the include paths though by enabling verbose compilation (pio run -v
) and looking at all the -I
files which are either referenced directly in the command or in command text files inside the command.
jxsl13
October 23, 2019, 1:39pm
#5
Kinda weird, that cleaning the target via the GUI + doing a verbose build(via GUI) didn’t have the same output as this…
It seems to have, but weirdly files are missing…
in my filter or something like that. gotta look further into it.
Would be nice to see, what the added files were of src_filter