UHURU_RAVEN targets fails to compile greentea tests for baremetal in Mbed OS 6
Build failures:
* UHURU_RAVEN::GCC_ARM::FEATURES-STORAGE-TESTS-BLOCKDEVICE-GENERAL_BLOCK_DEVICE
Building project general_block_device (UHURU_RAVEN, GCC_ARM)
Scan: GCC_ARM
Scan: general_block_device
Compile [100.0%]: main.cpp
[Fatal Error] main.cpp@32,10: SPIFBlockDevice.h: No such file or directory
* UHURU_RAVEN::GCC_ARM::FEATURES-STORAGE-TESTS-FILESYSTEM-GENERAL_FILESYSTEM
Building project general_filesystem (UHURU_RAVEN, GCC_ARM)
Scan: GCC_ARM
Scan: general_filesystem
Compile [100.0%]: main.cpp
[Fatal Error] main.cpp@26,10: SPIFBlockDevice.h: No such file or directory
Arm Compiler 6 and GCC 9
mbed-os-6.0.0
Mbed CLI 1.10.4
git clone https://github.com/ARMmbed/mbed-os
mbed deploy
mbed test -t GCC_ARM -m UHURU_RAVEN --compile --app-config mbed-os/TESTS/configs/baremetal.json -c
@jamesbeyond @toyowata @ARMmbed/team-uhuru
Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers.
Internal Jira reference: https://jira.arm.com/browse/MBOTRIAGE-2738
@MarceloSalazar
I could reproduce the compile error with UHURU_RAVEN target.
Other targets (K82F, MTS_DRAGONFLY_F413RH and EP_ATRAS) have same issue which has COMPONENT_SPIF definition.
I have added the spif value in the baremetal.json here, but I still got compile error.
Ah, spif is not a proper name of mbed_lib.json for the SPIF component.
Adding the "spif-driver" in baremetal.json fixes the problem.
$ mbed test -t GCC_ARM -m UHURU_RAVEN --compile --app-config TESTS/configs/baremetal.json -n FEATURES-STORAGE-TESTS-BLOCKDEVICE-GENERAL_BLOCK_DEVICE
[mbed] Working path "/Users/toywat01/dev/uhuru/mbed-os" (program)
Building library mbed-build (UHURU_RAVEN, GCC_ARM)
Scan: mbed-os
Building project general_block_device (UHURU_RAVEN, GCC_ARM)
Scan: GCC_ARM
Scan: general_block_device
Link: general_block_device
Elf2Bin: general_block_device
| Module | .text | .data | .bss |
|---------------------------------|-----------|---------|----------|
| [fill] | 78(+0) | 6(+0) | 50(+0) |
| [lib]/c_nano.a | 5104(+0) | 100(+0) | 21(+0) |
| [lib]/gcc.a | 1300(+0) | 0(+0) | 0(+0) |
| [lib]/m.a | 324(+0) | 0(+0) | 0(+0) |
| [lib]/misc | 188(+0) | 4(+0) | 28(+0) |
| [lib]/nosys.a | 32(+0) | 0(+0) | 0(+0) |
| [lib]/stdc++_nano.a | 0(+0) | 0(+0) | 0(+0) |
| components/storage | 2774(+0) | 0(+0) | 8(+0) |
| drivers/source | 2182(+0) | 0(+0) | 1660(+0) |
| features/frameworks | 5212(+0) | 69(+0) | 369(+0) |
| features/storage | 6428(+0) | 113(+0) | 994(+0) |
| hal/LowPowerTickerWrapper.o | 936(+0) | 0(+0) | 0(+0) |
| hal/mbed_critical_section_api.o | 104(+0) | 0(+0) | 2(+0) |
| hal/mbed_gpio.o | 124(+0) | 0(+0) | 0(+0) |
| hal/mbed_lp_ticker_api.o | 24(+0) | 4(+0) | 64(+0) |
| hal/mbed_lp_ticker_wrapper.o | 208(+0) | 0(+0) | 117(+0) |
| hal/mbed_pinmap_common.o | 140(+0) | 0(+0) | 0(+0) |
| hal/mbed_ticker_api.o | 1184(+0) | 0(+0) | 0(+0) |
| hal/mbed_us_ticker_api.o | 30(+0) | 4(+0) | 64(+0) |
| hal/static_pinmap.o | 12(+0) | 0(+0) | 0(+0) |
| platform/source | 5312(+0) | 260(+0) | 428(+0) |
| rtos/source | 4(+0) | 0(+0) | 0(+0) |
| targets/TARGET_STM | 14440(+0) | 8(+0) | 1211(+0) |
| Subtotals | 46140(+0) | 568(+0) | 5016(+0) |
Total Static RAM memory (data + bss): 5584(+0) bytes
Total Flash memory (text + data): 46708(+0) bytes
Image: BUILD/tests/UHURU_RAVEN/GCC_ARM/features/storage/TESTS/blockdevice/general_block_device/general_block_device.bin
Memory map breakdown for built projects (values in Bytes):
| name | target | toolchain | static_ram | total_flash |
|----------------------|-------------|-----------|------------|-------------|
| general_block_device | UHURU_RAVEN | GCC_ARM | 5584 | 46708 |
Build successes:
* UHURU_RAVEN::GCC_ARM::FEATURES-STORAGE-TESTS-BLOCKDEVICE-GENERAL_BLOCK_DEVICE
* UHURU_RAVEN::GCC_ARM::MBED-BUILD
Thanks @toyowata
Most helpful comment
Ah,
spifis not a proper name ofmbed_lib.jsonfor the SPIF component.https://github.com/ARMmbed/mbed-os/blob/a6207cadad0acd1876f436dc6baeddf46c42af06/components/storage/blockdevice/COMPONENT_SPIF/mbed_lib.json#L2
Adding the
"spif-driver"inbaremetal.jsonfixes the problem.