NUCLEO-L496ZG restarting after flashing the .bin file

I am working on NUCLEO-L496ZG, https://os.mbed.com/platforms/ST-Nucleo-L496ZG/. I have downloaded the Nucleo_blink_led from https://os.mbed.com/teams/ST/code/Nucleo_blink_led/ and compiled it. The compilation is successful, however, as soon as I flash the .bin, I am getting the following error and the device keep restarting. I have also tried to execute the NuCLEO_display_time example (https://os.mbed.com/teams/ST/code/Nucleo_display_time/) but keep getting the same error. Can someone please let me know what is the error?

The application file format is unknown and cannot be parsed and/or processed

Hi there,

instead of these old examples you can try to import an example here or directly from github from link below https://github.com/ARMmbed/mbed-os-example-blinky

BR, Jan

Hi,

Thanks for your reply but the same problem persists with the new programs as well. I have tried two programs 1) mbed-os-example-blinky (https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-blinky/) and 2) mbed-os-example-cpu-usage (https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-cpu-usage//file/9c481abe47f7/main.cpp/) just now but keep getting the error. Additionally, I purchased this board a few days ago.

Hi Aisha,

Can you please share some details how you flash the board and the whole setup.

If you are using STM32CubeProgrammer. It works for me and the LED 1 blinks.

Hi, thanks for your reply. I have downloaded the https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-blinky/ and then compiled it with following command:

mbed compile --target NUCLEO_L496ZG --toolchain GCC_ARM --flash

The compilation is fine but the board begins to restart then and keep doing it until I remove it.

D:\MbedWorkSpace\mbed-os-example-blinky-master>mbed compile --target NUCLEO_L496ZG --toolchain GCC_ARM --flash
[mbed] Working path “D:\MbedWorkSpace\mbed-os-example-blinky-master” (program)
Building project mbed-os-example-blinky-master (NUCLEO_L496ZG, GCC_ARM)
Scan: mbed-os-example-blinky-master
Compile [ 0.1%]: mbed_tz_context.c
Compile [ 0.2%]: MCR20Drv.c
Compile [ 0.3%]: rf_configuration.c
Compile [ 0.4%]: at24mac_s2lp.cpp
Compile [ 0.5%]: at24mac.cpp
Compile [ 0.7%]: ESP8266.cpp
Compile [ 0.8%]: NanostackRfPhyMcr20a.cpp
Compile [ 0.9%]: NanostackRfPhyAtmel.cpp
Compile [ 1.0%]: NanostackRfPhys2lp.cpp
Compile [ 1.1%]: ESP8266Interface.cpp
[Warning] ESP8266Interface.cpp@522,1: ‘virtual const char* ESP8266Interface::get_ip_address()’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] ESP8266Interface.cpp@576,1: ‘virtual const char* ESP8266Interface::get_gateway()’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] ESP8266Interface.cpp@597,1: ‘virtual const char* ESP8266Interface::get_netmask()’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
Compile [ 1.2%]: AnalogOut.cpp
Compile [ 1.3%]: BusIn.cpp
Compile [ 1.4%]: BusInOut.cpp
Compile [ 1.5%]: BusOut.cpp
Compile [ 1.6%]: DigitalIn.cpp
Compile [ 1.7%]: AnalogIn.cpp
Compile [ 1.9%]: CAN.cpp
Compile [ 2.0%]: DigitalInOut.cpp
Compile [ 2.1%]: main.cpp
Compile [ 2.2%]: DigitalOut.cpp
Compile [ 2.3%]: Ethernet.cpp
Compile [ 2.4%]: I2CSlave.cpp
Compile [ 2.5%]: InterruptManager.cpp
[Warning] InterruptManager.h@204,40: ‘CallChain’ is deprecated: CallChain has been deprecated and will be removed. [-Wdeprecated-declarations]
[Warning] InterruptManager.cpp@63,60: ‘CallChain’ is deprecated: CallChain has been deprecated and will be removed. [-Wdeprecated-declarations]
[Warning] InterruptManager.cpp@92,32: ‘CallChain’ is deprecated: CallChain has been deprecated and will be removed. [-Wdeprecated-declarations]
Compile [ 2.6%]: InterruptIn.cpp
Compile [ 2.7%]: PortIn.cpp
Compile [ 2.8%]: PortInOut.cpp
Compile [ 2.9%]: FlashIAP.cpp
Compile [ 3.1%]: PortOut.cpp
Compile [ 3.2%]: I2C.cpp
Compile [ 3.3%]: MbedCRC.cpp
Compile [ 3.4%]: ResetReason.cpp
Compile [ 3.5%]: QSPI.cpp
Compile [ 3.6%]: PwmOut.cpp
Compile [ 3.7%]: TableCRC.cpp
Compile [ 3.8%]: RawSerial.cpp
Compile [ 3.9%]: SPISlave.cpp
Compile [ 4.0%]: SerialWireOutput.cpp
Compile [ 4.1%]: Ticker.cpp
Compile [ 4.2%]: Timeout.cpp
Compile [ 4.4%]: Timer.cpp
Compile [ 4.5%]: TimerEvent.cpp
Compile [ 4.6%]: Serial.cpp
Compile [ 4.7%]: Watchdog.cpp
Compile [ 4.8%]: ByteBuffer.cpp
Compile [ 4.9%]: SPI.cpp
Compile [ 5.0%]: SerialBase.cpp
[Warning] SerialBase.h@357,27: ‘mbed::SerialBase::_rx_pin’ will be initialized after [-Wreorder]
[Warning] SerialBase.h@335,24: ‘void (mbed::SerialBase::* mbed::SerialBase::_init_func)()’ [-Wreorder]
[Warning] SerialBase.cpp@26,1: when initialized here [-Wreorder]
[Warning] SerialBase.h@358,28: ‘mbed::SerialBase::_static_pinmap’ will be initialized after [-Wreorder]
[Warning] SerialBase.h@335,24: ‘void (mbed::SerialBase::* mbed::SerialBase::_init_func)()’ [-Wreorder]
[Warning] SerialBase.cpp@44,1: when initialized here [-Wreorder]
Compile [ 5.1%]: LinkedListBase.cpp
Compile [ 5.2%]: EndpointResolver.cpp
Compile [ 5.3%]: AsyncOp.cpp
Compile [ 5.4%]: UARTSerial.cpp
Compile [ 5.6%]: OperationListBase.cpp
Compile [ 5.7%]: USBCDC.cpp
Compile [ 5.8%]: USBAudio.cpp
Compile [ 5.9%]: USBHID.cpp
Compile [ 6.0%]: USBDevice.cpp
Compile [ 6.1%]: PolledQueue.cpp
Compile [ 6.2%]: USBCDC_ECM.cpp
Compile [ 6.3%]: TaskBase.cpp
Compile [ 6.4%]: USBMIDI.cpp
Compile [ 6.5%]: USBMouse.cpp
Compile [ 6.6%]: equeue.c
Compile [ 6.8%]: equeue_posix.c
Compile [ 6.9%]: USBKeyboard.cpp
Compile [ 7.0%]: USBMSD.cpp
[Warning] USBMSD.h@266,18: ‘USBMSD::_bd’ will be initialized after [-Wreorder]
[Warning] USBMSD.h@234,14: ‘uint32_t USBMSD::_addr’ [-Wreorder]
[Warning] USBMSD.cpp@67,1: when initialized here [-Wreorder]
[Warning] USBMSD.h@266,18: ‘USBMSD::_bd’ will be initialized after [-Wreorder]
[Warning] USBMSD.h@234,14: ‘uint32_t USBMSD::_addr’ [-Wreorder]
[Warning] USBMSD.cpp@80,1: when initialized here [-Wreorder]
Compile [ 7.1%]: mbed_shared_queues.cpp
Compile [ 7.2%]: EventQueue.cpp
Compile [ 7.3%]: USBSerial.cpp
Compile [ 7.4%]: USBMouseKeyboard.cpp
Compile [ 7.5%]: AT_CellularBase.cpp
Compile [ 7.6%]: equeue_mbed.cpp
Compile [ 7.7%]: AT_CellularInformation.cpp
Compile [ 7.8%]: AT_CellularContext.cpp
[Warning] AT_CellularContext.cpp@266,39: ‘virtual const char* NetworkStack::get_ip_address()’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] AT_CellularContext.cpp@935,35: ‘void mbed::CellularDevice::stop()’ is deprecated: Use CellularDevice::shutdown() instead. [since mbed-os-5.15] [-Wdeprecated-declarations]
Compile [ 8.0%]: AT_CellularDevice.cpp
Compile [ 8.1%]: APN_db.cpp
Compile [ 8.2%]: CellularLog.cpp
Compile [ 8.3%]: ATHandler.cpp
Compile [ 8.4%]: AT_CellularNetwork.cpp
Compile [ 8.5%]: AT_CellularStack.cpp
Compile [ 8.6%]: AT_CellularSMS.cpp
Compile [ 8.7%]: CellularUtil.cpp
Compile [ 8.8%]: AT_ControlPlane_netif.cpp
Compile [ 8.9%]: CellularContext.cpp
Compile [ 9.0%]: CellularDevice.cpp
Compile [ 9.2%]: GEMALTO_CINTERION_CellularInformation.cpp
Compile [ 9.3%]: GEMALTO_CINTERION_CellularContext.cpp
Compile [ 9.4%]: GEMALTO_CINTERION.cpp
Compile [ 9.5%]: GENERIC_AT3GPP.cpp
Compile [ 9.6%]: CellularStateMachine.cpp
Compile [ 9.7%]: GEMALTO_CINTERION_CellularStack.cpp
Compile [ 9.8%]: SARA4_PPP.cpp
Compile [ 9.9%]: SARA4_PPP_CellularNetwork.cpp
Compile [ 10.0%]: QUECTEL_BC95_CellularInformation.cpp
Compile [ 61.0%]: libDHCPv6.c
Compile [ 61.1%]: protocol_ipv6.c
Compile [ 61.2%]: net_ipv6.c
Compile [ 61.3%]: ipv6_routing_table.c
Compile [ 61.4%]: net_short_address_extension.c
Compile [ 61.5%]: net_test.c
Compile [ 61.7%]: net_mle.c
Compile [ 61.8%]: net_rpl.c
Compile [ 61.9%]: net_load_balance.c
Compile [ 62.0%]: socket_api.c
Compile [ 62.1%]: ns_net.c
Compile [ 62.2%]: DTLSSocket.cpp
Compile [ 62.3%]: ICMPSocket.cpp
Compile [ 62.4%]: DTLSSocketWrapper.cpp
Compile [ 62.5%]: EthernetInterface.cpp
Compile [ 62.6%]: InternetDatagramSocket.cpp
Compile [ 62.7%]: EMACInterface.cpp
[Warning] EMACInterface.cpp@46,1: ‘virtual nsapi_error_t EMACInterface::set_network(const char*, const char*, const char*)’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] EMACInterface.cpp@115,82: ‘virtual char* OnboardNetworkStack::Interface::get_ip_address(char*, nsapi_size_t)’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] EMACInterface.cpp@119,1: ‘virtual const char* EMACInterface::get_ip_address()’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] EMACInterface.cpp@142,73: ‘virtual char* OnboardNetworkStack::Interface::get_netmask(char*, nsapi_size_t)’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] EMACInterface.cpp@146,1: ‘virtual const char* EMACInterface::get_netmask()’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] EMACInterface.cpp@161,73: ‘virtual char* OnboardNetworkStack::Interface::get_gateway(char*, nsapi_size_t)’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] EMACInterface.cpp@165,1: ‘virtual const char* EMACInterface::get_gateway()’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
Compile [ 62.9%]: InternetSocket.cpp
Compile [ 63.0%]: NetworkInterfaceDefaults.cpp
Compile [ 63.1%]: NetworkInterface.cpp
Compile [ 63.2%]: L3IPInterface.cpp
Compile [ 63.3%]: SocketAddress.cpp
Compile [ 63.4%]: NetworkStack.cpp
Compile [ 63.5%]: NetStackMemoryManager.cpp
Compile [ 63.6%]: PPPInterface.cpp
[Warning] PPPInterface.cpp@88,82: ‘virtual char* OnboardNetworkStack::Interface::get_ip_address(char*, nsapi_size_t)’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] PPPInterface.cpp@132,73: ‘virtual char* OnboardNetworkStack::Interface::get_netmask(char*, nsapi_size_t)’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
[Warning] PPPInterface.cpp@141,73: ‘virtual char* OnboardNetworkStack::Interface::get_gateway(char*, nsapi_size_t)’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
Compile [ 63.7%]: WiFiAccessPoint.cpp
Compile [ 63.8%]: SocketStats.cpp
Compile [ 63.9%]: TCPServer.cpp
Compile [ 64.1%]: TCPSocket.cpp
Compile [ 64.2%]: TLSSocket.cpp
[Warning] TLSSocket.cpp@32,44: ‘nsapi_error_t TCPSocket::connect(const char*, uint16_t)’ is deprecated: String-based APIs are deprecated [since mbed-os-5.15] [-Wdeprecated-declarations]
Compile [ 64.3%]: UDPSocket.cpp
Compile [ 64.4%]: stm32xx_emac.cpp
Compile [ 64.5%]: TLSSocketWrapper.cpp
Compile [ 64.6%]: ppp_md5.c
Compile [ 64.7%]: ppp_arc4.c
Compile [ 64.8%]: ppp_md4.c
Compile [ 64.9%]: ppp_des.c
Compile [ 65.0%]: ppp_sha1.c
Compile [ 65.1%]: auth.c
Compile [ 65.3%]: chap-md5.c
Compile [ 65.4%]: ccp.c
Compile [ 65.5%]: chap-new.c
Compile [ 65.6%]: demand.c
Compile [ 65.7%]: chap_ms.c
Compile [ 65.8%]: CellularNonIPSocket.cpp
Compile [ 65.9%]: eap.c
Compile [ 66.0%]: eui64.c
Compile [ 66.1%]: fsm.c
Compile [ 66.2%]: ipcp.c
Compile [ 66.3%]: lcp.c
Compile [ 66.4%]: ipv6cp.c
Compile [ 66.6%]: magic.c
Compile [ 66.7%]: mppe.c
Compile [ 66.8%]: multilink.c
Compile [ 66.9%]: ppp.c
Compile [ 67.0%]: ppp_nsapi.cpp
Compile [ 67.1%]: ppp_ecp.c
Compile [ 67.2%]: pppapi.c
Compile [ 67.3%]: pppoe.c
Compile [ 67.4%]: pppcrypt.c
Compile [ 67.5%]: pppol2tp.c
Compile [ 67.6%]: ppp_service.cpp
Compile [ 67.8%]: pppos.cpp
Compile [ 67.9%]: ppp_service_if.cpp
Compile [ 68.0%]: nsapi_dns.cpp
Compile [ 68.1%]: upap.c
Compile [ 68.2%]: vj.c
Compile [ 68.3%]: utils.c
Compile [ 68.4%]: ac_stream.c
Compile [ 68.5%]: ac_buffer_builder.c
Compile [ 68.6%]: ac_buffer_reader.c
Compile [ 68.7%]: ac_buffer.c
Compile [ 68.8%]: PN512TransportDriver.cpp
Compile [ 69.0%]: PN512Driver.cpp
Compile [ 69.1%]: NFCControllerDriver.cpp
Compile [ 69.2%]: NFCEEPROMDriver.cpp
Compile [ 69.3%]: NFCNDEFCapable.cpp
Compile [ 69.4%]: NFCEEPROM.cpp
[Warning] NFCEEPROM.h@153,15: ‘mbed::nfc::NFCEEPROM::_operation_result’ will be initialized after [-Wreorder]
[Warning] NFCEEPROM.h@150,17: ‘ac_buffer_t mbed::nfc::NFCEEPROM::_ndef_buffer_reader’ [-Wreorder]
[Warning] NFCEEPROM.cpp@23,1: when initialized here [-Wreorder]
Compile [ 69.5%]: NFCTarget.cpp
Compile [ 69.6%]: NFCRemoteInitiator.cpp
Compile [ 69.7%]: PN512SPITransportDriver.cpp
Compile [ 69.8%]: MessageBuilder.cpp
Compile [ 69.9%]: NFCController.cpp
Compile [ 70.0%]: MessageParser.cpp
Compile [ 70.2%]: NFCRemoteEndpoint.cpp
Compile [ 70.3%]: RecordParser.cpp
Compile [ 70.4%]: Mime.cpp
Compile [ 70.5%]: ndef.c
Compile [ 70.6%]: SimpleMessageParser.cpp
Compile [ 70.7%]: nfc_scheduler.c
Compile [ 70.8%]: Type4RemoteInitiator.cpp
Compile [ 70.9%]: nfc_transport.c
Compile [ 71.0%]: Text.cpp
Compile [ 71.1%]: URI.cpp
Compile [ 71.2%]: util.cpp
Compile [ 71.4%]: iso7816_app.c
Compile [ 71.5%]: iso7816.c
Compile [ 71.6%]: isodep_target.c
Compile [ 71.7%]: type4_target.c
Compile [ 71.8%]: pn512_hw.c
Compile [ 71.9%]: pn512_irq.c
Compile [ 72.0%]: pn512_cmd.c
Compile [ 72.1%]: pn512.c
Compile [ 72.2%]: pn512_registers.c
Compile [ 72.3%]: pn512_timer.c
Compile [ 72.4%]: transceiver.c
Compile [ 72.5%]: pn512_rf.c
Compile [ 72.7%]: pn512_poll.c
Compile [ 72.8%]: pn512_transceive.c
Compile [ 72.9%]: ProfilingBlockDevice.cpp
Compile [ 73.0%]: ObservingBlockDevice.cpp
Compile [ 73.1%]: ReadOnlyBlockDevice.cpp
Compile [ 73.2%]: ChainingBlockDevice.cpp
Compile [ 73.3%]: SlicingBlockDevice.cpp
Compile [ 73.4%]: BufferedBlockDevice.cpp
Compile [ 73.5%]: ExhaustibleBlockDevice.cpp
Compile [ 73.6%]: HeapBlockDevice.cpp
Compile [ 73.7%]: FlashSimBlockDevice.cpp
Compile [ 73.9%]: ffunicode.cpp
Compile [ 74.0%]: MBRBlockDevice.cpp
Compile [ 74.1%]: lfs_util.c
Compile [ 74.2%]: ff.cpp
Compile [ 74.3%]: Dir.cpp
Compile [ 74.4%]: File.cpp
Compile [ 74.5%]: lfs.c
Compile [ 74.6%]: FileSystem.cpp
Compile [ 74.7%]: FATFileSystem.cpp
Compile [ 74.8%]: SecureStore.cpp
Compile [ 74.9%]: LittleFileSystem.cpp
Compile [ 75.1%]: kv_config.cpp
Compile [ 75.2%]: DirectAccessDevicekey.cpp
Compile [ 75.3%]: FileSystemStore.cpp
Compile [ 75.4%]: kvstore_global_api.cpp
Compile [ 75.5%]: KVMap.cpp
Compile [ 75.6%]: mbed_critical_section_api.c
Compile [ 75.7%]: mbed_compat.c
[Warning] mbed_compat.c@80,13: unused variable ‘pin’ [-Wunused-variable]
Compile [ 75.8%]: SystemStorage.cpp
Compile [ 75.9%]: LowPowerTickerWrapper.cpp
Compile [ 76.0%]: mbed_itm_api.c
Compile [ 76.1%]: mbed_gpio.c
Compile [ 76.3%]: mbed_flash_api.c
Compile [ 76.4%]: mbed_gpio_irq.c
Compile [ 76.5%]: nvstore.cpp
[Warning] nvstore.h@92,24: ‘NVStore::NVStore()’ is deprecated: NVStore is deprecated in favor of KVStore [since mbed-os-5.15] [-Wdeprecated-declarations]
Compile [ 76.6%]: mbed_lp_ticker_api.c
Compile [ 76.7%]: TDBStore.cpp
Compile [ 76.8%]: mbed_lp_ticker_wrapper.cpp
Compile [ 76.9%]: mbed_pinmap_common.c
Compile [ 77.0%]: mbed_pinmap_default.c
Compile [ 77.1%]: mbed_us_ticker_api.c
Compile [ 77.2%]: mbed_ticker_api.c
Compile [ 77.3%]: mbed_mpu_v7m.c
Compile [ 77.5%]: mbed_mpu_v8m.c
Compile [ 77.6%]: mbed_usb_phy.cpp
Compile [ 77.7%]: CriticalSectionLock.cpp
Compile [ 77.8%]: static_pinmap.cpp
Compile [ 77.9%]: CallChain.cpp
Compile [ 78.0%]: CThunkBase.cpp
Compile [ 78.1%]: ATCmdParser.cpp
Compile [ 78.2%]: FileHandle.cpp
Compile [ 78.3%]: FileSystemHandle.cpp
Compile [ 78.4%]: DeepSleepLock.cpp
Compile [ 78.5%]: LocalFileSystem.cpp
Compile [ 78.6%]: except.S
Compile [ 78.8%]: FileBase.cpp
Compile [ 78.9%]: mstd_mutex.cpp
Compile [ 79.0%]: FilePath.cpp
Compile [ 79.1%]: mbed_assert.c
Compile [ 79.2%]: mbed_application.c
Compile [ 79.3%]: mbed_fault_handler.c
Compile [ 79.4%]: mbed_atomic_impl.c
Compile [ 79.5%]: mbed_critical.c
Compile [ 79.6%]: Stream.cpp
Compile [ 79.7%]: mbed_board.c
Compile [ 79.8%]: SysTimer.cpp
Compile [ 80.0%]: mbed_mktime.c
Compile [ 80.1%]: mbed_error_hist.c
Compile [ 80.2%]: mbed_interface.c
Compile [ 80.3%]: mbed_error.c
Compile [ 80.4%]: mbed_alloc_wrappers.cpp
Compile [ 80.5%]: mbed_mpu_mgmt.c
Compile [ 80.6%]: mbed_sdk_boot.c
Compile [ 80.7%]: mbed_power_mgmt.c
Compile [ 80.8%]: mbed_poll.cpp
Compile [ 80.9%]: mbed_semihost_api.c
Compile [ 81.0%]: mbed_mem_trace.cpp
Compile [ 81.2%]: mbed_printf_armlink_overrides.c
Compile [ 81.3%]: mbed_stats.c
Compile [ 81.4%]: mbed_wait_api_no_rtos.c
Compile [ 81.5%]: mbed_printf_wrapper.c
Compile [ 81.6%]: mbed_os_timer.cpp
Compile [ 81.7%]: mbed_printf_implementation.c
Compile [ 81.8%]: mbed_rtc_time.cpp
Compile [ 81.9%]: ConditionVariable.cpp
Compile [ 82.0%]: Mutex.cpp
Compile [ 82.1%]: mbed_thread.cpp
Compile [ 82.2%]: RtosTimer.cpp
Compile [ 82.4%]: mbed_wait_api_rtos.cpp
Compile [ 82.5%]: mbed_retarget.cpp
Compile [ 82.6%]: mbed_boot_gcc_arm.c
Compile [ 82.7%]: mbed_boot.c
Compile [ 82.8%]: mbed_rtx_handlers.c
Compile [ 82.9%]: Semaphore.cpp
Compile [ 83.0%]: cmsis_os1.c
Compile [ 83.1%]: mbed_rtos_rtx.c
Compile [ 83.2%]: EventFlags.cpp
Compile [ 83.3%]: Kernel.cpp
Compile [ 83.4%]: irq_cm4f.S
Compile [ 83.6%]: RTX_Config.c
Compile [ 83.7%]: rtx_lib.c
Compile [ 83.8%]: rtx_evr.c
Compile [ 83.9%]: rtx_delay.c
Compile [ 84.0%]: mbed_rtx_idle.cpp
Compile [ 84.1%]: rtx_evflags.c
Compile [ 84.2%]: rtx_memory.c
Compile [ 84.3%]: rtx_kernel.c
[Warning] rtx_kernel.c@93,3: ‘memset’ offset [17, 164] from the object at ‘osRtxInfo’ is out of the bounds of referenced subobject ‘kernel’ with type 'struct ’ at offset 8 [-Warray-bounds]
Compile [ 84.4%]: rtx_mempool.c
Compile [ 84.5%]: rtx_msgqueue.c
Compile [ 84.6%]: rtx_mutex.c
Compile [ 84.7%]: os_systick.c
Compile [ 84.9%]: rtx_semaphore.c
Compile [ 85.0%]: rtx_system.c
Compile [ 85.1%]: startup_stm32l496xx.S
Compile [ 85.2%]: rtx_timer.c
Compile [ 85.3%]: os_tick_ptim.c
Compile [ 85.4%]: PeripheralPins.c
Compile [ 85.5%]: rtx_thread.c
Compile [ 85.6%]: system_clock.c
Compile [ 85.7%]: stm32l4xx_hal.c
Compile [ 85.8%]: Thread.cpp
Compile [ 85.9%]: analogout_device.c
Compile [ 86.1%]: stm32l4xx_hal_can.c
Compile [ 86.2%]: analogin_device.c
Compile [ 86.3%]: stm32l4xx_hal_adc_ex.c
Compile [ 86.4%]: stm32l4xx_hal_can_legacy.c
Compile [ 86.5%]: stm32l4xx_hal_adc.c
Compile [ 86.6%]: stm32l4xx_hal_comp.c
Compile [ 86.7%]: stm32l4xx_hal_crc_ex.c
Compile [ 86.8%]: stm32l4xx_hal_cortex.c
Compile [ 86.9%]: stm32l4xx_hal_crc.c
Compile [ 87.0%]: stm32l4xx_hal_cryp.c
Compile [ 87.1%]: stm32l4xx_hal_cryp_ex.c
Compile [ 87.3%]: ThisThread.cpp
Compile [ 87.4%]: stm32l4xx_hal_dac.c
Compile [ 87.5%]: stm32l4xx_hal_dac_ex.c
Compile [ 87.6%]: stm32l4xx_hal_dfsdm_ex.c
Compile [ 87.7%]: stm32l4xx_hal_dcmi.c
Compile [ 87.8%]: stm32l4xx_hal_dma.c
Compile [ 87.9%]: stm32l4xx_hal_dma_ex.c
Compile [ 88.0%]: stm32l4xx_hal_dfsdm.c
Compile [ 88.1%]: stm32l4xx_hal_dsi.c
Compile [ 88.2%]: stm32l4xx_hal_exti.c
Compile [ 88.3%]: stm32l4xx_hal_dma2d.c
Compile [ 88.5%]: stm32l4xx_hal_firewall.c
Compile [ 88.6%]: stm32l4xx_hal_flash.c
Compile [ 88.7%]: stm32l4xx_hal_flash_ramfunc.c
Compile [ 88.8%]: stm32l4xx_hal_gfxmmu.c
Compile [ 88.9%]: stm32l4xx_hal_flash_ex.c
Compile [ 89.0%]: stm32l4xx_hal_hash.c
Compile [ 89.1%]: stm32l4xx_hal_hash_ex.c
Compile [ 89.2%]: stm32l4xx_hal_gpio.c
Compile [ 89.3%]: stm32l4xx_hal_i2c_ex.c
Compile [ 89.4%]: stm32l4xx_hal_hcd.c
Compile [ 89.5%]: stm32l4xx_hal_iwdg.c
Compile [ 89.7%]: stm32l4xx_hal_ltdc.c
Compile [ 89.8%]: stm32l4xx_hal_lcd.c
Compile [ 89.9%]: stm32l4xx_hal_lptim.c
Compile [ 90.0%]: stm32l4xx_hal_ltdc_ex.c
Compile [ 90.1%]: stm32l4xx_hal_irda.c
Compile [ 90.2%]: stm32l4xx_hal_mmc_ex.c
Compile [ 90.3%]: stm32l4xx_hal_nor.c
Compile [ 90.4%]: stm32l4xx_hal_opamp_ex.c
Compile [ 90.5%]: stm32l4xx_hal_opamp.c
Compile [ 90.6%]: stm32l4xx_hal_ospi.c
Compile [ 90.7%]: stm32l4xx_hal_i2c.c
Compile [ 90.8%]: stm32l4xx_hal_nand.c
Compile [ 91.0%]: stm32l4xx_hal_mmc.c
Compile [ 91.1%]: stm32l4xx_hal_pcd.c
Compile [ 91.2%]: stm32l4xx_hal_pcd_ex.c
Compile [ 91.3%]: stm32l4xx_hal_pwr.c
Compile [ 91.4%]: stm32l4xx_hal_rng.c
Compile [ 91.5%]: stm32l4xx_hal_pwr_ex.c
Compile [ 91.6%]: stm32l4xx_hal_rcc.c
Compile [ 91.7%]: stm32l4xx_hal_qspi.c
Compile [ 91.8%]: stm32l4xx_hal_rcc_ex.c
Compile [ 91.9%]: stm32l4xx_hal_rtc.c
Compile [ 92.0%]: stm32l4xx_hal_sai_ex.c
Compile [ 92.2%]: stm32l4xx_hal_rtc_ex.c
Compile [ 92.3%]: stm32l4xx_hal_sd_ex.c
Compile [ 92.4%]: stm32l4xx_hal_sai.c
Compile [ 92.5%]: stm32l4xx_hal_smartcard_ex.c
Compile [ 92.6%]: stm32l4xx_hal_spi_ex.c
Compile [ 92.7%]: stm32l4xx_hal_sd.c
Compile [ 92.8%]: stm32l4xx_hal_smartcard.c
Compile [ 92.9%]: stm32l4xx_hal_sram.c
Compile [ 93.0%]: stm32l4xx_hal_smbus.c
Compile [ 93.1%]: stm32l4xx_hal_swpmi.c
Compile [ 93.2%]: stm32l4xx_hal_spi.c
Compile [ 93.4%]: stm32l4xx_hal_uart_ex.c
Compile [ 93.5%]: stm32l4xx_hal_tsc.c
Compile [ 93.6%]: stm32l4xx_hal_tim_ex.c
Compile [ 93.7%]: stm32l4xx_hal_usart_ex.c
Compile [ 93.8%]: stm32l4xx_hal_usart.c
Compile [ 93.9%]: stm32l4xx_hal_uart.c
Compile [ 94.0%]: stm32l4xx_hal_tim.c
Compile [ 94.1%]: stm32l4xx_hal_wwdg.c
Compile [ 94.2%]: stm32l4xx_ll_comp.c
Compile [ 94.3%]: stm32l4xx_ll_adc.c
Compile [ 94.4%]: stm32l4xx_ll_crc.c
Compile [ 94.6%]: stm32l4xx_ll_crs.c
Compile [ 94.7%]: stm32l4xx_ll_dac.c
Compile [ 94.8%]: stm32l4xx_ll_dma.c
Compile [ 94.9%]: stm32l4xx_ll_exti.c
Compile [ 95.0%]: stm32l4xx_ll_dma2d.c
Compile [ 95.1%]: stm32l4xx_ll_fmc.c
Compile [ 95.2%]: stm32l4xx_ll_gpio.c
Compile [ 95.3%]: stm32l4xx_ll_i2c.c
Compile [ 95.4%]: stm32l4xx_ll_lptim.c
Compile [ 95.5%]: stm32l4xx_ll_lpuart.c
Compile [ 95.6%]: stm32l4xx_ll_pwr.c
Compile [ 95.8%]: stm32l4xx_ll_opamp.c
Compile [ 95.9%]: stm32l4xx_ll_rng.c
Compile [ 96.0%]: stm32l4xx_ll_rtc.c
Compile [ 96.1%]: stm32l4xx_ll_rcc.c
Compile [ 96.2%]: stm32l4xx_ll_spi.c
Compile [ 96.3%]: stm32l4xx_ll_sdmmc.c
Compile [ 96.4%]: stm32l4xx_ll_swpmi.c
Compile [ 96.5%]: stm32l4xx_ll_usart.c
Compile [ 96.6%]: stm32l4xx_ll_tim.c
Compile [ 96.7%]: system_stm32l4xx.c
Compile [ 96.8%]: gpio_irq_device.c
Compile [ 96.9%]: stm32l4xx_ll_utils.c
Compile [ 97.1%]: stm32l4xx_ll_usb.c
Compile [ 97.2%]: flash_api.c
Compile [ 97.3%]: pwmout_device.c
Compile [ 97.4%]: analogin_api.c
Compile [ 97.5%]: spi_api.c
Compile [ 97.6%]: serial_device.c
[Warning] serial_device.c@678,41: comparison of integer expressions of different signedness: ‘PinName’ {aka 'const enum '} and 'enum ’ [-Wsign-compare]
[Warning] serial_device.c@678,41: comparison between ‘PinName’ {aka 'const enum '} and 'enum ’ [-Wenum-compare]
[Warning] serial_device.c@686,41: comparison of integer expressions of different signedness: ‘PinName’ {aka 'const enum '} and 'enum ’ [-Wsign-compare]
[Warning] serial_device.c@686,41: comparison between ‘PinName’ {aka 'const enum '} and 'enum ’ [-Wenum-compare]
[Warning] serial_device.c@695,41: comparison of integer expressions of different signedness: ‘PinName’ {aka 'const enum '} and 'enum ’ [-Wsign-compare]
[Warning] serial_device.c@695,41: comparison between ‘PinName’ {aka 'const enum '} and 'enum ’ [-Wenum-compare]
[Warning] serial_device.c@696,41: comparison of integer expressions of different signedness: ‘PinName’ {aka 'const enum '} and 'enum ’ [-Wsign-compare]
[Warning] serial_device.c@696,41: comparison between ‘PinName’ {aka 'const enum '} and 'enum ’ [-Wenum-compare]
Compile [ 97.7%]: analogout_api.c
Compile [ 97.8%]: gpio_api.c
Compile [ 97.9%]: gpio_irq_api.c
Compile [ 98.0%]: hal_tick_overrides.c
Compile [ 98.1%]: can_api.c
Compile [ 98.3%]: mbed_crc_api.c
Compile [ 98.4%]: mbed_overrides.c
Compile [ 98.5%]: lp_ticker.c
Compile [ 98.6%]: qspi_api.c
Compile [ 98.7%]: i2c_api.c
[Warning] i2c_api.c@518,19: unused variable ‘obj_s’ [-Wunused-variable]
Compile [ 98.8%]: pinmap.c
Compile [ 98.9%]: port_api.c
Compile [ 99.0%]: pwmout_api.c
Compile [ 99.1%]: reset_reason.c
Compile [ 99.2%]: USBPhy_STM32.cpp
Compile [ 99.3%]: rtc_api.c
Compile [ 99.5%]: sleep.c
Compile [ 99.6%]: serial_api.c
Compile [ 99.7%]: us_ticker.c
Compile [ 99.8%]: trng_api.c
Compile [ 99.9%]: stm_spi_api.c
Compile [100.0%]: watchdog_api.c
Link: mbed-os-example-blinky-master
Elf2Bin: mbed-os-example-blinky-master

Module .text .data .bss
[fill] 130(+130) 8(+8) 23(+23)
[lib]\c.a 28244(+28244) 2472(+2472) 89(+89)
[lib]\gcc.a 3104(+3104) 0(+0) 0(+0)
[lib]\misc 180(+180) 4(+4) 28(+28)
main.o 48(+48) 0(+0) 0(+0)
mbed-os\drivers 174(+174) 0(+0) 0(+0)
mbed-os\hal 1690(+1690) 8(+8) 130(+130)
mbed-os\platform 4242(+4242) 260(+260) 280(+280)
mbed-os\rtos 6854(+6854) 168(+168) 6228(+6228)
mbed-os\targets 11246(+11246) 8(+8) 1006(+1006)
Subtotals 55912(+55912) 2928(+2928) 7784(+7784)

Total Static RAM memory (data + bss): 10712(+10712) bytes
Total Flash memory (text + data): 58840(+58840) bytes

Image: .\BUILD\NUCLEO_L496ZG\GCC_ARM\mbed-os-example-blinky-master.bin
1 file(s) copied.

Hi,
Your compilation is good. Can you please try to flash the board with STM32CubeProgrammer. This could be a way to check the nucleo board is functioning. You can download the STM32CubeProgrammer in this link https://www.st.com/en/development-tools/stm32cubeprog.html
You can select the latest version and get the software. For the software link you have to register first and it is free. A link will be sent to the registered mail address. After downloading and installing the software, open the software you will have a window like this

Connect your board to PC and click refresh you should see the serial number.

Click connect add you should see the registers read.

If the above is working good then your board is in good condition.

you can verify it and I can help you out with the flash

Hi,

You can download the .bin file from this link https://we.tl/t-0H59Xy92Bg. The example for LED1 blink, It uses mbedOS2. You can flash this as your first program.

To flash follow the above steps on the cubeProgrammer


Select the Erasing and Programming option, include the path of the .bin file and click “Start Program…”

The LED1 should blink on you board.

Hi, thanks for your reply. I will do these and let you know. I have already tried this LED example but I was getting the The application file format is unknown and cannot be parsed and/or processed error as it is based on Mbed OS 2. This was my first question as you can see above

Yes I acknowledge that,
Can I have this detail, what do you get when you connect the board to PC. Do you get similar files

!!!

yeah, both these files are there.

Hi, I have downloaded the STM32CubeProgrammer and tried to connect the board as instructed. I am getting an error message as shown in the attached screenshot.

. I think the board is damaged but it is strange because I recently purchased it.

Hi,
just try to upgrade ST-Link’s firmware.
For erase, flash or read memory you can also use STM32 ST-Link Utility.

BTW I bought Discovery F746 from Mouser.com at 2018. In 2019 the Mouser contacted me about the ST had a quality issue and my board need to be checked. I checked it and me my board was really affected by this issue (bad soldering on conectors for external power supply). Mouser changed my Disco board.
So if you are sure about you do it good, then do not waste time and contact your seller.

BR, Jan

Thanks for your reply. Actually I already tried the firmware update and its not making a difference.

Hi,
No worries, I had this error after flashing this example https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-blinky/. I was not able to connect to my board after flashing this example, until I did this steps to recover.

In STM32CubeProgrammer. Select reset mode as “Hardware reset”

Click “connect”, You should be able to connect to your board.

Then In “Erasing and Programming” include the .bin path that you can download from here https://we.tl/t-0H59Xy92Bg. “Start Program”. You should see your LED1 blinking.

Then click “disconnect”.
Put back the reset mode to “Software Reset” and click connect and you should be able to connect to the board.

Best advice not to flash the board with the example again and you can start your work with board normally,

Hi thanks for your reply. But I think my board is not even connecting. See the error log below:

11:13:16 : ST-LINK error (DEV_USB_COMM_ERR)

11:13:16 : ST-LINK error (DEV_CONNECT_ERR)

11:13:32 : ST-LINK error (DEV_USB_COMM_ERR)

11:13:54 : ST-LINK error (DEV_CONNECT_ERR)

11:14:14 : ST-LINK error (DEV_USB_COMM_ERR)

11:14:14 : ST-LINK error (DEV_CONNECT_ERR)

11:16:06 : ST-LINK error (DEV_CONNECT_ERR)

Hi,

You can try this luck,

  1. change the usb cable.
  2. Select “Frimware upgrade” option in STM32CubeProgrammer.
  3. select “open in update mode” and click “Upgrade”.
  4. disconnect the usb and close the STM32CubeProgrammer.
  5. connect the usb and check if the device is detected.

If you still face some issue, I will be happy to help you further.

1 Like

Hi, this firmware upgrade has just worked and board is connecting. Thank you.

1 Like