ARMmbed/mbed-os-example-lorawan

hard fault on stm32 L152RE, many Werrors while compiling

Closed this issue · 2 comments

the sample code gives the following errors:
Warning: Format specifies type 'unsigned long' but the argument has type 'std::uint32_t' (aka 'unsigned int') [-Wformat] in "extras/mbed-os.lib/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp", Line: 604, Col: 48 Warning: Format specifies type 'unsigned long' but the argument has type 'std::uint32_t' (aka 'unsigned int') [-Wformat] in "extras/mbed-os.lib/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp", Line: 737, Col: 63 Warning: Format specifies type 'long *' but the argument has type 'std::int32_t *' (aka 'int *') [-Wformat] in "extras/mbed-os.lib/components/wifi/esp8266-driver/ESP8266/ESP8266.cpp", Line: 1055, Col: 31 Warning: Shifting a negative signed value is undefined [-Wshift-negative-value] in "extras/mbed-os.lib/components/wifi/esp8266-driver/ESP8266Interface.cpp", Line: 380, Col: 20 Warning: Shifting a negative signed value is undefined [-Wshift-negative-value] in "extras/mbed-os.lib/components/wifi/esp8266-driver/ESP8266Interface.cpp", Line: 386, Col: 20 Warning: Format specifies type 'long' but the argument has type 'std::int32_t' (aka 'int') [-Wformat] in "extras/mbed-os.lib/features/cellular/framework/AT/ATHandler.cpp", Line: 1151, Col: 52 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'LWIP' [-Wc++11-extensions] in "extras/mbed-os.lib/features/lwipstack/LWIPStack.h", Line: 129, Col: 16 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'LWIP' [-Wc++11-extensions] in "extras/mbed-os.lib/features/lwipstack/LWIPStack.h", Line: 129, Col: 16 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'LWIP' [-Wc++11-extensions] in "extras/mbed-os.lib/features/lwipstack/LWIPStack.h", Line: 129, Col: 16 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'LWIP' [-Wc++11-extensions] in "extras/mbed-os.lib/features/lwipstack/LWIPStack.h", Line: 129, Col: 16 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'LWIP' [-Wc++11-extensions] in "extras/mbed-os.lib/features/lwipstack/LWIPStack.h", Line: 129, Col: 16 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'LWIP' [-Wc++11-extensions] in "extras/mbed-os.lib/features/lwipstack/LWIPStack.h", Line: 129, Col: 16 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'Nanostack' [-Wc++11-extensions] in "extras/mbed-os.lib/features/nanostack/mbed-mesh-api/source/LoWPANNDInterface.cpp", Line: 36, Col: 12 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'Nanostack' [-Wc++11-extensions] in "extras/mbed-os.lib/features/nanostack/mbed-mesh-api/mbed-mesh-api/NanostackEthernetInterface.h", Line: 33, Col: 12 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'Nanostack' [-Wc++11-extensions] in "extras/mbed-os.lib/features/nanostack/mbed-mesh-api/mbed-mesh-api/NanostackEthernetInterface.h", Line: 33, Col: 12 Warning: Format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] in "extras/mbed-os.lib/features/nanostack/mbed-mesh-api/source/nd_tasklet.c", Line: 106, Col: 30 Warning: Format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] in "extras/mbed-os.lib/features/nanostack/mbed-mesh-api/source/nd_tasklet.c", Line: 108, Col: 39 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'Nanostack' [-Wc++11-extensions] in "extras/mbed-os.lib/features/nanostack/mbed-mesh-api/source/ThreadInterface.cpp", Line: 33, Col: 12 Warning: Format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] in "extras/mbed-os.lib/features/nanostack/mbed-mesh-api/source/thread_tasklet.c", Line: 322, Col: 43 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'Nanostack' [-Wc++11-extensions] in "extras/mbed-os.lib/features/nanostack/mbed-mesh-api/source/WisunInterface.cpp", Line: 36, Col: 12 Warning: Array argument is too small; contains 8 elements, callee requires at least 16 [-Warray-bounds] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Thread/thread_bbr_api.c", Line: 572, Col: 5 Warning: Implicit conversion from 'long long' to 'uint32_t' (aka 'unsigned int') changes value from 68719476735 to 4294967295 [-Wconstant-conversion] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Thread/thread_bootstrap.c", Line: 2543, Col: 122 Warning: Null passed to a callee that requires a non-null argument [-Wnonnull] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Thread/thread_bootstrap.c", Line: 2850, Col: 21 Warning: Use of logical '||' with constant operand [-Wconstant-logical-operand] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/6LoWPAN/Thread/thread_joiner_application.c", Line: 515, Col: 87 Warning: Null passed to a callee that requires a non-null argument [-Wnonnull] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/6LoWPAN/ws/ws_bootstrap.c", Line: 1761, Col: 5 Warning: Null passed to a callee that requires a non-null argument [-Wnonnull] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/6LoWPAN/ws/ws_bootstrap.c", Line: 1788, Col: 13 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Security/TLS/tls_lib.c", Line: 1164, Col: 39 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Security/TLS/tls_lib.c", Line: 1480, Col: 39 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_socket.h", Line: 32, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_stack.h", Line: 33, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/fnet.h", Line: 34, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/services/poll/fnet_poll.c", Line: 26, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_socket.h", Line: 32, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_stack.h", Line: 33, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/fnet.h", Line: 34, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_stdlib.c", Line: 31, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_socket.h", Line: 32, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_stack.h", Line: 33, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/fnet.h", Line: 34, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/ns_fnet_events.c", Line: 24, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_socket.h", Line: 32, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_stack.h", Line: 33, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/fnet.h", Line: 34, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/ns_mdns_api.c", Line: 18, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_socket.h", Line: 32, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_stack.h", Line: 33, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/fnet.h", Line: 34, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/services/mdns/fnet_mdns.c", Line: 25, Col: 10 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/services/mdns/fnet_mdns.c", Line: 1617, Col: 36 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_socket.h", Line: 32, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/stack/fnet_stack.h", Line: 33, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/fnet/fnet_stack/fnet.h", Line: 34, Col: 10 Warning: The current #pragma pack aligment value is modified in the included file [-Wpragma-pack] in "extras/mbed-os.lib/features/nanostack/sal-stack-nanostack/source/Service_Libs/mdns/ns_fnet_port.c", Line: 22, Col: 10 Warning: 'CellularBase' is deprecated: Migrated to CellularInterface [since mbed-os-5.12] [-Wdeprecated-declarations] in "extras/mbed-os.lib/features/netsocket/NetworkInterfaceDefaults.cpp", Line: 43, Col: 37 Warning: 'CellularBase' is deprecated: Migrated to CellularInterface [since mbed-os-5.12] [-Wdeprecated-declarations] in "extras/mbed-os.lib/features/netsocket/NetworkInterfaceDefaults.cpp", Line: 43, Col: 11 Warning: 'CellularBase' is deprecated: Migrated to CellularInterface [since mbed-os-5.12] [-Wdeprecated-declarations] in "extras/mbed-os.lib/features/netsocket/NetworkInterfaceDefaults.cpp", Line: 90, Col: 18 Warning: Unelaborated friend declaration is a C++11 extension; specify 'class' to befriend 'LWIP' [-Wc++11-extensions] in "extras/mbed-os.lib/features/lwipstack/LWIPStack.h", Line: 129, Col: 16 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/features/nfc/stack/transceiver/pn512/pn512_rf.c", Line: 110, Col: 26 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/features/nfc/stack/transceiver/pn512/pn512_poll.c", Line: 540, Col: 61 Warning: Redefinition of typedef 'ticker_irq_handler_type' is a C11 feature [-Wtypedef-redefinition] in "extras/mbed-os.lib/hal/mbed_lp_ticker_wrapper.h", Line: 34, Col: 16 Warning: Redefinition of typedef 'ticker_irq_handler_type' is a C11 feature [-Wtypedef-redefinition] in "extras/mbed-os.lib/hal/lp_ticker_api.h", Line: 65, Col: 16 Warning: Shifting a negative signed value is undefined [-Wshift-negative-value] in "extras/mbed-os.lib/platform/mbed_wait_api_rtos.cpp", Line: 56, Col: 20 Warning: Shifting a negative signed value is undefined [-Wshift-negative-value] in "extras/mbed-os.lib/platform/mbed_wait_api_rtos.cpp", Line: 70, Col: 22 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_adc.c", Line: 1739, Col: 31 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_adc_ex.c", Line: 848, Col: 43 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_rtc_ex.c", Line: 1090, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_rtc_ex.c", Line: 1153, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 396, Col: 19 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 400, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 770, Col: 19 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 774, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 1249, Col: 19 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 1253, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 1724, Col: 19 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 1728, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 2515, Col: 19 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 2519, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 3243, Col: 19 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 3247, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 3451, Col: 19 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_tim.c", Line: 3455, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_usart.c", Line: 1876, Col: 24 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_uart.c", Line: 1907, Col: 25 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_uart.c", Line: 1919, Col: 25 Warning: Format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Wformat] in "extras/mbed-os.lib/targets/TARGET_STM/gpio_irq_api.c", Line: 128, Col: 59 Warning: Implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned int)' [-Wimplicit-function-declaration] in "extras/mbed-os.lib/targets/TARGET_STM/i2c_api.c", Line: 266, Col: 5 Warning: Equality comparison with extraneous parentheses [-Wparentheses-equality] in "extras/mbed-os.lib/usb/device/USBDevice/USBDevice.cpp", Line: 618, Col: 45 Warning: L3912W: Option 'legacyalign' is deprecated. Error: L6636E: Pre-processor step failed for '/extras/mbed-os.lib/targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/device/TOOLCHAIN_ARM_STD/stm32l152re.sct' Info: Unable to download. Fix the reported errors...

if i run the same on my stm 32, the following error is reported:
`
++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R0 : 20014000
R1 : 00000001
R2 : 00000000
R3 : 20014000
R4 : 20002DF8
R5 : 20002E80
R6 : 00000000
R7 : 200005A4
R8 : 20000C48
R9 : 20003C20
R10 : 00000000
R11 : 00000000
R12 : 00000000
SP : 20001FD8
LR : 08006773
PC : 0800E90E
xPSR : 21000000
PSP : 20001FB8
MSP : 20013FC0
CPUID: 412FC230
HFSR : 40000000
MMFSR: 00000082
BFSR : 00000000
UFSR : 00000000
DFSR : 00000008
AFSR : 00000000
MMFAR: 00000000
Mode : Thread
Priv : Privileged
Stack: PSP

-- MbedOS Fault Handler --

++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x800F869
Error Value: 0x800E90E
Current Thread: main Id: 0x20002824 Entry: 0x800FB3D StackSize: 0x1000 StackMem: 0x200010B8 SP: 0x20013F3C
For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=NUCLEO_L152RE
-- MbedOS Error Info --
`

ARM Internal Ref: IOTCELL-2031

“At this time, due to our prioritisation of work on customer projects, we are unable to devote the time to fix this issue. As an open source project, we welcome fixes to Mbed OS, so if would like to contribute a fix yourself then we would very much welcome that, please see our contribution guidelines here - https://os.mbed.com/docs/mbed-os/v5.14/contributing/workflow.html#contributions”