Requesting help to use auto generated makefile from command prompt

cancel
Showing results for 
Search instead for 
Did you mean: 

Requesting help to use auto generated makefile from command prompt

69 Views
eng-01
Contributor I

Hi,

We have a MCUXpressso IDE project which compiles and runs properly in windows. This project generates a makefile automatically and we are planning to use this for our docker based compilation. As a first step, we tried to run the makefile from windows command prompt. It works as expected until we see the following error.

 

$ make -r -j8 all
Building target: nanobox_2.axf
Invoking: sumanth MCU Linker
arm-none-eabi-gcc -nostdlib -Xlinker -Map="nanobox_2.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -Xlinker --cref -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -T debscript.ld -L "D:\prj_folder\gitfolder\cicd\cicd-testing\lnk" -o "nanobox_2.axf" ./xip/evkmimxrt1060_flexspi_nor_config.o ./xip/fsl_flexspi_nor_boot.o ./utilities/fsl_assert.o ./utilities/fsl_debug_console.o ./utilities/fsl_str.o ./usb/phy/usb_phy.o ./usb/host/class/usb_host_cdc.o ./usb/host/class/usb_host_cdc_ppp.o ./usb/host/class/usb_host_cdc_rndis.o ./usb/host/class/usb_host_hub.o ./usb/host/class/usb_host_hub_app.o ./usb/host/usb_host_devices.o ./usb/host/usb_host_ehci.o ./usb/host/usb_host_framework.o ./usb/host/usb_host_hci.o ./startup/startup_mimxrt1062.o ./source/semihost_hardfault.o ./sensors/PT100.o ./sensors/analog.o ./sensors/dataAcqManager.o ./sensors/lsm6ds3.o ./sensors/rogowski.o ./sensors/tamperSens.o ./queueManager/queueManager.o ./mshadow/main_shadow.o ./mflash/mimxrt1062/mflash_drv.o ./mflash/mimxrt1062/mflash_file.o ./mcush/mcush.o ./mbedtls/port/ksdk/aes_alt.o ./mbedtls/port/ksdk/des_alt.o ./mbedtls/port/ksdk/ecp_alt.o ./mbedtls/port/ksdk/ecp_alt_ksdk.o ./mbedtls/port/ksdk/ecp_curves_alt.o ./mbedtls/port/ksdk/ksdk_mbedtls.o ./mbedtls/library/aes.o ./mbedtls/library/aesni.o ./mbedtls/library/arc4.o ./mbedtls/library/aria.o ./mbedtls/library/asn1parse.o ./mbedtls/library/asn1write.o ./mbedtls/library/base64.o ./mbedtls/library/bignum.o ./mbedtls/library/blowfish.o ./mbedtls/library/camellia.o ./mbedtls/library/ccm.o ./mbedtls/library/certs.o ./mbedtls/library/chacha20.o ./mbedtls/library/chachapoly.o ./mbedtls/library/cipher.o ./mbedtls/library/cipher_wrap.o ./mbedtls/library/cmac.o ./mbedtls/library/ctr_drbg.o ./mbedtls/library/debug.o ./mbedtls/library/des.o ./mbedtls/library/dhm.o ./mbedtls/library/ecdh.o ./mbedtls/library/ecdsa.o ./mbedtls/library/ecjpake.o ./mbedtls/library/ecp.o ./mbedtls/library/ecp_curves.o ./mbedtls/library/entropy.o ./mbedtls/library/entropy_poll.o ./mbedtls/library/error.o ./mbedtls/library/gcm.o ./mbedtls/library/havege.o ./mbedtls/library/hkdf.o ./mbedtls/library/hmac_drbg.o ./mbedtls/library/md.o ./mbedtls/library/md2.o ./mbedtls/library/md4.o ./mbedtls/library/md5.o ./mbedtls/library/md_wrap.o ./mbedtls/library/memory_buffer_alloc.o ./mbedtls/library/net_sockets.o ./mbedtls/library/nist_kw.o ./mbedtls/library/oid.o ./mbedtls/library/padlock.o ./mbedtls/library/pem.o ./mbedtls/library/pk.o ./mbedtls/library/pk_wrap.o ./mbedtls/library/pkcs11.o ./mbedtls/library/pkcs12.o ./mbedtls/library/pkcs5.o ./mbedtls/library/pkparse.o ./mbedtls/library/pkwrite.o ./mbedtls/library/platform.o ./mbedtls/library/platform_util.o ./mbedtls/library/poly1305.o ./mbedtls/library/ripemd160.o ./mbedtls/library/rsa.o ./mbedtls/library/rsa_internal.o ./mbedtls/library/sha1.o ./mbedtls/library/sha256.o ./mbedtls/library/sha512.o ./mbedtls/library/ssl_cache.o ./mbedtls/library/ssl_ciphersuites.o ./mbedtls/library/ssl_cli.o ./mbedtls/library/ssl_cookie.o ./mbedtls/library/ssl_srv.o ./mbedtls/library/ssl_ticket.o ./mbedtls/library/ssl_tls.o ./mbedtls/library/threading.o ./mbedtls/library/timing.o ./mbedtls/library/version.o ./mbedtls/library/version_features.o ./mbedtls/library/x509.o ./mbedtls/library/x509_create.o ./mbedtls/library/x509_crl.o ./mbedtls/library/x509_crt.o ./mbedtls/library/x509_csr.o ./mbedtls/library/x509write_crt.o ./mbedtls/library/x509write_csr.o ./mbedtls/library/xtea.o ./main/main.o ./lwip/src/netif/PPP/polarssl/arc4.o ./lwip/src/netif/PPP/polarssl/des.o ./lwip/src/netif/PPP/polarssl/md4.o ./lwip/src/netif/PPP/polarssl/md5.o ./lwip/src/netif/PPP/polarssl/sha1.o ./lwip/src/netif/PPP/auth.o ./lwip/src/netif/PPP/ccp.o ./lwip/src/netif/PPP/chap-md5.o ./lwip/src/netif/PPP/chap-new.o ./lwip/src/netif/PPP/chap_ms.o ./lwip/src/netif/PPP/demand.o ./lwip/src/netif/PPP/eap.o ./lwip/src/netif/PPP/eui64.o ./lwip/src/netif/PPP/fsm.o ./lwip/src/netif/PPP/ipcp.o ./lwip/src/netif/PPP/ipv6cp.o ./lwip/src/netif/PPP/lcp.o ./lwip/src/netif/PPP/lwip_ecp.o ./lwip/src/netif/PPP/magic.o ./lwip/src/netif/PPP/mppe.o ./lwip/src/netif/PPP/multilink.o ./lwip/src/netif/PPP/ppp.o ./lwip/src/netif/PPP/pppapi.o ./lwip/src/netif/PPP/pppcrypt.o ./lwip/src/netif/PPP/pppoe.o ./lwip/src/netif/PPP/pppol2tp.o ./lwip/src/netif/PPP/pppos.o ./lwip/src/netif/PPP/upap.o ./lwip/src/netif/PPP/utils.o ./lwip/src/netif/PPP/vj.o ./lwip/src/netif/bridgeif.o ./lwip/src/netif/bridgeif_fdb.o ./lwip/src/netif/ethernet.o ./lwip/src/netif/lowpan6.o ./lwip/src/netif/lowpan6_ble.o ./lwip/src/netif/lowpan6_common.o ./lwip/src/netif/slipif.o ./lwip/src/netif/zepif.o ./lwip/src/core/ipv6/dhcp6.o ./lwip/src/core/ipv6/ethip6.o ./lwip/src/core/ipv6/icmp6.o ./lwip/src/core/ipv6/inet6.o ./lwip/src/core/ipv6/ip6.o ./lwip/src/core/ipv6/ip6_addr.o ./lwip/src/core/ipv6/ip6_frag.o ./lwip/src/core/ipv6/mld6.o ./lwip/src/core/ipv6/nd6.o ./lwip/src/core/ipv4/acd.o ./lwip/src/core/ipv4/autoip.o ./lwip/src/core/ipv4/dhcp.o ./lwip/src/core/ipv4/etharp.o ./lwip/src/core/ipv4/icmp.o ./lwip/src/core/ipv4/igmp.o ./lwip/src/core/ipv4/ip4.o ./lwip/src/core/ipv4/ip4_addr.o ./lwip/src/core/ipv4/ip4_frag.o ./lwip/src/core/altcp.o ./lwip/src/core/altcp_alloc.o ./lwip/src/core/altcp_tcp.o ./lwip/src/core/def.o ./lwip/src/core/dns.o ./lwip/src/core/inet_chksum.o ./lwip/src/core/init.o ./lwip/src/core/ip.o ./lwip/src/core/mem.o ./lwip/src/core/memp.o ./lwip/src/core/netif.o ./lwip/src/core/pbuf.o ./lwip/src/core/raw.o ./lwip/src/core/stats.o ./lwip/src/core/sys.o ./lwip/src/core/tcp.o ./lwip/src/core/tcp_in.o ./lwip/src/core/tcp_out.o ./lwip/src/core/timeouts.o ./lwip/src/core/udp.o ./lwip/src/api/api_lib.o ./lwip/src/api/api_msg.o ./lwip/src/api/err.o ./lwip/src/api/if_api.o ./lwip/src/api/netbuf.o ./lwip/src/api/netdb.o ./lwip/src/api/netifapi.o ./lwip/src/api/sockets.o ./lwip/src/api/tcpip.o ./lwip/port/sys_arch.o ./lwip/port/usb_ethernetif_freertos.o ./lwip/contrib/apps/ping/ping.o ./logger/logger.o ./freertos/vendors/nxp/secure_sockets/lwip/iot_secure_sockets.o ./freertos/vendors/nxp/pkcs11/common/iot_pkcs11_pal.o ./freertos/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_api.o ./freertos/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_operation.o ./freertos/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_parser.o ./freertos/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_static_memory.o ./freertos/libraries/c_sdk/aws/shadow/src/aws_iot_shadow_subscription.o ./freertos/libraries/c_sdk/aws/shadow/src/aws_shadow.o ./freertos/libraries/freertos_plus/standard/utils/src/iot_pki_utils.o ./freertos/libraries/freertos_plus/standard/utils/src/iot_system_init.o ./freertos/libraries/freertos_plus/standard/tls/src/iot_tls.o ./freertos/libraries/freertos_plus/standard/pkcs11/src/iot_pkcs11.o ./freertos/libraries/freertos_plus/standard/crypto/src/iot_crypto.o ./freertos/libraries/c_sdk/standard/serializer/src/json/iot_serializer_json_decoder.o ./freertos/libraries/c_sdk/standard/serializer/src/json/iot_serializer_json_encoder.o ./freertos/libraries/c_sdk/standard/serializer/src/iot_json_utils.o ./freertos/libraries/c_sdk/standard/serializer/src/iot_serializer_static_memory.o ./freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_agent.o ./freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_api.o ./freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_network.o ./freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_operation.o ./freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_serialize.o ./freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_static_memory.o ./freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_subscription.o ./freertos/libraries/c_sdk/standard/mqtt/src/iot_mqtt_validate.o ./freertos/libraries/c_sdk/standard/common/taskpool/iot_taskpool.o ./freertos/libraries/c_sdk/standard/common/taskpool/iot_taskpool_static_memory.o ./freertos/libraries/c_sdk/standard/common/logging/iot_logging.o ./freertos/libraries/c_sdk/standard/common/logging/iot_logging_task_dynamic_buffers.o ./freertos/libraries/c_sdk/standard/common/iot_device_metrics.o ./freertos/libraries/c_sdk/standard/common/iot_init.o ./freertos/libraries/c_sdk/standard/common/iot_static_memory_common.o ./freertos/libraries/abstractions/platform/freertos/iot_clock_freertos.o ./freertos/libraries/abstractions/platform/freertos/iot_metrics.o ./freertos/libraries/abstractions/platform/freertos/iot_network_freertos.o ./freertos/libraries/abstractions/platform/freertos/iot_threads_freertos.o ./freertos/libraries/abstractions/pkcs11/mbedtls/iot_pkcs11_mbedtls.o ./freertos/libraries/3rdparty/mbedtls/utils/mbedtls_utils.o ./freertos/libraries/3rdparty/jsmn/jsmn.o ./freertos/freertos_kernel/portable/MemMang/heap_3.o ./freertos/freertos_kernel/portable/MemMang/heap_4.o ./freertos/freertos_kernel/portable/GCC/ARM_CM4F/port.o ./freertos/freertos_kernel/croutine.o ./freertos/freertos_kernel/event_groups.o ./freertos/freertos_kernel/list.o ./freertos/freertos_kernel/queue.o ./freertos/freertos_kernel/stream_buffer.o ./freertos/freertos_kernel/tasks.o ./freertos/freertos_kernel/timers.o ./freertos/demos/shadow/aws_iot_demo_shadow.o ./freertos/demos/network_manager/aws_iot_demo_network.o ./freertos/demos/network_manager/aws_iot_network_manager.o ./freertos/demos/dev_mode_key_provisioning/src/aws_dev_mode_key_provisioning.o ./freertos/demos/demo_runner/aws_demo.o ./freertos/demos/demo_runner/iot_demo_freertos.o ./failure/failureRoutine.o ./drivers/fsl_adc.o ./drivers/fsl_cache.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_dcp.o ./drivers/fsl_flexspi.o ./drivers/fsl_gpio.o ./drivers/fsl_lpi2c.o ./drivers/fsl_lpspi.o ./drivers/fsl_lpuart.o ./drivers/fsl_snvs_hp.o ./drivers/fsl_snvs_lp.o ./drivers/fsl_trng.o ./device/system_MIMXRT1062.o ./component/uart/lpuart_adapter.o ./component/serial_manager/serial_manager.o ./component/serial_manager/serial_port_uart.o ./component/osa/fsl_os_abstraction_free_rtos.o ./component/lists/generic_list.o ./cli/cli.o ./cli/cli_utils.o ./calendar/calendar.o ./cJSON/cJSON_MOD.o ./board/board.o ./board/clock_config.o ./board/dcd.o ./board/led.o ./board/pin_mux.o ./board/powerfail.o
c:/nxp/mcuxpressoide_11.1.1_3241/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728/tools/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: cannot find ./freertos/libraries/c_sdk/standard/common/: Permission denied
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:92: nanobox_2.axf] Error 1
 
I am not sure how to fix this. pls help
0 Kudos
1 Reply

62 Views
converse
Senior Contributor IV

The problem is that Windows has a maximum command line length of 8192 characters. This is a Windows limitation and nothing to do with MCUXpresso.

The only solutions (that I know) are:

- to reduce the size of your directory/sub-directory names so that the command issued to the linker is less than 8192 characters (the command below is over 10k characters),

- or put some of your objects into a library and link with that library

Neither of these may be particularly palatable, but they do work. There may be other solutions, but these are the ones I have used.

0 Kudos