Hi, I am trying to compile the code but at the end it gives error massage.
This is the way I do it :
farid@Farid-PC:~$ sudo apt-get install git make gcc-avr avr-libc flashrom avrdude
[sudo] password for farid:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
make is already the newest version (4.3-4.1build1).
avr-libc is already the newest version (1:2.0.0+Atmel3.6.2-3).
avrdude is already the newest version (6.3-20171130+svn1429-2).
flashrom is already the newest version (1.2-5build1).
gcc-avr is already the newest version (1:5.4.0+Atmel3.6.2-3).
git is already the newest version (1:2.34.1-1ubuntu1.8).
0 upgraded, 0 newly installed, 0 to remove and 129 not upgraded.
==========================================
farid@Farid-PC:~$ git clone --recursive https://github.com/urjaman/frser-duino.git
Cloning into 'frser-duino'...
remote: Enumerating objects: 363, done.
remote: Total 363 (delta 0), reused 0 (delta 0), pack-reused 363
Receiving objects: 100% (363/363), 101.32 KiB | 435.00 KiB/s, done.
Resolving deltas: 100% (242/242), done.
Submodule 'libfrser' (https://github.com/urjaman/libfrser.git) registered for path 'libfrser'
Cloning into '/home/farid/frser-duino/libfrser'...
remote: Enumerating objects: 408, done.
remote: Total 408 (delta 0), reused 0 (delta 0), pack-reused 408
Receiving objects: 100% (408/408), 123.07 KiB | 168.00 KiB/s, done.
Resolving deltas: 100% (271/271), done.
Submodule path 'libfrser': checked out 'a628f1961a6b83a3f135aa47fbf7078da89018cd'
==========================================
farid@Farid-PC:~$ cd frser-duino
==========================================
farid@Farid-PC:~/frser-duino$ make ftdi
make clean
make[1]: Entering directory '/home/farid/frser-duino'
rm -f frser-duino.bin
rm -f frser-duino.out
rm -f frser-duino.hex
rm -f frser-duino.s
rm -f *.o
make[1]: Leaving directory '/home/farid/frser-duino'
DFLAGS=-DFTDI FRBAUD=2000000 make all
make[1]: Entering directory '/home/farid/frser-duino'
avr-gcc -mmcu=atmega328p -DBAUD=2000000 -Os -fno-inline-small-functions -fno-tree-switch-conversion -frename-registers -g -Wall -W -pipe -flto -fwhole-program -std=gnu99 -DFTDI -Ilibfrser -std=gnu99 -I. -o frser-duino.out main.c uart.c spihw.c libfrser/frser.c libfrser/udelay.c libfrser/spilib.c libfrser/spihw_avrspi.c
avr-size frser-duino.out
text data bss dec hex filename
1416 0 1036 2452 994 frser-duino.out
make[1]: Leaving directory '/home/farid/frser-duino'
==========================================
farid@Farid-PC:~/frser-duino$ avr-objcopy -j .text -j .data -O ihex frser-duino.out frser-duino.hex
==========================================
farid@Farid-PC:~/frser-duino$ avrdude -c usbasp -p m328p -u -U flash:w:frser-duino.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "frser-duino.hex"
avrdude: input file frser-duino.hex auto detected as Intel Hex
avrdude: writing flash (1416 bytes):
Writing | ################################################## | 100% 11.09s
avrdude: 1416 bytes of flash written
avrdude: verifying flash memory against frser-duino.hex:
avrdude: load data flash data from input file frser-duino.hex:
avrdude: input file frser-duino.hex auto detected as Intel Hex
avrdude: input file frser-duino.hex contains 1416 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 6.87s
avrdude: verifying ...
avrdude: 1416 bytes of flash verified
avrdude done. Thank you.
==========================================
farid@Farid-PC:~/frser-duino$ flashrom -p serprog:dev=/dev/ttyUSB0:115200
flashrom v1.2 on Linux 5.19.0-32-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Error: cannot synchronize protocol - check communications and reset device?
Error: Programmer initialization failed.
==========================================
and by the way I am sure about the wiring and hardware because when I use the hex file from this site it seems to work, but when I try to compile the hex it doesn't work.
any idea why my own compiled hex file doesn't work?
farid@Farid-PC:~$ flashrom -p serprog:dev=/dev/ttyUSB0:115200
flashrom v1.2 on Linux 5.19.0-32-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
serprog: Programmer name is "frser-duino"
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0x00000000fef80000.
serprog: requested mapping GD25Q256D is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping IS25LP256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping IS25WP256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25L25635F/MX25L25645G is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25U25635F is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MX25U51245G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MX66L51235F/MX25L51245G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping N25Q00A..1G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping N25Q00A..3G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping N25Q256..1E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping N25Q256..3E is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping N25Q512..1G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping N25Q512..3G is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MT25QL01G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping MT25QU01G is incompatible: 0x8000000 bytes at 0x00000000f8000000.
serprog: requested mapping MT25QL02G is incompatible: 0x10000000 bytes at 0x00000000f0000000.
serprog: requested mapping MT25QU02G is incompatible: 0x10000000 bytes at 0x00000000f0000000.
serprog: requested mapping MT25QL256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MT25QU256 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping MT25QL512 is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping MT25QU512 is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping S25FL256S......0 is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping S25FL512S is incompatible: 0x4000000 bytes at 0x00000000fc000000.
serprog: requested mapping W25Q256.V is incompatible: 0x2000000 bytes at 0x00000000fe000000.
serprog: requested mapping W25Q256JV_M is incompatible: 0x2000000 bytes at 0x00000000fe000000.
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.