PlatformIO Community

Mbed build never ends

I have Visual Studio Code:
Version: 1.47.3 (user setup)
Commit: 91899dcef7b8110878ea59626991a18c8a6a1b3e
Date: 2020-07-23T13:12:49.994Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

And installed PlatformIO to start a software development in a Nucleo F072RB. I tested the STM32Cube framework and worked very good, but the problem was when I started to test the Mbed framework.

I setup a simple project with this platform.ini :

[env:nucleo_f072rb]
platform = ststm32
board = nucleo_f072rb
framework = mbed

I did not even write any code to the main.cpp file and started to build the project. The fact is that it never ends, I waited for like 5 minutes and the build process keeps scrolling, loading and using my CPU resources and I can’t find this logically correct. So I wanted to see if you could help to find a solution for this issue.

I already decided to uninstall and install the PlatformIO extension again but this did not solve the problem.

Hope to receive some news from you guys soon! Thanks!

This is the output that I could get from the build process until I ended:

Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\nanostack-hal-mbed-cmsis-rtos\ns_file_system_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\nanostack-hal-mbed-cmsis-rtos\ns_hal_init.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\nanostack-hal-mbed-cmsis-rtos\nvm\nvm_ram.o
In file included from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/TARGET~1/common_objects.h:40,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/TARGET~1/TARGET~2/objects.h:57,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/device.h:38,
                 from C:/Users/AIOTIK-005/.platformio/packages/framework-mbed/hal/ticker_api.h:25,
                 from C:/Users/AIOTIK-005/.platformio/packages/framework-mbed/hal/us_ticker_api.h:24,
                 from C:/Users/AIOTIK-005/.platformio/packages/framework-mbed/drivers/HighResClock.h:21,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/drivers/Timeout.h:20,
                 from C:\Users\AIOTIK-005\.platformio\packages\framework-mbed\features\nanostack\nanostack-hal-mbed-cmsis-rtos\arm_hal_timer.cpp:25:
C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/TARGET~1/device/stm32f0xx_ll_crc.h: In function 'void LL_CRC_FeedData16(CRC_TypeDef*, uint16_t)':
C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/TARGET~1/device/stm32f0xx_ll_crc.h:371:4: warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
  371 |   *(uint16_t __IO *)(&CRCx->DR) = (uint16_t) InData;
      |    ^~~~~~~~~~~~~~~~~~Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\nanostack-interface\Nanostack.o
~~~~~~~~~~
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack-eventloop\source\event.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack-eventloop\source\ns_timeout.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack-eventloop\source\ns_timer.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack-eventloop\source\system_timer.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Bootstraps\Generic\network_lib.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Bootstraps\Generic\protocol_6lowpan.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Bootstraps\Generic\protocol_6lowpan_bootstrap.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Bootstraps\Generic\protocol_6lowpan_interface.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Fragmentation\cipv6_fragmenter.o
In file included from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/TARGET~1/common_objects.h:40,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/TARGET~1/TARGET~2/objects.h:57,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/device.h:38,
                 from C:/Users/AIOTIK-005/.platformio/packages/framework-mbed/hal/ticker_api.h:25,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/features/netsocket/SocketStats.h:24,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/features/netsocket/InternetSocket.h:30,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/features/netsocket/UDPSocket.h:23,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/features/NETSOC~1/nsapi.h:40,
                 from C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/features/NETSOC~1/OnboardNetworkStack.h:20,
                 from C:\Users\AIOTIK-005\.platformio\packages\framework-mbed\features\nanostack\nanostack-interface\Nanostack.h:21,
                 from C:\Users\AIOTIK-005\.platformio\packages\framework-mbed\features\nanostack\nanostack-interface\Nanostack.cpp:20:
C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/TARGET~1/device/stm32f0xx_ll_crc.h: In function 'void LL_CRC_FeedData16(CRC_TypeDef*, uint16_t)':
C:/Users/AIOTIK~1/PLATFO~1/packages/FRAMEW~2/targets/TAE5D3~1/TARGET~1/device/stm32f0xx_ll_crc.h:371:4: warning: dereferencing type-punned pointer will break strict-aliasing rules 
[-Wstrict-aliasing]
  371 |   *(uint16_t __IO *)(&CRCx->DR) = (uint16_t) InData;
      |    ^~~~~~Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\IPHC_Decode\6lowpan_iphc.o
~~~~Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\IPHC_Decode\iphc_compress.o
~~~~~~~~~~~~~~~~~~
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\IPHC_Decode\iphc_decompress.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\IPHC_Decode\lowpan_context.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\MAC\beacon_handler.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\MAC\mac_data_poll.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\MAC\mac_helper.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\MAC\mac_ie_lib.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\MAC\mac_pairwise_key.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\MAC\mac_response_handler.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Mesh\mesh.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ND\nd_router_object.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\NVM\nwk_nvm.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_bbr_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_bbr_commercial.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_beacon.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_bootstrap.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_border_router_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_ccm.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_commissioning_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_commissioning_if.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_common.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_dhcpv6_server.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_diagnostic.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_discovery.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_host_bootstrap.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_joiner_application.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_leader_service.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_lowpower_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_lowpower_private_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_management_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_management_client.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_management_if.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_management_server.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_mdns.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_meshcop_lib.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_mle_message_handler.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_nd.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_neighbor_class.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_net_config_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_network_data_lib.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_network_data_storage.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_network_synch.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_nvm_store.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_resolution_client.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_resolution_server.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_router_bootstrap.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_routing.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\Thread\thread_test_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\adaptation_interface.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_bbr_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_bootstrap.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_cfg_settings.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_common.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_eapol_auth_relay.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_eapol_pdu.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_eapol_relay.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_eapol_relay_lib.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_empty_functions.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_ie_lib.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_llc_data_service.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_management_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_mpx_header.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_neighbor_class.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_auth.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_controller.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_key_storage.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_lib.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_nvm_data.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_nvm_store.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_supp.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_time.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_pae_timers.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_stats.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\6LoWPAN\ws\ws_test_api.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\BorderRouter\border_router.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\icmpv6.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\icmpv6_prefix.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\icmpv6_radv.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\ipv6.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\ipv6_flow.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\ipv6_fragmentation.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\ipv6_resolution.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\mld.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\tcp.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\udp.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Core\buffer_dyn.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Core\ns_address_internal.o
C:\Users\AIOTIK-005\.platformio\packages\framework-mbed\features\nanostack\sal-stack-nanostack\source\Common_Protocols\tcp.c:86:20: warning: 'trace_tcp_flags' defined but not used 
[-Wunused-function]
   86 | static const char *trace_tcp_flags(uint16_t flags)
      |                    ^~~~~~~~~~~~~~~
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Core\ns_monitor.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Core\ns_socket.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\Core\sockbuf.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\DHCPv6_Server\DHCPv6_Server_service.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\DHCPv6_client\dhcpv6_client_service.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\MAC\IEEE802_15_4\mac_cca_threshold.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\MAC\IEEE802_15_4\mac_fhss_callbacks.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\MAC\IEEE802_15_4\mac_filter.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\MAC\IEEE802_15_4\mac_header_helper_functions.o
Compiling .pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\MAC\IEEE802_15_4\mac_indirect_data.o
*** [.pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\MAC\IEEE802_15_4\mac_header_helper_functions.o] Build interrupted.
*** [.pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\MAC\IEEE802_15_4\mac_filter.o] Build interrupted.
*** [.pio\build\nucleo_f072rb\FrameworkMbed\features\nanostack\sal-stack-nanostack\source\MAC\IEEE802_15_4\mac_indirect_data.o] Build interrupted.
Error: Aborted by user
The terminal process "C:\Users\AIOTIK-005\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

It can be if whole network stacks are compiled in. From the officially supplied examples, try compiling

Compilation time should go up significantly with each project (no RTOS -> RTOS + basic stuff -> RTOS + network)

It can be if whole network stacks are combiled in. From the officially supplied examples, try compiling

Thank you for your reply, I follow your suggestion and then I did some test with only the mbed-rtos-blink-baremetal example.

Example: mbed-rtos-blink-baremetal
test #1 
============================================================================
# 1st build 
Checking size .pio\build\nucleo_f072rb\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [====      ]  40.4% (used 6616 bytes from 16384 bytes)
Flash: [==        ]  21.0% (used 27496 bytes from 131072 bytes)
[SUCCESS] Took: 1395.31 seconds = 23.25 min!!!!!!!!!!!!!!!!!!!!!

# 2nd build 
Checking size .pio\build\nucleo_f072rb\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [====      ]  40.4% (used 6616 bytes from 16384 bytes)
Flash: [==        ]  21.0% (used 27496 bytes from 131072 bytes)
[SUCCESS] Took 93.60 seconds = 1.56 min
============================================================================

test #2
============================================================================
# 3rd build 
Checking size .pio\build\nucleo_f072rb\firmware.elf
Building .pio\build\nucleo_f072rb\firmware.bin
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [====      ]  40.4% (used 6616 bytes from 16384 bytes)
Flash: [==        ]  21.0% (used 27496 bytes from 131072 bytes)
[SUCCESS] Took 1478.01 seconds = 24.63 min

# 4th build 
Checking size .pio\build\nucleo_f072rb\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [====      ]  40.4% (used 6616 bytes from 16384 bytes)
Flash: [==        ]  21.0% (used 27496 bytes from 131072 bytes)
[SUCCESS] Took 105.58 seconds = 1.759 min

So according to my last tests, I was able to build successfully the 1st example the first time in a time of about 23-24 minutes just for only test a blink example.

During the build process, I checked that, as you mentioned, there are different libraries involved in the build process that I did not even used like LoRaWAN, SPI, I2C, etc (a lot of files involved). So I was thinking… Is there any way to use the mbed framework without including such an amount of libraries?

I think it is not practical to wait such time when there are a lot of tools involved in the building process that I don’t plan to use. This is only time-consuming.

Ran another build after a clean, 25 minutes
image

When I compile the baremetal example for a board = nucleo_f072rb:

1st run from a cleaned project state

Linking .pio\build\nucleo_f072rb\firmware.elf
Building .pio\build\nucleo_f072rb\firmware.bin
Checking size .pio\build\nucleo_f072rb\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   8.9% (used 1456 bytes from 16384 bytes)
Flash: [==        ]  18.1% (used 23660 bytes from 131072 bytes)
======================================================================================================= [SUCCESS] Took 30.76 seconds =======================================================================================================

Environment    Status    Duration
-------------  --------  ------------
nucleo_f072rb  SUCCESS   00:00:30.757

and a recompilation from an already built project

Checking size .pio\build\nucleo_f072rb\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   8.9% (used 1456 bytes from 16384 bytes)
Flash: [==        ]  18.1% (used 23660 bytes from 131072 bytes)
======================================================================================================== [SUCCESS] Took 9.17 seconds ========================================================================================================

Environment    Status    Duration
-------------  --------  ------------
nucleo_f072rb  SUCCESS   00:00:09.170

So whatever you’re experiencing is indeed not normal, at least from my perspective. I’m getting 30 seconds whereas you’re getting 24 minutes.

Some antivirus might be intrusively scanning every compilation process or access to every file, your Windows might be broken or you’re running on an extremely underpowered PC. Or your software is outdated, try updating PlatformIO (pio upgrade --dev) and your platforms (pio platform update).

These results were obtained on a Ryzen 2700 (8 cores / 16 threads @ 3.3GHz), 16GB DDR4 and Windows 10 build 1909.

It is a generell problem of the mbed build system at all. The whole framework will compiled, if you use the parts like network stack, cellular … or not. The same behavior is also with the mbed studio software.

Hi all,

Had a similar problem with compile time since PIO MBED6 update, maybe it is my old PC who can’t keep up, but indeed the whole framework is compiled every time (when cleaning or edit pio.ini), especially if you don’t use bare-metal profile (takes me 10 to 15min to build).

A workaround is to use a small script develop by @KKoovalsky , which will apply your .mbedignore to PIO MBED framework every time you build your project. I don’t know if it is a good process to do that, but it drastically reduces the build time in my case.

A small example of a .mbedignore file content I use for MBED6 on nucleo_f446re projects:

components/802.15.4_RF
components/wifi
features/cellular
features/lorawan
features/lwipstack
features/nanostack
features/netsocket
features/nfc

Edit: Here a template project for F446RE using the script

1 Like