Hi all,
I am trying to implement the AVR stub to debug a project, following https://docs.platformio.org/en/latest/plus/debug-tools/avr-stub.html
I setup my .ini file as required, but I cannot use avr-stub as a debug_tool argument in .ini, it prevents me from building, even after installing the library. Here is the error message I get, I dont see why :
DebugInvalidOptionsError: Unknown debug tool `avr-stub`. Please use one of `simavr` or `custom`:
File "C:\Users\Jean-ChristopheSicot\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 177:
env.SConscript("$BUILD_SCRIPT")
File "C:\Users\Jean-ChristopheSicot\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py", line 591:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\Jean-ChristopheSicot\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py", line 280:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\Jean-ChristopheSicot\.platformio\platforms\atmelavr\builder\main.py", line 155:
target_elf = env.BuildProgram()
File "C:\Users\Jean-ChristopheSicot\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py", line 658:
return self.method(*nargs, **kwargs)
File "C:\Users\Jean-ChristopheSicot\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 61:
env.ProcessProgramDeps()
File "C:\Users\Jean-ChristopheSicot\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py", line 658:
return self.method(*nargs, **kwargs)
File "C:\Users\Jean-ChristopheSicot\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 113:
env.PrintConfiguration()
File "C:\Users\Jean-ChristopheSicot\.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py", line 658:
return self.method(*nargs, **kwargs)
File "C:\Users\Jean-ChristopheSicot\.platformio\penv\lib\site-packages\platformio\builder\tools\pioplatform.py", line
233:
_get_debug_data(),
File "C:\Users\Jean-ChristopheSicot\.platformio\penv\lib\site-packages\platformio\builder\tools\pioplatform.py", line
197:
% board_config.get_debug_tool_name(env.GetProjectOption("debug_tool")),
File "c:\users\jean-christophesicot\.platformio\penv\lib\site-packages\platformio\platform\board.py", line 141:
% (tool_name, ", ".join(sorted(list(debug_tools))))
and my .ini
[env:ATmega328P]
platform = atmelavr
board = ATmega328P
framework = arduino
upload_protocol = atmelice_isp
upload_flags = -e
upload_port = usb
;debug_tool = simavr
debug_tool = avr-stub
debug_port = SERIAL_PORT
; do not forget to run burn fuse task if changing values, or open a terminal ctrl+shift+p and type: C:\pathto\pio.exe run -t fuses
; The path to pio.exe can be found when running a pio command (ex build), it will print in the terminal
board_fuses.hfuse = 0xDF ;smallest flash section size 256 since not using a bootloader with ICE programmer
board_fuses.lfuse = 0xE2 ;int 8MHz crystal (16MHz not working with less than 5V PSU)
board_fuses.efuse = 0xFE ;BOD at 1.8V, perfect for low power
lib_deps =
jdolinay/avr-debugger @ ~1.1
adafruit/Adafruit ST7735 and ST7789 Library@^1.6.0
adafruit/Adafruit BusIO@^1.5.0
adafruit/Adafruit SSD1306@^2.4.0
olkal/HX711_ADC@^1.2.1
Thanks!