Optiboot / optiboot

Small and Fast Bootloader for Arduino and other Atmel AVR chips
Other
1.1k stars 402 forks source link

PC Tool to communicate with optiboot to flash the Application #319

Closed BeminGhobreal closed 2 years ago

BeminGhobreal commented 3 years ago

HI all, I'm working on a custom PC tool to upload the flash. I'm using the atmega328pb and the optiboot bootloader, I'm trying to use the stk500 command but the bootloader not responding. The issue is in the my pc application because the bootloader working with averdude. I couldn't find any documentation or command protocol regarding communicating with optiboot from the PC ? Any suggestions ?

WestfW commented 3 years ago

Is your PC-side code using STK500v1 or STK500v2? They're substantially different. See https://github.com/Optiboot/optiboot/wiki/HowOptibootWorks

BeminGhobreal commented 3 years ago

Using STKV500v1

BeminGhobreal commented 3 years ago

I can't find anything has to do with the crc ? how is the crc calculated is it just 0x20?

BeminGhobreal commented 3 years ago

How to program flash memory using optiboot ?

WestfW commented 3 years ago

There is no actual CRC. the "20" is more of a "check character", despite the symbol name.

What part of the previous references are you stuck on? In between the wiki page and the Atmel App note, it should be pretty clear, and I don't know of anything else.

BeminGhobreal commented 3 years ago

I resolved all the above, but now My issue is when I program the flash memory I don't get the /14/10 return , which I'M SUPPOSE TO GET ?

WestfW commented 3 years ago

Have you run avrdude with "all the v's" ("avrdude -vvvv ...")? This will show a full log of every byte sent and received, and you could compare it with what you application is sending/receiving.