nRF52840DK build error: src/jslex.o make: *** [espruino_2v08.220_nrf52840.elf] Error 1 #6855
Replies: 1 comment
-
Posted at 2021-09-25 by Robin I see there was a change to this file 9 days ago jslex.c Posted at 2021-09-25 by Robin With modified make instructions from:
Now I see the .elf and .hex files. But how do I move the generated .hex file to the local Windows10 file system in order to flash with esptool?
I was under the impression that output was stored in <user>/AppData/local but nothing there. *EDIT: 04:48pm CST* Oops! That .hex is not the resultant output, but an intermediate 832 version. I'm seeking the 840 version which doesn't seem to get built Posted at 2021-09-25 by Robin Sat 2021.09.25 Now this is interesting. I closed the VSCode workspace and shut down VSCode. Relaunched. Ran make clean followed by make clean && BOARD=NRF52840DK RELEASE=1 make and now get a unique new error:
Posted at 2021-09-26 by Robin Wow, and this sequence worked:
Fianlly, espruino_2v08.220_nrf52840.elf and espruino_2v08.220_nrf52840.hex get built! I have no explanation other than I removed the RELEASE=1 part and cleaned in separate steps:
vs
Posted at 2021-09-26 by Robin Sat 2021.09.25 - 07:54pm CST Have spent 12 hours on this, and it gets even more perplexing: I have built this on three separate attempts to see if I could uncover a cause and the number of bytes for the same file build changes: (I only ran the provision.sh script once prior) This shouldn't happen, should it???? While the storage value is consistent: STORAGE: 966656 -> 1007616 the data and code sections change:
Could this anomaly reveal a cause for the build errors? Shutting down for the evening to now enjoy both a bourbon and a nice 6yr rye. . . . Posted at 2021-09-26 by Robin Sun 2021.09.26 While looking over the provision.sh file
What version of Python need be installed? I have a user installed version 3.7 that runs from Windows:
VSCode somhow loads a version 2.7 that isn't (intentionally) installed on this PC - Maybe inside WSL?
Could this version be part of the issue? Posted at 2021-09-26 by Robin Sun 2021.09.26 After re-reading these threads, It appears from the errors that make is more likely the culprit. This notation might explain why after several make clean cycles,
I looked over NRF5X.make but don't see any commonalities there. Posted at 2021-10-01 by Robin Thr 2021.09.30
Well that was short lived. After several days of trial and error, I thought I had a work around using two separate 'make clean' steps. While that seemed to work, it is only around three out of five attempts. I have even tried switching the provision.sh targets, cleaning, build, then switching back to the desired target with limited success. I'm wondering if there is some kind of file locking hiccup within Windows10 that blocks the ability of the make utility from writing the file timely, as the errors are never consistent. I'd like to isolate/eliminate whether it might be the file system. Q: Does anyone know of a trick to add a small delay between each .o file compile with *make* or *gcc* to slow down the build? Posted at 2021-10-01 by @fanoush try to have the source files inside wsl, I see paths like /mnt/c/Users/robin/Espruino this is asking for trouble due to differencies in filename case sensitivity and windows file timestamps, see also https://docs.microsoft.com/en-us/windows/wsl/filesystems (and someone having similar issues here ) since you also installed random stuff on windows side of things I'd try also to disable windows-wsl interoperability so you know only linux native stuff is run for 'make', 'arm-none-eabi-gcc' etc, not mixed windows/linux. This is configured in /etc/wsl.conf
you can see if you have windows path prepended by running Posted at 2021-10-02 by Robin Fri 2021.10.01 Install comment: I thought I was installing the files within WSL using the git link to clone the respository from within the terminal window. I'll go back over those steps again, to validate. A lot to digest there, but I believe you have hit the nail on the head with your quick eye and analysis regarding the case sensitivity. Thank you @fanoush as with that quick response, will give me a good head start on checking that all out this weekend starting early Saturday morning. I'll have my work cut out for me!! Posted at 2021-10-06 by @gfwilliams Ok, I just spotted your other post and your original issue I believe could be that you're building for Linux natively and are then switching to a different device and are not cleaning the build:
If you close the terminal window between times then yes. Obviously you can do things to make it permanent but then if Posted at 2021-10-07 by Robin Wed 2021.10.06
Thank you for the analysis @gfwilliams.
I'm not entirely sure I'm performing the task referenced here. Just to be clear, I'm not intentionally changing the device for the nRF52840 build. Please (anyone) correct me if my understanding is incorrect, but all my commands are being entered inside the terminal window that is launched from the VSCode menu. My belief (as I'm sure I'm not fully understanding) is that WSL is the binding that allows a user to enter/execute Unix like commands on a DOS based PC. Kinda like a Unix virtual machine running inside it's own frame. (not sure if 'window' is a good choice of words for Unix) So, I don't believe I need a separate terminal window like the Putty app, just using the one VSCode provides. When you explain 'building for Linux natively' and should that mean creating the .hex file and then 'switching to a different device' is something I'm not (intentionally) doing. I was however during frantic now what the expletive do I do now sessions, did try combinations of clean and switching the provision scripts as that sequence did a couple of times seem to allow me to make progress. (errors changed and were never repeatable) The insight @fanoush observed seems to be what is happening based on my file write delay hunch. Over the weekend, I'll try that post #10 sequence with the additional step and make *(no pun - okay pun)* sure I repeat that exact sequence each time. Also, the additional J-Link adapter board arrived today so I'll have a chance to attempt the debug suggestions @fanoush provided, once I locate a brief operations tutorial and pin-out for the SEGGER board. I'll also play with the PATH environment var within the terminal window as my belief is that the update of nRFConnect has done somethong within the registry that when I launch a cmd window, VSCode and nRFConnect from a clean boot, the Win10 PATH environment var starts duplicating itself, running out of space, thereby corrupting it and blocking apps/processes from running cleanly. If I can get to the bottom of Posted at 2021-10-07 by @gfwilliams Here, you are building a file designed to run on your PC, not a microcontroller. It'll be a 64 bit x86 build:
Here you're building a binary file to run on the Espruino Wifi's ARM, but because you didn't clear the build, some files will have been built for the wrong platform:
You also need to build with So if you run the command listed there:
you may have more success |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-09-25 by Robin
Sat 2021.09.25
My original continuation is actually a unique new error specific to the DK nRF52840DK
Progress made after successful install of SDK15, but a new error surfaced:
make: *** [espruino_2v08.220_nrf52840.elf] Error 1
``` CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/atomic/nrf_atomic.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/atomic_flags/nrf_atflags.oCC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/ble_link_ctx_manager/ble_link_ctx_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/app_error_handler_gcc.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/pm_mutex.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/common/ble_advdata.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/common/ble_conn_params.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/common/ble_srv_common.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/common/ble_conn_state.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/ble_services/ble_nus/ble_nus.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/peer_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/peer_id.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/peer_database.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/peer_data_storage.oCC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/pm_buffer.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/id_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/security_manager.o targetlibs/nrf5x_15/components/ble/peer_manager/pm_buffer.c: In function 'pm_buffer_block_acquire': targetlibs/nrf5x_15/components/ble/peer_manager/pm_buffer.c:104:46: warning: comparison of integer expressions of different signedness: 'int' and 'uint32_t' {aka 'long unsigned int'} [-Wsign-compare] if ((i - first_locked_mutex + 1) == n_blocks) ^~ CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/security_dispatcher.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/gatt_cache_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/ble/peer_manager/gatts_cache_manager.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/timer/app_timer.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/fds/fds.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/queue/nrf_queue.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/app_util_platform.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/sdk_mapped_flags.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/app_error.o targetlibs/nrf5x_15/components/libraries/fds/fds.c: In function 'write_execute': targetlibs/nrf5x_15/components/libraries/fds/fds.c:1237:16: warning: this statement may fall through [-Wimplicit-fallthrough=] if (!record_find_by_desc(&desc, &page)) ^ targetlibs/nrf5x_15/components/libraries/fds/fds.c:1245:9: note: here case FDS_OP_WRITE_HEADER_BEGIN: ^~~~ CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/util/nrf_assert.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/softdevice/common/nrf_sdh.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/softdevice/common/nrf_sdh_ble.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/softdevice/common/nrf_sdh_soc.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/experimental_section_vars/nrf_section_iter.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/fstorage/nrf_fstorage.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/fstorage/nrf_fstorage_sd.oCC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/atomic_fifo/nrf_atfifo.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/strerror/nrf_strerror.o CC /mnt/c/Users/robin/Espruino/targetlibs/nrf5x_15/components/libraries/balloc/nrf_balloc.o LD espruino_2v08.220_nrf52840.elf src/jslex.o: file not recognized: file format not recognized collect2: error: ld returned 1 exit status make/targets/ARM.make:2: recipe for target 'espruino_2v08.220_nrf52840.elf' failed make: *** [espruino_2v08.220_nrf52840.elf] Error 1 rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/Espruino$ ```
Beta Was this translation helpful? Give feedback.
All reactions