Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arduino-builder: "panic: runtime error: invalid memory address or nil pointer dereference" #2

Open
pieterconradie opened this issue Nov 14, 2019 · 0 comments

Comments

@pieterconradie
Copy link

Hi Rick,

I am trying to follow your instructions to create a custom board based on the STM32 Arduino core. Using the files that's provided in this repo, the arduino-builder throws a panic and even after reading the docs and experimentation, I still can't figure out the cause. I was hoping that you could provide a hint or clue.

Details:

  • OS: Windows 10
  • Arduino 1.8.10
  • STM32 Arduino Core 1.7.0

Full error message:

Arduino: 1.8.10 (Windows 10), Board: "BluePill (vendor), BluePill F103C8, 64k (default), Smallest (-Os default), Newlib Nano (default), Enabled with generic Serial, STLink w/openocd"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Pieter\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Pieter\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Pieter\Documents\Arduino\libraries -fqbn=vendor:stm32:bluepill:pnum=BLUEPILL_F103C8,flash=C8,opt=osstd,rtlib=nano,xserial=generic,upload_method=openocd -vid-pid=0403_6015 -ide-version=10810 -build-path C:\Users\Pieter\AppData\Local\Temp\arduino_build_753880 -warnings=all -build-cache C:\Users\Pieter\AppData\Local\Temp\arduino_cache_412802 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.STM32Tools.path=C:\Users\Pieter\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\1.3.1 -prefs=runtime.tools.STM32Tools-1.3.1.path=C:\Users\Pieter\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\1.3.1 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Pieter\AppData\Local\Arduino15\packages\STM32\tools\arm-none-eabi-gcc\8.2.1-1.7 -prefs=runtime.tools.arm-none-eabi-gcc-8.2.1-1.7.path=C:\Users\Pieter\AppData\Local\Arduino15\packages\STM32\tools\arm-none-eabi-gcc\8.2.1-1.7 -prefs=runtime.tools.CMSIS.path=C:\Users\Pieter\AppData\Local\Arduino15\packages\STM32\tools\CMSIS\5.5.1 -prefs=runtime.tools.CMSIS-5.5.1.path=C:\Users\Pieter\AppData\Local\Arduino15\packages\STM32\tools\CMSIS\5.5.1 -verbose C:\Users\Pieter\AppData\Local\Temp\untitled332631352.tmp\sketch_nov14a\sketch_nov14a.ino
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x6fc523]

goroutine 1 [running]:
github.com/arduino/arduino-cli/arduino/cores.(*Platform).GetAllInstalled(0x0, 0x11c12718, 0x11dae200, 0x7)
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/arduino/cores/cores.go:174 +0x33
github.com/arduino/arduino-cli/arduino/cores/packagemanager.(*PackageManager).GetInstalledPlatformRelease(0x11cecc40, 0x0, 0x11c0030d)
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/arduino/cores/packagemanager/package_manager.go:318 +0x25
github.com/arduino/arduino-cli/arduino/cores/packagemanager.(*PackageManager).ResolveFQBN(0x11cecc40, 0x11cecba0, 0x95723f, 0x4, 0x95cf47, 0xc, 0x11e94028, 0x1, 0x1)
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/arduino/cores/packagemanager/package_manager.go:187 +0x393
github.com/arduino/arduino-cli/legacy/builder.(*TargetBoardResolver).Run(0xdebc68, 0x11cd05a0, 0xdebc68, 0x0)
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/target_board_resolver.go:45 +0x4c
github.com/arduino/arduino-cli/legacy/builder.(*ContainerSetupHardwareToolsLibsSketchAndProps).Run(0xdebc68, 0x11cd05a0, 0xdebc68, 0xdda500)
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_setup.go:60 +0x266
github.com/arduino/arduino-cli/legacy/builder.runCommands(0x11cd05a0, 0x11c6bf0c, 0x2, 0x2, 0xffffff01, 0x0, 0x4)
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:210 +0xbd
github.com/arduino/arduino-cli/legacy/builder.(*ParseHardwareAndDumpBuildProperties).Run(0x11c6bf40, 0x11cd05a0, 0xdebbb4, 0x11c06ca0)
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:198 +0xbc
github.com/arduino/arduino-cli/legacy/builder.RunParseHardwareAndDumpBuildProperties(...)
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:231
main.main()
	/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-builder/main.go:388 +0x772
C:\Program Files (x86)\Arduino\arduino-builder returned 2

Error compiling for board BluePill (vendor).

Thanks in advance,
Pieter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant