2 years, 11 months ago.

Mbed cli test error on mbed drivers

I got this error in my project when I use mbed test -m NUCLEO_F401RE -t GCC_ARM。 look like is mbed driver error , i use 4eea097334d6

here is my projecthttps://os.mbed.com/users/rozendhyan/code/IDW01M1-MQTT/

include the mbed library with this snippet

chenjiaqide-MacBook-Air:MQTT_IDW01 Rozen_mac$ mbed test -m NUCLEO_F401RE -t GCC_ARM
Building library mbed-build (NUCLEO_F401RE, GCC_ARM)
Scan: MQTT_IDW01
Copy: mbed.h
Copy: FileBase.h
Copy: LocalFileSystem.h
Copy: FileLike.h
.
.
.
Copy: targets.json
Copy: mbed_lib.json
Copy: STM32F401XE.ld
Compile [ 45.5%]: NetworkStack.cpp
[Error] FlashIAP.h@128,13: field '_flash' has incomplete type 'flash_t {aka flash_s}'
Failed to build library

Memory map breakdown for built projects (values in Bytes):
+------+--------+-----------+------------+-------------+
| name | target | toolchain | static_ram | total_flash |
+------+--------+-----------+------------+-------------+
+------+--------+-----------+------------+-------------+
.
.
Copy: mbed_lib.json
        Copy: STM32F401XE.ld
        Compile [ 45.5%]: NetworkStack.cpp
        [Error] FlashIAP.h@128,13: field '_flash' has incomplete type 'flash_t {aka flash_s}'
        
[mbed] ERROR: "/Users/Rozen_mac/anaconda/bin/python" returned error code 1.
[mbed] ERROR: Command "/Users/Rozen_mac/anaconda/bin/python -u /Users/Rozen_mac/code/fucking_sensor/MQTT_IDW01/.temp/tools/test.py -t GCC_ARM -m NUCLEO_F401RE --source /Users/Rozen_mac/code/fucking_sensor/MQTT_IDW01 --build /Users/Rozen_mac/code/fucking_sensor/MQTT_IDW01/BUILD/tests/NUCLEO_F401RE/GCC_ARM --test-spec /Users/Rozen_mac/code/fucking_sensor/MQTT_IDW01/BUILD/tests/NUCLEO_F401RE/GCC_ARM/test_spec.json" in "/Users/Rozen_mac/code/fucking_sensor/MQTT_IDW01"

1 Answer

2 years ago.

Hi,

I'm facing the same issue here .

Building library mbed-build (NUCLEO_F091RC, GCC_ARM)
Scan: power_board
Copy: FlashIAP.h
Copy: NectarStream.h
Compile [ 13.3%]: ErrorHandler.cpp
[Error] FlashIAP.h@128,13: field '_flash' has incomplete type 'flash_t {aka flash_s}'
Failed to build library
Memory map breakdown for built projects (values in Bytes):
| name | target | toolchain | static_ram | total_flash |
|------|--------|-----------|------------|-------------|


Build failures:
  * NUCLEO_F091RC::GCC_ARM::MBED-BUILD

[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/mnt/c/Users/doman/Documents/Nectar/Sun/power_board"
       Command: "/usr/bin/python -u /mnt/c/Users/doman/Documents/Nectar/Sun/power_board/.temp/tools/test.py -t GCC_ARM -m NUCLEO_F091RC --source . --build ./BUILD/tests/NUCLEO_F091RC/GCC_ARM --test-spec ./BUILD/tests/NUCLEO_F091RC/GCC_ARM/test_spec.json"
       Tip: You could retry the last command with "-v" flag for verbose output

I'm using: - mbed-cli v1.8.1 - mbed build #0f02307a0877 https://mbed.org/users/mbed_official/code/mbed/builds/0f02307a0877 - GCC-ARM compiler gcc-arm-none-eabi-6-2017-q2-update