microtherion / ScratchMonkey

Arduino software programmer sketch, supporting ISP, HVSP, and HVPP
67 stars 25 forks source link

Arduino Mega 2560 with Atmel Studio 7 #10

Closed galmiklos closed 4 years ago

galmiklos commented 4 years ago

I just want to make sure I am not doing something completely nonsense, and I understood correctly how it is supposed to work.

I uploaded the sketch to an Arduino Mega 2560 board, and added a "target" under tools in Atmel Studio, as an STK500 on the Arduino COM port. When I select that tool in Device Programming with HVPP, I get an error message saying "Unable to connect to tool STK500 (COM7)". And the details of the error look like this.

Timestamp: 2020-05-31 09:51:46.466 Severity: ERROR ComponentId: 20100 StatusCode: 1 ModuleName: TCF (TCF command: Tool:connect failed.)

The signature of the attached tool is SCRATCHMONKEY, which is unexpected.

Is this supposed to work with Atmel Studio?

galmiklos commented 4 years ago

I guess I found my answer in the source code.

https://github.com/microtherion/ScratchMonkey/blob/6507105b8bec32c33ca602ec5b7da11bd631a94b/ScratchMonkey/SMoGeneral.cpp#L31-L41

;-)

So it seems it needs a little bit of tweaking the code to make it work with Atmel Studio. I also found a fork of this project (https://github.com/orangkucing/ScratchMonkey), that appears to have all the needed modifications. At least it works with Atmel Studio.