Hello Everyone, Im currently using the CTC 101 kit for my class and when setting up blink to make sure my boards are working, i keep getting compilation error; Exit Status 2.
Im using the prebuilt code for blink and I have the IDE reading my arduino 101 correctly as well as the port.
Here's my error;
fatal error: runtime: bsdthread_register error
runtime stack:
runtime.throw(0x1122f8, 0x21)
/ssd/go/src/runtime/panic.go:566 +0x95 fp=0x7ff7bfeff6d0 sp=0x7ff7bfeff6b0
runtime.goenvs()
/ssd/go/src/runtime/os_darwin.go:88 +0xa0 fp=0x7ff7bfeff700 sp=0x7ff7bfeff6d0
runtime.schedinit()
/ssd/go/src/runtime/proc.go:450 +0x9c fp=0x7ff7bfeff740 sp=0x7ff7bfeff700
runtime.rt0_go(0x7ff7bfeff778, 0x4, 0x7ff7bfeff778, 0x0, 0x1000, 0x4, 0x7ff7bfeff928, 0x7ff7bfeff985, 0x7ff7bfeff988, 0x7ff7bfeffa07, ...)
/ssd/go/src/runtime/asm_amd64.s:145 +0x14f fp=0x7ff7bfeff748 sp=0x7ff7bfeff740
exit status 2
Compilation error: exit status 2
I have macOS Monterey 12.6.2 and Arduino 2.0.4(nightly)
You have a compiler error, not an upload error. Your topic has been moved to the dedicated IDE 2.0 section of the forum.
Hi @srhinehart . The cause of this error is the arduino101load tool used to upload sketches to the Arduino 101 of the CTC 101 kit was built using a very outdated version of the Go compiler. This causes it to be incompatible with all modern versions of macOS:
As explained at the link above, the solution would be to build the tool again using a recent version of the Go programming language .
I am able to reproduce the bug on my macOS Ventura machine and was able to fix it by rebuilding arduino101load .
If you are comfortable with giving that "DIY" solution a try, I would be happy to provide instructions.
I'm going to raise this issue internally today with the team responsible for maintaining the arduino101load tool to see if there is anything we can do to provide a more convenient resolution.
An alternative solution might be for you to contact Arduino Support and see if it would be possible for you to return or exchange your unusable CTC 101 kit. You can contact them via this form:
https://www.arduino.cc/en/contact-us/
I have now submitted a formal bug report to the issue tracker for the problematic arduino101load tool dependency:
opened 05:10PM - 29 Jan 23 UTC
closed 09:55PM - 17 Feb 23 UTC
bug
### Describe the problem
The binaries provided as release assets in this repo… sitory fail with a `bsdthread_register` or `segmentation fault` error when used on a machine running a recent version of macOS.
This is apparently caused by the vintage version of Go used to generate the build:
https://github.com/golang/go/wiki/MacOS12BSDThreadRegisterIssue
### To reproduce
Download the binary from the release asset and attempt to execute it on a machine running a recent version of macOS.
```text
% sw_vers
ProductName: macOS
ProductVersion: 13.2
BuildVersion: 22D49
% mkdir /tmp/arduino101load-demo
% cd /tmp/arduino101load-demo
% curl --location --output arduino101load-2.0.1-darwin_amd64.tar.bz2 https://github.com/facchinm/arduino101load/releases/download/2.0.1/arduino101load-2.0.1-darwin_amd64.tar.bz2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1033k 100 1033k 0 0 517k 0 0:00:01 0:00:01 --:--:-- 989k
% tar -xf arduino101load-2.0.1-darwin_amd64.tar.bz2
% bin/arduino101load --help
zsh: segmentation fault bin/arduino101load --help
```
🐛 The valid invocation errored.
### Expected behavior
Builds are available for the users of modern macOS machines.
### Proposed solution
Convert the project to a Go module and build with a recent version of Go.
The produced binary works as expected:
```text
% git clone --depth 1 https://github.com/facchinm/arduino101load
Cloning into 'arduino101load'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 18 (delta 2), reused 12 (delta 1), pack-reused 0
Receiving objects: 100% (18/18), 198.18 KiB | 622.00 KiB/s, done.
Resolving deltas: 100% (2/2), done.
% cd arduino101load
% go version
go version go1.19.5 darwin/amd64
% go mod init github.com/facchinm/arduino101load
go: creating new go.mod: module github.com/facchinm/arduino101load
go: to add module requirements and sums:
go mod tidy
% go mod tidy
go: finding module for package github.com/mattn/go-shellwords
go: downloading github.com/mattn/go-shellwords v1.0.12
go: found github.com/mattn/go-shellwords in github.com/mattn/go-shellwords v1.0.12
% go build
% ./arduino101load --help
Usage of ./arduino101load:
-bin string
Location of sketch binary
-ble_fw_pos int
BLE FW ID offset
-ble_fw_str string
BLE FW ID string
-c Copy bin_file to bin_save
-core string
Firmware location
-dfu string
Location of dfu-util binaries
-f Force firmware update
-from string
Original file location
-port string
Upload serial port
-q Show quiet logging (default true)
-rtos_fw_pos int
RTOS FW ID offset
-rtos_fw_str string
RTOS FW ID string
-to string
Save file location
-v Show verbose logging
```
For the sake of simplicity, the above was done on the macOS machine, but the binary produced by cross compiling per the instructions in the readme works just as well, so there is no difficulty in producing the builds.
### Additional context
The above demo was on an Apple Silicon-based Mac machine running the [**Rosetta 2** interpreter](https://en.wikipedia.org/wiki/Rosetta_(software)#Rosetta_2) because that is the only machine I have access to, but the same problem also occur on an x86 Mac, as reported by users of the Arduino 101 board:
- https://forum.arduino.cc/t/compilation-error-exit-status-2/1079262
- https://forum.arduino.cc/t/arduino-ide-is-not-working-with-intel-curie-board-on-macos/1046077
On the x86 machine, the error message is a bit more verbose:
```text
/Users/x-user/Library/Arduino15/packages/Intel/tools/arduino101load/2.0.1/arduino101load -c "-from=\"/private/var/folders/dl/cdjfr_wx1lv48vd5mzr4klj80000gp/T/arduino-sketch-5CEDF04D633012E523AC2E5C948FE18F/Blink.ino.elf\"" "-to=\"/private/var/folders/dl/cdjfr_wx1lv48vd5mzr4klj80000gp/T/arduino-sketch-5CEDF04D633012E523AC2E5C948FE18F/../arduino101_sketch.debug.elf\""
runtime stack:
runtime.throw(0x1122f8, 0x21)
/ssd/go/src/runtime/panic.go:566 +0x95 fp=0x7ff7bfeff5c0 sp=0x7ff7bfeff5a0
runtime.goenvs()
/ssd/go/src/runtime/os_darwin.go:88 +0xa0 fp=0x7ff7bfeff5f0 sp=0x7ff7bfeff5c0
runtime.schedinit()
/ssd/go/src/runtime/proc.go:450 +0x9c fp=0x7ff7bfeff630 sp=0x7ff7bfeff5f0
runtime.rt0_go(0x7ff7bfeff660, 0x4, 0x7ff7bfeff660, 0x1000, 0x4, 0x7ff7bfeff810, 0x7ff7bfeff86c, 0x7ff7bfeff86f, 0x7ff7bfeff8ee, 0x0, ...)
/ssd/go/src/runtime/asm_amd64.s:145 +0x14f fp=0x7ff7bfeff638 sp=0x7ff7bfeff630
exit status 2
Compilation error: exit status 2}
```
I didn't submit a report to the "Intel Curie Boards" platform because I saw there was an existing report:
opened 07:22PM - 28 Aug 22 UTC
closed 07:49AM - 20 Feb 23 UTC
```
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger… =machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/trenskow/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/trenskow/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/trenskow/Documents/Arduino/libraries -fqbn=Intel:arc32:arduino_101 -vid-pid=8087_0AB6 -ide-version=10819 -build-path /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391 -warnings=none -build-cache /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_cache_825497 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduino101load.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/arduino101load/2.0.1 -prefs=runtime.tools.arduino101load-2.0.1.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/arduino101load/2.0.1 -prefs=runtime.tools.dfu-util.path=/Users/trenskow/Library/Arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -prefs=runtime.tools.dfu-util-0.9.0-arduino1.path=/Users/trenskow/Library/Arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -prefs=runtime.tools.openocd.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/openocd/0.9.0+0.1 -prefs=runtime.tools.openocd-0.9.0+0.1.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/openocd/0.9.0+0.1 -prefs=runtime.tools.arc-elf32.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -prefs=runtime.tools.arc-elf32-1.6.9+1.0.1.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -prefs=runtime.tools.flashpack.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/flashpack/2.0.0 -prefs=runtime.tools.flashpack-2.0.0.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/flashpack/2.0.0 -verbose /Users/trenskow/Documents/Arduino/sketch_aug27a/sketch_aug27a.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/trenskow/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/trenskow/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/trenskow/Documents/Arduino/libraries -fqbn=Intel:arc32:arduino_101 -vid-pid=8087_0AB6 -ide-version=10819 -build-path /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391 -warnings=none -build-cache /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_cache_825497 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduino101load.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/arduino101load/2.0.1 -prefs=runtime.tools.arduino101load-2.0.1.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/arduino101load/2.0.1 -prefs=runtime.tools.dfu-util.path=/Users/trenskow/Library/Arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -prefs=runtime.tools.dfu-util-0.9.0-arduino1.path=/Users/trenskow/Library/Arduino15/packages/arduino/tools/dfu-util/0.9.0-arduino1 -prefs=runtime.tools.openocd.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/openocd/0.9.0+0.1 -prefs=runtime.tools.openocd-0.9.0+0.1.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/openocd/0.9.0+0.1 -prefs=runtime.tools.arc-elf32.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -prefs=runtime.tools.arc-elf32-1.6.9+1.0.1.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1 -prefs=runtime.tools.flashpack.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/flashpack/2.0.0 -prefs=runtime.tools.flashpack-2.0.0.path=/Users/trenskow/Library/Arduino15/packages/Intel/tools/flashpack/2.0.0 -verbose /Users/trenskow/Documents/Arduino/sketch_aug27a/sketch_aug27a.ino
Using board 'arduino_101' from platform in folder: /Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5
Using core 'arduino' from platform in folder: /Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5
Detecting libraries used...
/Users/trenskow/Library/Arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1/bin/arc-elf32-g++ -c -mcpu=quarkse_em -mlittle-endian -g -Os -Wall -fno-reorder-functions -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fno-defer-pop -Wno-unused-but-set-variable -Wno-main -ffreestanding -fno-stack-protector -mno-sdata -ffunction-sections -fdata-sections -fsigned-char -fno-rtti -fno-exceptions -fcheck-new -D__ARDUINO_ARC__ -std=c++11 -DCONFIG_BLUETOOTH_PERIPHERAL -DCONFIG_BLUETOOTH_CENTRAL -DCONFIG_BLUETOOTH_GATT_CLIENT -w -x c++ -E -CC -DF_CPU=32000000L -DARDUINO=10819 -DARDUINO_ARC32_TOOLS -DARDUINO_ARCH_ARC32 -D__CPU_ARC__ -DCLOCK_SPEED=32 -DCONFIG_SOC_GPIO_32 -DCONFIG_SOC_GPIO_AON -DINFRA_MULTI_CPU_SUPPORT -DCFW_MULTI_CPU_SUPPORT -DHAS_SHARED_MEM -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/common -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/drivers -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/bootcode -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/framework/include -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/cores/arduino -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/variants/arduino_101 /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/sketch/sketch_aug27a.ino.cpp -o /dev/null
Generating function prototypes...
/Users/trenskow/Library/Arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1/bin/arc-elf32-g++ -c -mcpu=quarkse_em -mlittle-endian -g -Os -Wall -fno-reorder-functions -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fno-defer-pop -Wno-unused-but-set-variable -Wno-main -ffreestanding -fno-stack-protector -mno-sdata -ffunction-sections -fdata-sections -fsigned-char -fno-rtti -fno-exceptions -fcheck-new -D__ARDUINO_ARC__ -std=c++11 -DCONFIG_BLUETOOTH_PERIPHERAL -DCONFIG_BLUETOOTH_CENTRAL -DCONFIG_BLUETOOTH_GATT_CLIENT -w -x c++ -E -CC -DF_CPU=32000000L -DARDUINO=10819 -DARDUINO_ARC32_TOOLS -DARDUINO_ARCH_ARC32 -D__CPU_ARC__ -DCLOCK_SPEED=32 -DCONFIG_SOC_GPIO_32 -DCONFIG_SOC_GPIO_AON -DINFRA_MULTI_CPU_SUPPORT -DCFW_MULTI_CPU_SUPPORT -DHAS_SHARED_MEM -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/common -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/drivers -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/bootcode -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/framework/include -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/cores/arduino -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/variants/arduino_101 /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/sketch/sketch_aug27a.ino.cpp -o /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/preproc/ctags_target_for_gcc_minus_e.cpp
/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Users/trenskow/Library/Arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1/bin/arc-elf32-g++ -c -mcpu=quarkse_em -mlittle-endian -g -Os -Wall -fno-reorder-functions -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fno-defer-pop -Wno-unused-but-set-variable -Wno-main -ffreestanding -fno-stack-protector -mno-sdata -ffunction-sections -fdata-sections -fsigned-char -MMD -fno-rtti -fno-exceptions -fcheck-new -D__ARDUINO_ARC__ -std=c++11 -DCONFIG_BLUETOOTH_PERIPHERAL -DCONFIG_BLUETOOTH_CENTRAL -DCONFIG_BLUETOOTH_GATT_CLIENT -DF_CPU=32000000L -DARDUINO=10819 -DARDUINO_ARC32_TOOLS -DARDUINO_ARCH_ARC32 -D__CPU_ARC__ -DCLOCK_SPEED=32 -DCONFIG_SOC_GPIO_32 -DCONFIG_SOC_GPIO_AON -DINFRA_MULTI_CPU_SUPPORT -DCFW_MULTI_CPU_SUPPORT -DHAS_SHARED_MEM -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/common -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/drivers -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/bootcode -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/system/libarc32_arduino101/framework/include -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/cores/arduino -I/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/variants/arduino_101 /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/sketch/sketch_aug27a.ino.cpp -o /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/sketch/sketch_aug27a.ino.cpp.o
Compiling libraries...
Compiling core...
Using previously compiled file: /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/core/variant.cpp.o
Using precompiled core: /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_cache_825497/core/core_Intel_arc32_arduino_101_a1fd1ac69f46a34538fd941255ee1dfb.a
Linking everything together...
/Users/trenskow/Library/Arduino15/packages/Intel/tools/arc-elf32/1.6.9+1.0.1/bin/arc-elf32-gcc -nostartfiles -nodefaultlibs -nostdlib -static -Wl,-X -Wl,-N -Wl,-mcpu=quarkse_em -Wl,-marcelf -Wl,--gc-sections -T/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/variants/arduino_101/linker_scripts/flash.ld -Wl,-Map,/var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/sketch_aug27a.ino.map -o /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/sketch_aug27a.ino.elf -L/var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391 -L/Users/trenskow/Library/Arduino15/packages/Intel/hardware/arc32/2.0.5/variants/arduino_101 -Wl,--no-whole-archive -Wl,--start-group -lnsim -lc -lm -lgcc -larc32drv_arduino101 /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/sketch/sketch_aug27a.ino.cpp.o /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/core/variant.cpp.o /var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/../arduino_cache_825497/core/core_Intel_arc32_arduino_101_a1fd1ac69f46a34538fd941255ee1dfb.a
/Users/trenskow/Library/Arduino15/packages/Intel/tools/arduino101load/2.0.1/arduino101load -c "-from=\"/var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/sketch_aug27a.ino.elf\"" "-to=\"/var/folders/pz/kz0b20y15v7_hpvd7db9067c0000gn/T/arduino_build_193391/../arduino101_sketch.debug.elf\""
signal: segmentation fault
/Applications/Arduino.app/Contents/Java/arduino-builder returned 255
Error compiling for board Arduino/Genuino 101.
```
But I did add a comment there with more details about the problem.
If anyone else is experiencing this problem, my offer above still stands:
ptillisch:
the solution would be to build the tool again using a recent version of the Go programming language .
I am able to reproduce the bug on my macOS Ventura machine and was able to fix it by rebuilding arduino101load .
If you are comfortable with giving that "DIY" solution a try, I would be happy to provide instructions.
I have good news to share. This bug has been fixed in the latest 2.0.6 release of the "Intel Curie Boards " platform. The error should no longer occur after you use the Arduino IDE Boards Manager to install or update the platform to version 2.0.6.
Please let me know if you have any questions or problems when updating or using "Intel Curie Boards " 2.0.6.
system
Closed
August 16, 2023, 10:17pm
6
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.