AnsweredAssumed Answered

internal compiler error: Segmentation fault

Question asked by Christie Su on May 7, 2018
Latest reply on Jun 20, 2018 by Alice_Yang

Hi,

 

I am using KDS3.2 and KSDK 2.0 for K66F. The project works fine when I do not do optimization.

When I do -O3 optimization, I got " internal compiler error: Segmentation fault"(See below) when do linker...

Looks like there is the problem for optimization.

 

Can I anyone tell me how to fix the problem when I am using -O3 optimization?

 

Thanks,

 

Christie

 

 

 

 

09:39:04 **** Incremental Build of configuration Release for project iNetVu7710_V50_FW ****

make -j8 all

Building file: ../middleware/lwip_2.0.0/src/netif/ethernet.c

Invoking: Cross ARM C Compiler

.......

-I../source/opentcp_inetvu/hns_client_iNetVu -I../source/opentcp_inetvu/iDirect_telnet_com -std=c99 -MMD -MP -MF"middleware/lwip_2.0.0/src/netif/ethernet.d" -MT"middleware/lwip_2.0.0/src/netif/ethernet.o" -c -o "middleware/lwip_2.0.0/src/netif/ethernet.o" "../middleware/lwip_2.0.0/src/netif/ethernet.c"

Finished building: ../middleware/lwip_2.0.0/src/netif/ethernet.c

 

Building target: iNetVu7710_V50_FW.elf

Invoking: Cross ARM C++ Linker

arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O3 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -flto -g -T "../MK66FN2M0xxx18_flash.ld" -Xlinker --gc-sections -Wl,-Map,"iNetVu7710_V50_FW.map" --specs=nano.specs -specs=nosys.specs -Xlinker -z -Xlinker muldefs -o "iNetVu7710_V50_FW.elf" ./utilities/fsl_debug_console.o ./utilities/fsl_notifier.o ./utilities/fsl_sbrk.o ./utilities/fsl_shell.o ./startup/startup_MK66F18.o ./startup/system_MK66F18.o ./source/opentcp_inetvu/iDirect_telnet_com/iDirect_telnet_com.o ./source/opentcp_inetvu/http_server_iNetVu/http_srv_iNetVu.o ./source/opentcp_inetvu/hns_client_iNetVu/hns_client_iNetVu_modem.o ./source/dev_iNetVu/flash_utility/CFM_flash_inetvu.o ./source/dev_iNetVu/flash_utility/amd_flash_inetvu.o ./source/dev_iNetVu/USB_iNetVu/USB_inetvu.o ./source/dev_iNetVu/UART_iNetVu/UART_inetvu.o ./source/dev_iNetVu/PIT_iNetVu/timers_inetvu.o ./source/dev_iNetVu/LCD_iNetVu/LCD_inetvu.o ./source/dev_iNetVu/IIC_iNetVu/LLA_STiD135_v1.3.5_06082017/util/stfe_utilities.o ./source/dev_iNetVu/IIC_iNetVu/LLA_STiD135_v1.3.5_06082017/stid135_drv/stid135_drv.o ./source/dev_iNetVu/IIC_iNetVu/LLA_STiD135_v1.3.5_06082017/stid135_drv/stid135_init.o ./source/dev_iNetVu/IIC_iNetVu/LLA_STiD135_v1.3.5_06082017/lnb/lnb_drv.o ./source/dev_iNetVu/IIC_iNetVu/LLA_STiD135_v1.3.5_06082017/lnb/lnbh26_init.o ./source/dev_iNetVu/IIC_iNetVu/LLA_STiD135_v1.3.5_06082017/chip/chip.o ./source/dev_iNetVu/IIC_iNetVu/LLA_STiD135_v1.3.5_06082017/anafe/oxford_anafe_func.o ./source/dev_iNetVu/IIC_iNetVu/IIC_inetvu.o ./source/dev_iNetVu/Flexcan_iNetVu/flexcan_inetvu.o ./source/common/driver_systick.o ./source/common/opentcp.o ./source/fsl_phy.o ./source/hid_generic.o ./source/usb_device_ch9.o ./source/usb_device_class.o ./source/usb_device_descriptor.o ./source/usb_device_hid.o ./middleware/usb_1.6.3/phy/usb_phy.o ./middleware/usb_1.6.3/osa/usb_osa_bm.o ./middleware/usb_1.6.3/device/usb_device_dci.o ./middleware/usb_1.6.3/device/usb_device_ehci.o ./middleware/usb_1.6.3/device/usb_device_khci.o ./middleware/lwip_2.0.0/src/netif/ppp/auth.o ./middleware/lwip_2.0.0/src/netif/ppp/ccp.o ./middleware/lwip_2.0.0/src/netif/ppp/chap-md5.o ./middleware/lwip_2.0.0/src/netif/ppp/chap-new.o ./middleware/lwip_2.0.0/src/netif/ppp/chap_ms.o ./middleware/lwip_2.0.0/src/netif/ppp/demand.o ./middleware/lwip_2.0.0/src/netif/ppp/eap.o ./middleware/lwip_2.0.0/src/netif/ppp/eui64.o ./middleware/lwip_2.0.0/src/netif/ppp/fsm.o ./middleware/lwip_2.0.0/src/netif/ppp/ipcp.o ./middleware/lwip_2.0.0/src/netif/ppp/ipv6cp.o ./middleware/lwip_2.0.0/src/netif/ppp/lcp.o ./middleware/lwip_2.0.0/src/netif/ppp/lwip_ecp.o ./middleware/lwip_2.0.0/src/netif/ppp/magic.o ./middleware/lwip_2.0.0/src/netif/ppp/mppe.o ./middleware/lwip_2.0.0/src/netif/ppp/multilink.o ./middleware/lwip_2.0.0/src/netif/ppp/ppp.o ./middleware/lwip_2.0.0/src/netif/ppp/pppapi.o ./middleware/lwip_2.0.0/src/netif/ppp/pppcrypt.o ./middleware/lwip_2.0.0/src/netif/ppp/pppoe.o ./middleware/lwip_2.0.0/src/netif/ppp/pppol2tp.o ./middleware/lwip_2.0.0/src/netif/ppp/pppos.o ./middleware/lwip_2.0.0/src/netif/ppp/upap.o ./middleware/lwip_2.0.0/src/netif/ppp/utils.o ./middleware/lwip_2.0.0/src/netif/ppp/vj.o ./middleware/lwip_2.0.0/src/netif/ethernet.o ./middleware/lwip_2.0.0/src/netif/ethernetif.o ./middleware/lwip_2.0.0/src/netif/lowpan6.o ./middleware/lwip_2.0.0/src/netif/slipif.o ./middleware/lwip_2.0.0/src/core/ipv6/dhcp6.o ./middleware/lwip_2.0.0/src/core/ipv6/ethip6.o ./middleware/lwip_2.0.0/src/core/ipv6/icmp6.o ./middleware/lwip_2.0.0/src/core/ipv6/inet6.o ./middleware/lwip_2.0.0/src/core/ipv6/ip6.o ./middleware/lwip_2.0.0/src/core/ipv6/ip6_addr.o ./middleware/lwip_2.0.0/src/core/ipv6/ip6_frag.o ./middleware/lwip_2.0.0/src/core/ipv6/mld6.o ./middleware/lwip_2.0.0/src/core/ipv6/nd6.o ./middleware/lwip_2.0.0/src/core/ipv4/autoip.o ./middleware/lwip_2.0.0/src/core/ipv4/dhcp.o ./middleware/lwip_2.0.0/src/core/ipv4/etharp.o ./middleware/lwip_2.0.0/src/core/ipv4/icmp.o ./middleware/lwip_2.0.0/src/core/ipv4/igmp.o ./middleware/lwip_2.0.0/src/core/ipv4/ip4.o ./middleware/lwip_2.0.0/src/core/ipv4/ip4_addr.o ./middleware/lwip_2.0.0/src/core/ipv4/ip4_frag.o ./middleware/lwip_2.0.0/src/core/def.o ./middleware/lwip_2.0.0/src/core/dns.o ./middleware/lwip_2.0.0/src/core/inet_chksum.o ./middleware/lwip_2.0.0/src/core/init.o ./middleware/lwip_2.0.0/src/core/ip.o ./middleware/lwip_2.0.0/src/core/mem.o ./middleware/lwip_2.0.0/src/core/memp.o ./middleware/lwip_2.0.0/src/core/netif.o ./middleware/lwip_2.0.0/src/core/pbuf.o ./middleware/lwip_2.0.0/src/core/raw.o ./middleware/lwip_2.0.0/src/core/stats.o ./middleware/lwip_2.0.0/src/core/sys.o ./middleware/lwip_2.0.0/src/core/tcp.o ./middleware/lwip_2.0.0/src/core/tcp_in.o ./middleware/lwip_2.0.0/src/core/tcp_out.o ./middleware/lwip_2.0.0/src/core/timeouts.o ./middleware/lwip_2.0.0/src/core/udp.o ./middleware/lwip_2.0.0/src/apps/sntp/sntp.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_asn1.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_core.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_mib2.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_mib2_icmp.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_mib2_interfaces.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_mib2_ip.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_mib2_snmp.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_mib2_system.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_mib2_tcp.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_mib2_udp.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_msg.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_netconn.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_pbuf_stream.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_raw.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_scalar.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_table.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_threadsync.o ./middleware/lwip_2.0.0/src/apps/snmp/snmp_traps.o ./middleware/lwip_2.0.0/src/apps/snmp/snmpv3.o ./middleware/lwip_2.0.0/src/apps/snmp/snmpv3_dummy.o ./middleware/lwip_2.0.0/src/apps/snmp/snmpv3_mbedtls.o ./middleware/lwip_2.0.0/src/apps/netbiosns/netbiosns.o ./middleware/lwip_2.0.0/src/apps/lwiperf/lwiperf.o ./middleware/lwip_2.0.0/src/apps/httpd/fs.o ./middleware/lwip_2.0.0/src/apps/httpd/fsdata.o ./middleware/lwip_2.0.0/src/apps/httpd/httpd.o ./middleware/lwip_2.0.0/src/api/api_lib.o ./middleware/lwip_2.0.0/src/api/api_msg.o ./middleware/lwip_2.0.0/src/api/err.o ./middleware/lwip_2.0.0/src/api/netbuf.o ./middleware/lwip_2.0.0/src/api/netdb.o ./middleware/lwip_2.0.0/src/api/netifapi.o ./middleware/lwip_2.0.0/src/api/sockets.o ./middleware/lwip_2.0.0/src/api/tcpip.o ./middleware/lwip_2.0.0/port/ethernetif.o ./middleware/lwip_2.0.0/port/sys_arch.o ./middleware/lwip_2.0.0/contrib/apps/udpecho_raw/udp_client_iNetVu_track.o ./middleware/lwip_2.0.0/contrib/apps/udpecho_raw/udp_server_iNetVu_app.o ./middleware/lwip_2.0.0/contrib/apps/udpecho_raw/udpecho_client_raw.o ./middleware/lwip_2.0.0/contrib/apps/udpecho_raw/udpecho_raw.o ./middleware/lwip_2.0.0/contrib/apps/udpecho/udpecho.o ./middleware/lwip_2.0.0/contrib/apps/tcpecho_raw/tcp_client_HNS.o ./middleware/lwip_2.0.0/contrib/apps/tcpecho_raw/tcpecho_client_raw.o ./middleware/lwip_2.0.0/contrib/apps/tcpecho_raw/tcpecho_raw.o ./middleware/lwip_2.0.0/contrib/apps/tcpecho/tcpecho.o ./middleware/lwip_2.0.0/contrib/apps/socket_examples/socket_examples.o ./middleware/lwip_2.0.0/contrib/apps/snmp_private_mib/lwip_prvmib.o ./middleware/lwip_2.0.0/contrib/apps/smtp/smtp.o ./middleware/lwip_2.0.0/contrib/apps/shell/shell.o ./middleware/lwip_2.0.0/contrib/apps/rtp/rtp.o ./middleware/lwip_2.0.0/contrib/apps/ping/ping.o ./middleware/lwip_2.0.0/contrib/apps/netio/netio.o ./middleware/lwip_2.0.0/contrib/apps/httpserver/httpserver-netconn.o ./middleware/lwip_2.0.0/contrib/apps/chargen/chargen.o ./drivers/fsl_adc16.o ./drivers/fsl_clock.o ./drivers/fsl_cmp.o ./drivers/fsl_cmt.o ./drivers/fsl_common.o ./drivers/fsl_crc.o ./drivers/fsl_dac.o ./drivers/fsl_dmamux.o ./drivers/fsl_dspi.o ./drivers/fsl_dspi_edma.o ./drivers/fsl_edma.o ./drivers/fsl_enet.o ./drivers/fsl_ewm.o ./drivers/fsl_flash.o ./drivers/fsl_flexbus.o ./drivers/fsl_flexcan.o ./drivers/fsl_ftm.o ./drivers/fsl_gpio.o ./drivers/fsl_i2c.o ./drivers/fsl_i2c_edma.o ./drivers/fsl_llwu.o ./drivers/fsl_lmem_cache.o ./drivers/fsl_lptmr.o ./drivers/fsl_lpuart.o ./drivers/fsl_lpuart_edma.o ./drivers/fsl_mpu.o ./drivers/fsl_pdb.o ./drivers/fsl_pit.o ./drivers/fsl_pmc.o ./drivers/fsl_rcm.o ./drivers/fsl_rnga.o ./drivers/fsl_rtc.o ./drivers/fsl_sai.o ./drivers/fsl_sai_edma.o ./drivers/fsl_sdhc.o ./drivers/fsl_sdramc.o ./drivers/fsl_sim.o ./drivers/fsl_smc.o ./drivers/fsl_tpm.o ./drivers/fsl_tsi_v4.o ./drivers/fsl_uart.o ./drivers/fsl_uart_edma.o ./drivers/fsl_vref.o ./drivers/fsl_wdog.o ./board/board.o ./board/clock_config.o ./board/fsl_sdram.o ./board/pin_mux.o ./.metadata/.plugins/org.eclipse.cdt.make.core/specs.o

../middleware/lwip_2.0.0/src/netif/ethernet.c: In function 'ethernet_input':

../middleware/lwip_2.0.0/src/netif/ethernet.c:69:7: internal compiler error: Segmentation fault

err_t ethernet_input(struct pbuf *p, struct netif *netif)

^

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

lto-wrapper: arm-none-eabi-g++ returned 1 exit status

c:/fsl32/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

makefile:106: recipe for target 'iNetVu7710_V50_FW.elf' failed

make: *** [iNetVu7710_V50_FW.elf] Error 1

Outcomes